Minor threading-model fix for ADM2 on Windows
Landing with TBR given vacation times and the fact that none of this code is active "in production". The ADM2 implementation can be seen as experimental (non-default) code and it takes some work to enable it and replace the existing ADM. Hence, extremely low risk to break anything. TBR: henrik.lundin Bug: webrtc:9265 Change-Id: Ibc9a57f4851bf4b890b77b9eaef1dfbe3ca86f83 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146084 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28601}
This commit is contained in:
@ -160,7 +160,9 @@ int CoreAudioInput::StartRecording() {
|
||||
}
|
||||
|
||||
fine_audio_buffer_->ResetRecord();
|
||||
if (!IsRestarting()) {
|
||||
audio_device_buffer_->StartRecording();
|
||||
}
|
||||
|
||||
if (!Start()) {
|
||||
return -1;
|
||||
@ -190,8 +192,10 @@ int CoreAudioInput::StopRecording() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!IsRestarting()) {
|
||||
RTC_DCHECK(audio_device_buffer_);
|
||||
audio_device_buffer_->StopRecording();
|
||||
}
|
||||
|
||||
// Release all allocated resources to allow for a restart without
|
||||
// intermediate destruction.
|
||||
|
@ -156,7 +156,9 @@ int CoreAudioOutput::StartPlayout() {
|
||||
}
|
||||
|
||||
fine_audio_buffer_->ResetPlayout();
|
||||
if (!IsRestarting()) {
|
||||
audio_device_buffer_->StartPlayout();
|
||||
}
|
||||
|
||||
if (!core_audio_utility::FillRenderEndpointBufferWithSilence(
|
||||
audio_client_.Get(), audio_render_client_.Get())) {
|
||||
@ -193,8 +195,10 @@ int CoreAudioOutput::StopPlayout() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!IsRestarting()) {
|
||||
RTC_DCHECK(audio_device_buffer_);
|
||||
audio_device_buffer_->StopPlayout();
|
||||
}
|
||||
|
||||
// Release all allocated resources to allow for a restart without
|
||||
// intermediate destruction.
|
||||
|
Reference in New Issue
Block a user