| Index: media/audio/mac/audio_manager_mac.cc
|
| diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
|
| index f59e9d4da4bfa90d9696b0a9b882a6d06a3952b1..14877a95f92eb8321907344a80187c9c9ae63a5f 100644
|
| --- a/media/audio/mac/audio_manager_mac.cc
|
| +++ b/media/audio/mac/audio_manager_mac.cc
|
| @@ -384,34 +384,6 @@ AudioManagerMac::~AudioManagerMac() {
|
| // and IncreaseIOBufferSizeIfPossible() which both touches native Core Audio
|
| // APIs and they can fail and disrupt tests during shutdown.
|
| in_shutdown_ = true;
|
| - // We have seen cases where active input audio is not closed down properly
|
| - // at browser shutdown. AudioInputController::Close() is called but tasks
|
| - // in AudioInputController::DoClose() are not executed. Hence, input streams
|
| - // might remain even at this late state. |low_latency_input_streams_| will be
|
| - // modified during the call to stream->Close(), so we can't iterate over it
|
| - // here. Instead iterate over a copy.
|
| - // TODO(henrika): figure out the real cause why streams are not closed
|
| - // properly by the AIC for all cases and then remove this loop.
|
| - auto low_latency_input_streams_copy = low_latency_input_streams_;
|
| - for (auto* stream : low_latency_input_streams_copy) {
|
| - LOG(WARNING) << "Closing existing audio input stream at destruction";
|
| - // Prevents active Core Audio callbacks to use possibly invalid objects
|
| - // in its OnData() callback.
|
| - stream->Stop();
|
| - // Avoids hitting CHECK in dtor of AudioManagerBase.
|
| - stream->Close();
|
| - }
|
| - // Perform same type of cleanup as above but for high-latency input streams.
|
| - auto basic_input_streams_copy = basic_input_streams_;
|
| - for (auto* stream : basic_input_streams_copy) {
|
| - LOG(WARNING)
|
| - << "Closing existing high-latency audio input stream at destruction";
|
| - // Prevents active AudioQueue callbacks to use possibly invalid objects
|
| - // in its OnData() callback.
|
| - stream->Stop();
|
| - // Avoids hitting CHECK in dtor of AudioManagerBase.
|
| - stream->Close();
|
| - }
|
| Shutdown();
|
| }
|
|
|
|
|