This CL changes all the freq relevant variables to be int type. So it will take away the VoE "comparison between signed and unsigned integer expressions" warnings.
BR, /SX Review URL: http://webrtc-codereview.appspot.com/89014 git-svn-id: http://webrtc.googlecode.com/svn/trunk@320 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
81520b7955
commit
0b0665acc1
@ -256,8 +256,7 @@ int AudioProcessingImpl::ProcessStream(AudioFrame* frame) {
|
||||
return kNullPointerError;
|
||||
}
|
||||
|
||||
if (frame->_frequencyInHz !=
|
||||
static_cast<WebRtc_UWord32>(sample_rate_hz_)) {
|
||||
if (frame->_frequencyInHz != sample_rate_hz_) {
|
||||
return kBadSampleRateError;
|
||||
}
|
||||
|
||||
@ -382,8 +381,7 @@ int AudioProcessingImpl::AnalyzeReverseStream(AudioFrame* frame) {
|
||||
return kNullPointerError;
|
||||
}
|
||||
|
||||
if (frame->_frequencyInHz !=
|
||||
static_cast<WebRtc_UWord32>(sample_rate_hz_)) {
|
||||
if (frame->_frequencyInHz != sample_rate_hz_) {
|
||||
return kBadSampleRateError;
|
||||
}
|
||||
|
||||
|
@ -697,7 +697,7 @@ public:
|
||||
const WebRtc_UWord32 timeStamp,
|
||||
const WebRtc_Word16* payloadData,
|
||||
const WebRtc_UWord16 payloadDataLengthInSamples,
|
||||
const WebRtc_UWord32 frequencyInHz,
|
||||
const int frequencyInHz,
|
||||
const SpeechType speechType,
|
||||
const VADActivity vadActivity,
|
||||
const WebRtc_UWord8 audioChannel = 1,
|
||||
@ -719,7 +719,7 @@ public:
|
||||
// Supporting Stereo, stereo samples are interleaved
|
||||
mutable WebRtc_Word16 _payloadData[kMaxAudioFrameSizeSamples];
|
||||
WebRtc_UWord16 _payloadDataLengthInSamples;
|
||||
WebRtc_UWord32 _frequencyInHz;
|
||||
int _frequencyInHz;
|
||||
WebRtc_UWord8 _audioChannel;
|
||||
SpeechType _speechType;
|
||||
VADActivity _vadActivity;
|
||||
@ -756,7 +756,7 @@ AudioFrame::UpdateFrame(
|
||||
const WebRtc_UWord32 timeStamp,
|
||||
const WebRtc_Word16* payloadData,
|
||||
const WebRtc_UWord16 payloadDataLengthInSamples,
|
||||
const WebRtc_UWord32 frequencyInHz,
|
||||
const int frequencyInHz,
|
||||
const SpeechType speechType,
|
||||
const VADActivity vadActivity,
|
||||
const WebRtc_UWord8 audioChannel,
|
||||
|
@ -159,7 +159,7 @@ public:
|
||||
virtual WebRtc_Word32 OnInitializeDecoder(const WebRtc_Word32 id,
|
||||
const WebRtc_Word8 payloadType,
|
||||
const WebRtc_Word8 payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||
const WebRtc_UWord32 frequency,
|
||||
const int frequency,
|
||||
const WebRtc_UWord8 channels,
|
||||
const WebRtc_UWord32 rate) = 0;
|
||||
|
||||
|
@ -3142,7 +3142,7 @@ void ViEChannel::OnApplicationDataReceived(const WebRtc_Word32 id,
|
||||
WebRtc_Word32 ViEChannel::OnInitializeDecoder(
|
||||
const WebRtc_Word32 id, const WebRtc_Word8 payloadType,
|
||||
const WebRtc_Word8 payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||
const WebRtc_UWord32 frequency, const WebRtc_UWord8 channels,
|
||||
const int frequency, const WebRtc_UWord8 channels,
|
||||
const WebRtc_UWord32 rate)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceInfo, webrtc::kTraceVideo, ViEId(_engineId, _channelId),
|
||||
|
@ -193,7 +193,7 @@ public:
|
||||
const WebRtc_Word32 id,
|
||||
const WebRtc_Word8 payloadType,
|
||||
const WebRtc_Word8 payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||
const WebRtc_UWord32 frequency,
|
||||
const int frequency,
|
||||
const WebRtc_UWord8 channels,
|
||||
const WebRtc_UWord32 rate);
|
||||
|
||||
|
@ -630,7 +630,7 @@ Channel::OnInitializeDecoder(
|
||||
const WebRtc_Word32 id,
|
||||
const WebRtc_Word8 payloadType,
|
||||
const WebRtc_Word8 payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||
const WebRtc_UWord32 frequency,
|
||||
const int frequency,
|
||||
const WebRtc_UWord8 channels,
|
||||
const WebRtc_UWord32 rate)
|
||||
{
|
||||
@ -5860,7 +5860,7 @@ Channel::Demultiplex(const AudioFrame& audioFrame,
|
||||
}
|
||||
|
||||
WebRtc_UWord32
|
||||
Channel::PrepareEncodeAndSend(WebRtc_UWord32 mixingFrequency)
|
||||
Channel::PrepareEncodeAndSend(int mixingFrequency)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||
"Channel::PrepareEncodeAndSend()");
|
||||
@ -6216,7 +6216,7 @@ Channel::GetRtpRtcp(RtpRtcp* &rtpRtcpModule) const
|
||||
}
|
||||
|
||||
WebRtc_Word32
|
||||
Channel::MixOrReplaceAudioWithFile(const WebRtc_UWord32 mixingFrequency)
|
||||
Channel::MixOrReplaceAudioWithFile(const int mixingFrequency)
|
||||
{
|
||||
WebRtc_Word16 fileBuffer[320];
|
||||
WebRtc_UWord32 fileSamples(0);
|
||||
@ -6278,7 +6278,7 @@ Channel::MixOrReplaceAudioWithFile(const WebRtc_UWord32 mixingFrequency)
|
||||
|
||||
WebRtc_Word32
|
||||
Channel::MixAudioWithFile(AudioFrame& audioFrame,
|
||||
const WebRtc_UWord32 mixingFrequency)
|
||||
const int mixingFrequency)
|
||||
{
|
||||
assert(mixingFrequency <= 32000);
|
||||
|
||||
|
@ -389,7 +389,7 @@ public:
|
||||
const WebRtc_Word32 id,
|
||||
const WebRtc_Word8 payloadType,
|
||||
const WebRtc_Word8 payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||
const WebRtc_UWord32 frequency,
|
||||
const int frequency,
|
||||
const WebRtc_UWord8 channels,
|
||||
const WebRtc_UWord32 rate);
|
||||
|
||||
@ -533,15 +533,15 @@ public:
|
||||
#endif
|
||||
WebRtc_UWord32 Demultiplex(const AudioFrame& audioFrame,
|
||||
const WebRtc_UWord8 audioLevel_dBov);
|
||||
WebRtc_UWord32 PrepareEncodeAndSend(WebRtc_UWord32 mixingFrequency);
|
||||
WebRtc_UWord32 PrepareEncodeAndSend(int mixingFrequency);
|
||||
WebRtc_UWord32 EncodeAndSend();
|
||||
|
||||
private:
|
||||
int InsertInbandDtmfTone();
|
||||
WebRtc_Word32
|
||||
MixOrReplaceAudioWithFile(const WebRtc_UWord32 mixingFrequency);
|
||||
MixOrReplaceAudioWithFile(const int mixingFrequency);
|
||||
WebRtc_Word32 MixAudioWithFile(AudioFrame& audioFrame,
|
||||
const WebRtc_UWord32 mixingFrequency);
|
||||
const int mixingFrequency);
|
||||
WebRtc_Word32 GetPlayoutTimeStamp(WebRtc_UWord32& playoutTimestamp);
|
||||
void UpdateDeadOrAliveCounters(bool alive);
|
||||
WebRtc_Word32 SendPacketRaw(const void *data, int len, bool RTCP);
|
||||
@ -576,9 +576,9 @@ private:
|
||||
FilePlayer* _inputFilePlayerPtr;
|
||||
FilePlayer* _outputFilePlayerPtr;
|
||||
FileRecorder* _outputFileRecorderPtr;
|
||||
WebRtc_UWord32 _inputFilePlayerId;
|
||||
WebRtc_UWord32 _outputFilePlayerId;
|
||||
WebRtc_UWord32 _outputFileRecorderId;
|
||||
int _inputFilePlayerId;
|
||||
int _outputFilePlayerId;
|
||||
int _outputFileRecorderId;
|
||||
bool _inputFilePlaying;
|
||||
bool _outputFilePlaying;
|
||||
bool _outputFileRecording;
|
||||
|
@ -142,12 +142,12 @@ private: // owns
|
||||
Resampler _apmResampler; // converts mixed audio to fit APM rate
|
||||
AudioLevel _audioLevel; // measures audio level for the combined signal
|
||||
DtmfInband _dtmfGenerator;
|
||||
WebRtc_UWord32 _instanceId;
|
||||
int _instanceId;
|
||||
VoEMediaProcess* _externalMediaCallbackPtr;
|
||||
bool _externalMedia;
|
||||
float _panLeft;
|
||||
float _panRight;
|
||||
WebRtc_UWord32 _mixingFrequencyHz;
|
||||
int _mixingFrequencyHz;
|
||||
FileRecorder* _outputFileRecorderPtr;
|
||||
bool _outputFileRecording;
|
||||
};
|
||||
|
@ -314,7 +314,7 @@ TransmitMixer::PrepareDemux(const WebRtc_Word8* audioSamples,
|
||||
totalDelayMS, clockDrift, currentMicLevel);
|
||||
|
||||
|
||||
const WebRtc_UWord32 mixingFrequency = _mixingFrequency;
|
||||
const int mixingFrequency = _mixingFrequency;
|
||||
|
||||
ScopedChannel sc(*_channelManagerPtr);
|
||||
void* iterator(NULL);
|
||||
@ -326,7 +326,7 @@ TransmitMixer::PrepareDemux(const WebRtc_Word8* audioSamples,
|
||||
{
|
||||
CodecInst tmpCdc;
|
||||
channelPtr->GetSendCodec(tmpCdc);
|
||||
if ((WebRtc_UWord32) tmpCdc.plfreq > _mixingFrequency)
|
||||
if (tmpCdc.plfreq > _mixingFrequency)
|
||||
_mixingFrequency = tmpCdc.plfreq;
|
||||
}
|
||||
channelPtr = sc.GetNextChannel(iterator);
|
||||
@ -1151,7 +1151,7 @@ TransmitMixer::GenerateAudioFrame(const WebRtc_Word16 audioSamples[],
|
||||
const WebRtc_UWord32 nSamples,
|
||||
const WebRtc_UWord8 nChannels,
|
||||
const WebRtc_UWord32 samplesPerSec,
|
||||
const WebRtc_UWord32 mixingFrequency)
|
||||
const int mixingFrequency)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
||||
"TransmitMixer::GenerateAudioFrame(nSamples=%u,"
|
||||
@ -1214,12 +1214,11 @@ WebRtc_Word32 TransmitMixer::RecordAudioToFile(
|
||||
}
|
||||
|
||||
WebRtc_Word32 TransmitMixer::MixOrReplaceAudioWithFile(
|
||||
const WebRtc_UWord32 mixingFrequency)
|
||||
const int mixingFrequency)
|
||||
{
|
||||
WebRtc_Word16 fileBuffer[320];
|
||||
|
||||
WebRtc_UWord32 fileSamples(0);
|
||||
WebRtc_Word32 outSamples(0);
|
||||
|
||||
{
|
||||
CriticalSectionScoped cs(_critSect);
|
||||
@ -1387,7 +1386,6 @@ int TransmitMixer::TypingDetection()
|
||||
{
|
||||
return (-1);
|
||||
}
|
||||
bool vad = (_audioFrame._vadActivity == AudioFrame::kVadActive);
|
||||
|
||||
if (_audioFrame._vadActivity == AudioFrame::kVadActive)
|
||||
_timeActive++;
|
||||
@ -1423,7 +1421,7 @@ int TransmitMixer::TypingDetection()
|
||||
}
|
||||
#endif
|
||||
|
||||
WebRtc_UWord32 TransmitMixer::GetMixingFrequency()
|
||||
int TransmitMixer::GetMixingFrequency()
|
||||
{
|
||||
assert(_mixingFrequency!=0);
|
||||
return (_mixingFrequency);
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
|
||||
int DeRegisterExternalMediaProcessing();
|
||||
|
||||
WebRtc_UWord32 GetMixingFrequency();
|
||||
int GetMixingFrequency();
|
||||
|
||||
// VoEVolumeControl
|
||||
int SetMute(const bool enable);
|
||||
@ -160,11 +160,11 @@ private:
|
||||
const WebRtc_UWord32 nSamples,
|
||||
const WebRtc_UWord8 nChannels,
|
||||
const WebRtc_UWord32 samplesPerSec,
|
||||
const WebRtc_UWord32 mixingFrequency);
|
||||
const int mixingFrequency);
|
||||
WebRtc_Word32 RecordAudioToFile(const WebRtc_UWord32 mixingFrequency);
|
||||
|
||||
WebRtc_Word32 MixOrReplaceAudioWithFile(
|
||||
const WebRtc_UWord32 mixingFrequency);
|
||||
const int mixingFrequency);
|
||||
|
||||
WebRtc_Word32 APMProcessStream(const WebRtc_UWord16 totalDelayMS,
|
||||
const WebRtc_Word32 clockDrift,
|
||||
@ -188,9 +188,9 @@ private: // owns
|
||||
FilePlayer* _filePlayerPtr;
|
||||
FileRecorder* _fileRecorderPtr;
|
||||
FileRecorder* _fileCallRecorderPtr;
|
||||
WebRtc_UWord32 _filePlayerId;
|
||||
WebRtc_UWord32 _fileRecorderId;
|
||||
WebRtc_UWord32 _fileCallRecorderId;
|
||||
int _filePlayerId;
|
||||
int _fileRecorderId;
|
||||
int _fileCallRecorderId;
|
||||
bool _filePlaying;
|
||||
bool _fileRecording;
|
||||
bool _fileCallRecording;
|
||||
@ -208,14 +208,14 @@ private: // owns
|
||||
WebRtc_UWord32 _noiseWarning;
|
||||
|
||||
private:
|
||||
WebRtc_UWord32 _instanceId;
|
||||
int _instanceId;
|
||||
bool _mixFileWithMicrophone;
|
||||
WebRtc_UWord32 _captureLevel;
|
||||
bool _externalMedia;
|
||||
VoEMediaProcess* _externalMediaCallbackPtr;
|
||||
bool _mute;
|
||||
WebRtc_Word32 _remainingMuteMicTimeMs;
|
||||
WebRtc_UWord32 _mixingFrequency;
|
||||
int _mixingFrequency;
|
||||
bool _includeAudioLevelIndication;
|
||||
WebRtc_UWord8 _audioLevel_dBov;
|
||||
};
|
||||
|
@ -282,7 +282,8 @@ WebRtc_Word32 VoEBaseImpl::NeedMorePlayData(
|
||||
_outputMixerPtr->GetMixedAudio(samplesPerSec, nChannels, audioFrame);
|
||||
|
||||
assert(nSamples == audioFrame._payloadDataLengthInSamples);
|
||||
assert(samplesPerSec == audioFrame._frequencyInHz);
|
||||
assert(samplesPerSec ==
|
||||
static_cast<WebRtc_UWord32>(audioFrame._frequencyInHz));
|
||||
|
||||
// Deliver audio (PCM) samples to the ADM
|
||||
memcpy(
|
||||
@ -585,7 +586,6 @@ int VoEBaseImpl::Init()
|
||||
}
|
||||
|
||||
bool available(false);
|
||||
WebRtc_Word32 ret(0);
|
||||
|
||||
// --------------------
|
||||
// Reinitialize the ADM
|
||||
|
@ -85,8 +85,6 @@ int VoECallReportImpl::ResetCallReportStatistics(int channel)
|
||||
}
|
||||
assert(_audioProcessingModulePtr != NULL);
|
||||
|
||||
int res1(0);
|
||||
int res2(0);
|
||||
bool levelMode =
|
||||
_audioProcessingModulePtr->level_estimator()->is_enabled();
|
||||
bool echoMode =
|
||||
|
Loading…
x
Reference in New Issue
Block a user