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:
xians@google.com 2011-08-04 15:33:30 +00:00
parent 55ce2d8a25
commit 88bd440ef6
8 changed files with 47 additions and 36 deletions

View File

@ -155,8 +155,8 @@ private:
EventWrapper& _recStartEvent;
EventWrapper& _playStartEvent;
ThreadWrapper* _ptrThreadPlay;
ThreadWrapper* _ptrThreadRec;
ThreadWrapper* _ptrThreadPlay;
WebRtc_UWord32 _recThreadID;
WebRtc_UWord32 _playThreadID;

View File

@ -17,7 +17,8 @@ namespace webrtc
{
AudioDeviceUtilityDummy::AudioDeviceUtilityDummy(const WebRtc_Word32 id) :
_critSect(*CriticalSectionWrapper::CreateCriticalSection()), _id(id),
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_id(id),
_lastError(AudioDeviceModule::kAdmErrNone)
{
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,

View File

@ -70,11 +70,19 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const WebRtc_Word32 id) :
_handlePlayout(NULL),
_recSndcardBuffsize(ALSA_SNDCARD_BUFF_SIZE_REC),
_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),
_recIsInitialized(false),
_playIsInitialized(false),
_recording(false),
_playing(false),
_recIsInitialized(false),
_playIsInitialized(false),
_startRec(false),
_stopRec(false),
_startPlay(false),
@ -83,11 +91,11 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const WebRtc_Word32 id) :
_buffersizeFromZeroAvail(true),
_buffersizeFromZeroDelay(true),
_sndCardPlayDelay(0),
_sndCardRecDelay(0),
_numReadyRecSamples(0),
_previousSndCardPlayDelay(0),
_delayMonitorStatePlay(0),
_largeDelayCountPlay(0),
_sndCardRecDelay(0),
_numReadyRecSamples(0),
_bufferCheckMethodPlay(0),
_bufferCheckMethodRec(0),
_bufferCheckErrorsPlay(0),
@ -98,16 +106,8 @@ AudioDeviceLinuxALSA::AudioDeviceLinuxALSA(const WebRtc_Word32 id) :
_playError(0),
_recWarning(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),
_playBufDelayFixed(80),
_playBufType(AudioDeviceModule::kAdaptiveBufferSize)
_playBufDelayFixed(80)
{
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
"%s created", __FUNCTION__);

View File

@ -212,8 +212,8 @@ private:
EventWrapper& _recStartEvent;
EventWrapper& _playStartEvent;
ThreadWrapper* _ptrThreadPlay;
ThreadWrapper* _ptrThreadRec;
ThreadWrapper* _ptrThreadPlay;
WebRtc_UWord32 _recThreadID;
WebRtc_UWord32 _playThreadID;
@ -221,10 +221,6 @@ private:
AudioMixerManagerLinuxALSA _mixerManager;
bool _usingInputDeviceIndex;
bool _usingOutputDeviceIndex;
AudioDeviceModule::WindowsDeviceType _inputDevice;
AudioDeviceModule::WindowsDeviceType _outputDevice;
WebRtc_UWord16 _inputDeviceIndex;
WebRtc_UWord16 _outputDeviceIndex;
bool _inputDeviceIsSpecified;

View File

@ -25,9 +25,12 @@ namespace webrtc
{
AudioMixerManagerLinuxALSA::AudioMixerManagerLinuxALSA(const WebRtc_Word32 id) :
_critSect(*CriticalSectionWrapper::CreateCriticalSection()), _id(id),
_inputMixerHandle(NULL), _outputMixerHandle(NULL),
_inputMixerElement(NULL), _outputMixerElement(NULL)
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
_id(id),
_outputMixerHandle(NULL),
_inputMixerHandle(NULL),
_outputMixerElement(NULL),
_inputMixerElement(NULL)
{
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
"%s constructed", __FUNCTION__);

View File

@ -39,13 +39,13 @@ AudioDeviceBuffer::AudioDeviceBuffer() :
_recBytesPerSample(0),
_playBytesPerSample(0),
_recSamples(0),
_playSamples(0),
_recSize(0),
_playSamples(0),
_playSize(0),
_recFile(*FileWrapper::Create()),
_playFile(*FileWrapper::Create()),
_newMicLevel(0),
_currentMicLevel(0),
_newMicLevel(0),
_playDelayMS(0),
_recDelayMS(0),
_clockDrift(0),

View File

@ -172,14 +172,14 @@ AudioDeviceModuleImpl::AudioDeviceModuleImpl(const WebRtc_Word32 id, const Audio
_critSectEventCb(*CriticalSectionWrapper::CreateCriticalSection()),
_critSectAudioCb(*CriticalSectionWrapper::CreateCriticalSection()),
_ptrCbAudioDeviceObserver(NULL),
_ptrAudioDeviceUtility(NULL),
_ptrAudioDevice(NULL),
_id(id),
_platformAudioLayer(audioLayer),
_lastProcessTime(AudioDeviceUtility::GetTimeInMS()),
_lastError(kAdmErrNone),
_platformType(kPlatformNotSupported),
_ptrAudioDeviceUtility(NULL),
_ptrAudioDevice(NULL),
_initialized(false)
_initialized(false),
_lastError(kAdmErrNone)
{
WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id, "%s created", __FUNCTION__);
}

View File

@ -101,11 +101,20 @@ void AudioEventObserver::OnWarningIsReported(const WarningCode warning)
;
AudioTransportImpl::AudioTransportImpl(AudioDeviceModule* audioDevice) :
_audioDevice(audioDevice), _playFromFile(false), _fullDuplex(false),
_speakerVolume(false), _microphoneVolume(false), _speakerMute(false),
_microphoneMute(false), _microphoneBoost(false),
_loopBackMeasurements(false), _microphoneAGC(false), _recCount(0),
_playCount(0), _playFile(*FileWrapper::Create()), _audioList()
_audioDevice(audioDevice),
_playFromFile(false),
_fullDuplex(false),
_speakerVolume(false),
_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);
}
@ -568,8 +577,10 @@ WebRtc_Word32 AudioTransportImpl::NeedMorePlayData(
;
FuncTestManager::FuncTestManager() :
_audioDevice(NULL), _processThread(NULL), _audioEventObserver(NULL),
_audioTransport(NULL)
_processThread(NULL),
_audioDevice(NULL),
_audioEventObserver(NULL),
_audioTransport(NULL)
{
}
;