Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: media/audio/audio_output_controller.cc

Issue 12102004: Renderer side audio device change wip... Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_output_controller.h ('k') | media/audio/audio_output_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « media/audio/audio_output_controller.h ('k') | media/audio/audio_output_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698