Index: media/audio/audio_output_controller.cc |
diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc |
index e3464fd6fdf9acc5f11f56a6b5f20071279159fa..63dc90bfe19f85f03f773cba90d2aff110d652bb 100644 |
--- a/media/audio/audio_output_controller.cc |
+++ b/media/audio/audio_output_controller.cc |
@@ -9,6 +9,7 @@ |
#include "base/message_loop.h" |
#include "base/threading/platform_thread.h" |
#include "base/time.h" |
+#include "media/audio/audio_util.h" |
#include "build/build_config.h" |
#include "media/audio/shared_memory_util.h" |
@@ -328,6 +329,12 @@ void AudioOutputController::DoStopCloseAndClearStream() { |
void AudioOutputController::OnDeviceChange() { |
DCHECK(message_loop_->BelongsToCurrentThread()); |
+ // Notify the renderer side that a device change has occurred. |
+ // TODO(dalecurtis): The new hardware information should be passed in instead |
+ // of being retrieved by every single AudioOutputController. |
+ handler_->OnDeviceChange( |
+ this, GetAudioHardwareSampleRate(), GetAudioHardwareBufferSize()); |
+ |
// Recreate the stream (DoCreate() will first shut down an existing stream). |
// Exit if we ran into an error. |
const State original_state = state_; |