This modification is supposed to fix the webrtc issue 144/145. With this fix, people could set/get mic volume before StartSend().
Review URL: http://webrtc-codereview.appspot.com/277007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@971 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
3041c62a56
commit
f556b9d1f4
@ -625,6 +625,24 @@ WebRtc_Word32 AudioDeviceWindowsWave::InitMicrophone()
|
||||
}
|
||||
}
|
||||
|
||||
WebRtc_UWord32 maxVol = 0;
|
||||
if (_mixerManager.MaxMicrophoneVolume(maxVol) == -1)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
" unable to retrieve max microphone volume");
|
||||
return -1;
|
||||
}
|
||||
_maxMicVolume = maxVol;
|
||||
|
||||
WebRtc_UWord32 minVol = 0;
|
||||
if (_mixerManager.MinMicrophoneVolume(minVol) == -1)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
" unable to retrieve min microphone volume");
|
||||
return -1;
|
||||
}
|
||||
_minMicVolume = minVol;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2041,24 +2059,6 @@ WebRtc_Word32 AudioDeviceWindowsWave::InitRecording()
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "utilized device ID : %u", deviceID);
|
||||
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "product name : %s", caps.szPname);
|
||||
|
||||
WebRtc_UWord32 maxVol = 0;
|
||||
if (_mixerManager.MaxMicrophoneVolume(maxVol) == -1)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
" unable to retrieve max microphone volume");
|
||||
return -1;
|
||||
}
|
||||
_maxMicVolume = maxVol;
|
||||
|
||||
WebRtc_UWord32 minVol = 0;
|
||||
if (_mixerManager.MinMicrophoneVolume(minVol) == -1)
|
||||
{
|
||||
WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id,
|
||||
" unable to retrieve min microphone volume");
|
||||
return -1;
|
||||
}
|
||||
_minMicVolume = minVol;
|
||||
|
||||
// Store valid handle for the open waveform-audio input device
|
||||
_hWaveIn = hWaveIn;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user