Removing the "initialized after" warnings.
This CL tweat the order of the initialization in the constructor to adapt to the order of declaration of the members. Review URL: http://webrtc-codereview.appspot.com/92007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@301 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
55ce2d8a25
commit
88bd440ef6
@ -155,8 +155,8 @@ private:
|
|||||||
EventWrapper& _recStartEvent;
|
EventWrapper& _recStartEvent;
|
||||||
EventWrapper& _playStartEvent;
|
EventWrapper& _playStartEvent;
|
||||||
|
|
||||||
ThreadWrapper* _ptrThreadPlay;
|
|
||||||
ThreadWrapper* _ptrThreadRec;
|
ThreadWrapper* _ptrThreadRec;
|
||||||
|
ThreadWrapper* _ptrThreadPlay;
|
||||||
WebRtc_UWord32 _recThreadID;
|
WebRtc_UWord32 _recThreadID;
|
||||||
WebRtc_UWord32 _playThreadID;
|
WebRtc_UWord32 _playThreadID;
|
||||||
|
|
||||||
|
@ -17,7 +17,8 @@ namespace webrtc
|
|||||||
{
|
{
|
||||||
|
|
||||||
AudioDeviceUtilityDummy::AudioDeviceUtilityDummy(const WebRtc_Word32 id) :
|
AudioDeviceUtilityDummy::AudioDeviceUtilityDummy(const WebRtc_Word32 id) :
|
||||||
_critSect(*CriticalSectionWrapper::CreateCriticalSection()), _id(id),
|
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
|
_id(id),
|
||||||
_lastError(AudioDeviceModule::kAdmErrNone)
|
_lastError(AudioDeviceModule::kAdmErrNone)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
|
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
|
||||||
|
@ -70,11 +70,19 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const WebRtc_Word32 id) :
|
|||||||
_handlePlayout(NULL),
|
_handlePlayout(NULL),
|
||||||
_recSndcardBuffsize(ALSA_SNDCARD_BUFF_SIZE_REC),
|
_recSndcardBuffsize(ALSA_SNDCARD_BUFF_SIZE_REC),
|
||||||
_playSndcardBuffsize(ALSA_SNDCARD_BUFF_SIZE_PLAY),
|
_playSndcardBuffsize(ALSA_SNDCARD_BUFF_SIZE_PLAY),
|
||||||
|
_samplingFreqRec(REC_SAMPLES_PER_MS),
|
||||||
|
_samplingFreqPlay(PLAY_SAMPLES_PER_MS),
|
||||||
|
_recChannels(1),
|
||||||
|
_playChannels(1),
|
||||||
|
_playbackBufferSize(0),
|
||||||
|
_recordBufferSize(0),
|
||||||
|
_recBuffer(NULL),
|
||||||
|
_playBufType(AudioDeviceModule::kAdaptiveBufferSize),
|
||||||
_initialized(false),
|
_initialized(false),
|
||||||
_recIsInitialized(false),
|
|
||||||
_playIsInitialized(false),
|
|
||||||
_recording(false),
|
_recording(false),
|
||||||
_playing(false),
|
_playing(false),
|
||||||
|
_recIsInitialized(false),
|
||||||
|
_playIsInitialized(false),
|
||||||
_startRec(false),
|
_startRec(false),
|
||||||
_stopRec(false),
|
_stopRec(false),
|
||||||
_startPlay(false),
|
_startPlay(false),
|
||||||
@ -83,11 +91,11 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const WebRtc_Word32 id) :
|
|||||||
_buffersizeFromZeroAvail(true),
|
_buffersizeFromZeroAvail(true),
|
||||||
_buffersizeFromZeroDelay(true),
|
_buffersizeFromZeroDelay(true),
|
||||||
_sndCardPlayDelay(0),
|
_sndCardPlayDelay(0),
|
||||||
_sndCardRecDelay(0),
|
|
||||||
_numReadyRecSamples(0),
|
|
||||||
_previousSndCardPlayDelay(0),
|
_previousSndCardPlayDelay(0),
|
||||||
_delayMonitorStatePlay(0),
|
_delayMonitorStatePlay(0),
|
||||||
_largeDelayCountPlay(0),
|
_largeDelayCountPlay(0),
|
||||||
|
_sndCardRecDelay(0),
|
||||||
|
_numReadyRecSamples(0),
|
||||||
_bufferCheckMethodPlay(0),
|
_bufferCheckMethodPlay(0),
|
||||||
_bufferCheckMethodRec(0),
|
_bufferCheckMethodRec(0),
|
||||||
_bufferCheckErrorsPlay(0),
|
_bufferCheckErrorsPlay(0),
|
||||||
@ -98,16 +106,8 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const WebRtc_Word32 id) :
|
|||||||
_playError(0),
|
_playError(0),
|
||||||
_recWarning(0),
|
_recWarning(0),
|
||||||
_recError(0),
|
_recError(0),
|
||||||
_samplingFreqRec(REC_SAMPLES_PER_MS),
|
|
||||||
_samplingFreqPlay(PLAY_SAMPLES_PER_MS),
|
|
||||||
_recChannels(1),
|
|
||||||
_playChannels(1),
|
|
||||||
_playbackBufferSize(0),
|
|
||||||
_recordBufferSize(0),
|
|
||||||
_recBuffer(NULL),
|
|
||||||
_playBufDelay(80),
|
_playBufDelay(80),
|
||||||
_playBufDelayFixed(80),
|
_playBufDelayFixed(80)
|
||||||
_playBufType(AudioDeviceModule::kAdaptiveBufferSize)
|
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
|
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
|
||||||
"%s created", __FUNCTION__);
|
"%s created", __FUNCTION__);
|
||||||
|
@ -212,8 +212,8 @@ private:
|
|||||||
EventWrapper& _recStartEvent;
|
EventWrapper& _recStartEvent;
|
||||||
EventWrapper& _playStartEvent;
|
EventWrapper& _playStartEvent;
|
||||||
|
|
||||||
ThreadWrapper* _ptrThreadPlay;
|
|
||||||
ThreadWrapper* _ptrThreadRec;
|
ThreadWrapper* _ptrThreadRec;
|
||||||
|
ThreadWrapper* _ptrThreadPlay;
|
||||||
WebRtc_UWord32 _recThreadID;
|
WebRtc_UWord32 _recThreadID;
|
||||||
WebRtc_UWord32 _playThreadID;
|
WebRtc_UWord32 _playThreadID;
|
||||||
|
|
||||||
@ -221,10 +221,6 @@ private:
|
|||||||
|
|
||||||
AudioMixerManagerLinuxALSA _mixerManager;
|
AudioMixerManagerLinuxALSA _mixerManager;
|
||||||
|
|
||||||
bool _usingInputDeviceIndex;
|
|
||||||
bool _usingOutputDeviceIndex;
|
|
||||||
AudioDeviceModule::WindowsDeviceType _inputDevice;
|
|
||||||
AudioDeviceModule::WindowsDeviceType _outputDevice;
|
|
||||||
WebRtc_UWord16 _inputDeviceIndex;
|
WebRtc_UWord16 _inputDeviceIndex;
|
||||||
WebRtc_UWord16 _outputDeviceIndex;
|
WebRtc_UWord16 _outputDeviceIndex;
|
||||||
bool _inputDeviceIsSpecified;
|
bool _inputDeviceIsSpecified;
|
||||||
|
@ -25,9 +25,12 @@ namespace webrtc
|
|||||||
{
|
{
|
||||||
|
|
||||||
AudioMixerManagerLinuxALSA::AudioMixerManagerLinuxALSA(const WebRtc_Word32 id) :
|
AudioMixerManagerLinuxALSA::AudioMixerManagerLinuxALSA(const WebRtc_Word32 id) :
|
||||||
_critSect(*CriticalSectionWrapper::CreateCriticalSection()), _id(id),
|
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_inputMixerHandle(NULL), _outputMixerHandle(NULL),
|
_id(id),
|
||||||
_inputMixerElement(NULL), _outputMixerElement(NULL)
|
_outputMixerHandle(NULL),
|
||||||
|
_inputMixerHandle(NULL),
|
||||||
|
_outputMixerElement(NULL),
|
||||||
|
_inputMixerElement(NULL)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
|
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
|
||||||
"%s constructed", __FUNCTION__);
|
"%s constructed", __FUNCTION__);
|
||||||
|
@ -39,13 +39,13 @@ AudioDeviceBuffer::AudioDeviceBuffer() :
|
|||||||
_recBytesPerSample(0),
|
_recBytesPerSample(0),
|
||||||
_playBytesPerSample(0),
|
_playBytesPerSample(0),
|
||||||
_recSamples(0),
|
_recSamples(0),
|
||||||
_playSamples(0),
|
|
||||||
_recSize(0),
|
_recSize(0),
|
||||||
|
_playSamples(0),
|
||||||
_playSize(0),
|
_playSize(0),
|
||||||
_recFile(*FileWrapper::Create()),
|
_recFile(*FileWrapper::Create()),
|
||||||
_playFile(*FileWrapper::Create()),
|
_playFile(*FileWrapper::Create()),
|
||||||
_newMicLevel(0),
|
|
||||||
_currentMicLevel(0),
|
_currentMicLevel(0),
|
||||||
|
_newMicLevel(0),
|
||||||
_playDelayMS(0),
|
_playDelayMS(0),
|
||||||
_recDelayMS(0),
|
_recDelayMS(0),
|
||||||
_clockDrift(0),
|
_clockDrift(0),
|
||||||
|
@ -172,14 +172,14 @@ AudioDeviceModuleImpl::AudioDeviceModuleImpl(const WebRtc_Word32 id, const Audio
|
|||||||
_critSectEventCb(*CriticalSectionWrapper::CreateCriticalSection()),
|
_critSectEventCb(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_critSectAudioCb(*CriticalSectionWrapper::CreateCriticalSection()),
|
_critSectAudioCb(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_ptrCbAudioDeviceObserver(NULL),
|
_ptrCbAudioDeviceObserver(NULL),
|
||||||
|
_ptrAudioDeviceUtility(NULL),
|
||||||
|
_ptrAudioDevice(NULL),
|
||||||
_id(id),
|
_id(id),
|
||||||
_platformAudioLayer(audioLayer),
|
_platformAudioLayer(audioLayer),
|
||||||
_lastProcessTime(AudioDeviceUtility::GetTimeInMS()),
|
_lastProcessTime(AudioDeviceUtility::GetTimeInMS()),
|
||||||
_lastError(kAdmErrNone),
|
|
||||||
_platformType(kPlatformNotSupported),
|
_platformType(kPlatformNotSupported),
|
||||||
_ptrAudioDeviceUtility(NULL),
|
_initialized(false),
|
||||||
_ptrAudioDevice(NULL),
|
_lastError(kAdmErrNone)
|
||||||
_initialized(false)
|
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id, "%s created", __FUNCTION__);
|
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id, "%s created", __FUNCTION__);
|
||||||
}
|
}
|
||||||
|
@ -101,11 +101,20 @@ void AudioEventObserver::OnWarningIsReported(const WarningCode warning)
|
|||||||
;
|
;
|
||||||
|
|
||||||
AudioTransportImpl::AudioTransportImpl(AudioDeviceModule* audioDevice) :
|
AudioTransportImpl::AudioTransportImpl(AudioDeviceModule* audioDevice) :
|
||||||
_audioDevice(audioDevice), _playFromFile(false), _fullDuplex(false),
|
_audioDevice(audioDevice),
|
||||||
_speakerVolume(false), _microphoneVolume(false), _speakerMute(false),
|
_playFromFile(false),
|
||||||
_microphoneMute(false), _microphoneBoost(false),
|
_fullDuplex(false),
|
||||||
_loopBackMeasurements(false), _microphoneAGC(false), _recCount(0),
|
_speakerVolume(false),
|
||||||
_playCount(0), _playFile(*FileWrapper::Create()), _audioList()
|
_speakerMute(false),
|
||||||
|
_microphoneVolume(false),
|
||||||
|
_microphoneMute(false),
|
||||||
|
_microphoneBoost(false),
|
||||||
|
_microphoneAGC(false),
|
||||||
|
_loopBackMeasurements(false),
|
||||||
|
_playFile(*FileWrapper::Create()),
|
||||||
|
_recCount(0),
|
||||||
|
_playCount(0),
|
||||||
|
_audioList()
|
||||||
{
|
{
|
||||||
_resampler.Reset(48000, 48000, kResamplerSynchronousStereo);
|
_resampler.Reset(48000, 48000, kResamplerSynchronousStereo);
|
||||||
}
|
}
|
||||||
@ -568,8 +577,10 @@ WebRtc_Word32 AudioTransportImpl::NeedMorePlayData(
|
|||||||
;
|
;
|
||||||
|
|
||||||
FuncTestManager::FuncTestManager() :
|
FuncTestManager::FuncTestManager() :
|
||||||
_audioDevice(NULL), _processThread(NULL), _audioEventObserver(NULL),
|
_processThread(NULL),
|
||||||
_audioTransport(NULL)
|
_audioDevice(NULL),
|
||||||
|
_audioEventObserver(NULL),
|
||||||
|
_audioTransport(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user