Fix "unreachable code" warnings (MSVC warning 4702) in webrtc.
BUG=chromium:346399 TEST=none R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/10139004 Patch from Peter Kasting <pkasting@chromium.org>. git-svn-id: http://webrtc.googlecode.com/svn/trunk@5747 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
0209e565de
commit
0e65fdaa3b
@ -1750,8 +1750,6 @@ int32_t AudioDeviceModuleImpl::StopRawOutputFileRecording()
|
|||||||
CHECK_INITIALIZED();
|
CHECK_INITIALIZED();
|
||||||
|
|
||||||
return (_audioDeviceBuffer.StopOutputFileRecording());
|
return (_audioDeviceBuffer.StopOutputFileRecording());
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -782,14 +782,17 @@ int VideoReceiver::SetReceiverRobustnessMode(
|
|||||||
_keyRequestMode = kKeyOnError; // TODO(hlundin): On long NACK list?
|
_keyRequestMode = kKeyOnError; // TODO(hlundin): On long NACK list?
|
||||||
break;
|
break;
|
||||||
case VideoCodingModule::kSoftNack:
|
case VideoCodingModule::kSoftNack:
|
||||||
|
#if 1
|
||||||
assert(false); // TODO(hlundin): Not completed.
|
assert(false); // TODO(hlundin): Not completed.
|
||||||
return VCM_NOT_IMPLEMENTED;
|
return VCM_NOT_IMPLEMENTED;
|
||||||
|
#else
|
||||||
// Enable hybrid NACK/FEC. Always wait for retransmissions and don't add
|
// Enable hybrid NACK/FEC. Always wait for retransmissions and don't add
|
||||||
// extra delay when RTT is above kLowRttNackMs.
|
// extra delay when RTT is above kLowRttNackMs.
|
||||||
_receiver.SetNackMode(kNack, media_optimization::kLowRttNackMs, -1);
|
_receiver.SetNackMode(kNack, media_optimization::kLowRttNackMs, -1);
|
||||||
_dualReceiver.SetNackMode(kNoNack, -1, -1);
|
_dualReceiver.SetNackMode(kNoNack, -1, -1);
|
||||||
_keyRequestMode = kKeyOnError;
|
_keyRequestMode = kKeyOnError;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case VideoCodingModule::kDualDecoder:
|
case VideoCodingModule::kDualDecoder:
|
||||||
if (decode_error_mode == kNoErrors) {
|
if (decode_error_mode == kNoErrors) {
|
||||||
return VCM_PARAMETER_ERROR;
|
return VCM_PARAMETER_ERROR;
|
||||||
@ -802,14 +805,17 @@ int VideoReceiver::SetReceiverRobustnessMode(
|
|||||||
_keyRequestMode = kKeyOnError;
|
_keyRequestMode = kKeyOnError;
|
||||||
break;
|
break;
|
||||||
case VideoCodingModule::kReferenceSelection:
|
case VideoCodingModule::kReferenceSelection:
|
||||||
|
#if 1
|
||||||
assert(false); // TODO(hlundin): Not completed.
|
assert(false); // TODO(hlundin): Not completed.
|
||||||
return VCM_NOT_IMPLEMENTED;
|
return VCM_NOT_IMPLEMENTED;
|
||||||
|
#else
|
||||||
if (decode_error_mode == kNoErrors) {
|
if (decode_error_mode == kNoErrors) {
|
||||||
return VCM_PARAMETER_ERROR;
|
return VCM_PARAMETER_ERROR;
|
||||||
}
|
}
|
||||||
_receiver.SetNackMode(kNoNack, -1, -1);
|
_receiver.SetNackMode(kNoNack, -1, -1);
|
||||||
_dualReceiver.SetNackMode(kNoNack, -1, -1);
|
_dualReceiver.SetNackMode(kNoNack, -1, -1);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
_receiver.SetDecodeErrorMode(decode_error_mode);
|
_receiver.SetDecodeErrorMode(decode_error_mode);
|
||||||
// The dual decoder should never decode with errors.
|
// The dual decoder should never decode with errors.
|
||||||
|
@ -488,7 +488,6 @@ int VoECodecImpl::SetISACMaxPayloadSize(int channel, int sizeBytes)
|
|||||||
"SetISACMaxPayloadSize() iSAC codec is not supported");
|
"SetISACMaxPayloadSize() iSAC codec is not supported");
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoECodecImpl::SetVADStatus(int channel, bool enable, VadModes mode,
|
int VoECodecImpl::SetVADStatus(int channel, bool enable, VadModes mode,
|
||||||
|
@ -627,13 +627,12 @@ int VoEHardwareImpl::ResetAudioDevice()
|
|||||||
" Failed to reset sound device");
|
" Failed to reset sound device");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
#else
|
#else
|
||||||
_shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
|
_shared->SetLastError(VE_FUNC_NOT_SUPPORTED, kTraceError,
|
||||||
" no support for resetting sound device");
|
" no support for resetting sound device");
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoEHardwareImpl::AudioDeviceControl(unsigned int par1, unsigned int par2,
|
int VoEHardwareImpl::AudioDeviceControl(unsigned int par1, unsigned int par2,
|
||||||
|
@ -294,20 +294,16 @@ int VoEVolumeControlImpl::SetInputMute(int channel, bool enable)
|
|||||||
// Mute before demultiplexing <=> affects all channels
|
// Mute before demultiplexing <=> affects all channels
|
||||||
return _shared->transmit_mixer()->SetMute(enable);
|
return _shared->transmit_mixer()->SetMute(enable);
|
||||||
}
|
}
|
||||||
else
|
// Mute after demultiplexing <=> affects one channel only
|
||||||
|
voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
|
||||||
|
voe::Channel* channelPtr = ch.channel();
|
||||||
|
if (channelPtr == NULL)
|
||||||
{
|
{
|
||||||
// Mute after demultiplexing <=> affects one channel only
|
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
|
||||||
voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
|
"SetInputMute() failed to locate channel");
|
||||||
voe::Channel* channelPtr = ch.channel();
|
return -1;
|
||||||
if (channelPtr == NULL)
|
|
||||||
{
|
|
||||||
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
|
|
||||||
"SetInputMute() failed to locate channel");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return channelPtr->SetMute(enable);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return channelPtr->SetMute(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoEVolumeControlImpl::GetInputMute(int channel, bool& enabled)
|
int VoEVolumeControlImpl::GetInputMute(int channel, bool& enabled)
|
||||||
@ -574,20 +570,16 @@ int VoEVolumeControlImpl::SetOutputVolumePan(int channel,
|
|||||||
// Master balance (affectes the signal after output mixing)
|
// Master balance (affectes the signal after output mixing)
|
||||||
return _shared->output_mixer()->SetOutputVolumePan(left, right);
|
return _shared->output_mixer()->SetOutputVolumePan(left, right);
|
||||||
}
|
}
|
||||||
else
|
// Per-channel balance (affects the signal before output mixing)
|
||||||
|
voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
|
||||||
|
voe::Channel* channelPtr = ch.channel();
|
||||||
|
if (channelPtr == NULL)
|
||||||
{
|
{
|
||||||
// Per-channel balance (affects the signal before output mixing)
|
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
|
||||||
voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
|
"SetOutputVolumePan() failed to locate channel");
|
||||||
voe::Channel* channelPtr = ch.channel();
|
return -1;
|
||||||
if (channelPtr == NULL)
|
|
||||||
{
|
|
||||||
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
|
|
||||||
"SetOutputVolumePan() failed to locate channel");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return channelPtr->SetOutputVolumePan(left, right);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return channelPtr->SetOutputVolumePan(left, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoEVolumeControlImpl::GetOutputVolumePan(int channel,
|
int VoEVolumeControlImpl::GetOutputVolumePan(int channel,
|
||||||
@ -618,19 +610,15 @@ int VoEVolumeControlImpl::GetOutputVolumePan(int channel,
|
|||||||
{
|
{
|
||||||
return _shared->output_mixer()->GetOutputVolumePan(left, right);
|
return _shared->output_mixer()->GetOutputVolumePan(left, right);
|
||||||
}
|
}
|
||||||
else
|
voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
|
||||||
|
voe::Channel* channelPtr = ch.channel();
|
||||||
|
if (channelPtr == NULL)
|
||||||
{
|
{
|
||||||
voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
|
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
|
||||||
voe::Channel* channelPtr = ch.channel();
|
"GetOutputVolumePan() failed to locate channel");
|
||||||
if (channelPtr == NULL)
|
return -1;
|
||||||
{
|
|
||||||
_shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
|
|
||||||
"GetOutputVolumePan() failed to locate channel");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return channelPtr->GetOutputVolumePan(left, right);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return channelPtr->GetOutputVolumePan(left, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
|
#endif // #ifdef WEBRTC_VOICE_ENGINE_VOLUME_CONTROL_API
|
||||||
|
Loading…
x
Reference in New Issue
Block a user