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

Unified Diff: media/audio/audio_output_controller.cc

Issue 11880009: Introduce AudioHardwareConfig for renderer side audio device info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Plumb. 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
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..a4b827bd3a6ed8cb0392738ac1c02f2d459d948f 100644
--- a/media/audio/audio_output_controller.cc
+++ b/media/audio/audio_output_controller.cc
@@ -10,6 +10,7 @@
#include "base/threading/platform_thread.h"
#include "base/time.h"
#include "build/build_config.h"
+#include "media/audio/audio_util.h"
#include "media/audio/shared_memory_util.h"
using base::Time;
@@ -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(
miu 2013/01/29 04:55:43 Should this instead be: handler_->OnDeviceChang
DaleCurtis 2013/01/29 19:36:00 No, the purpose of this call is to update the rend
miu 2013/01/29 22:04:34 Okay, makes sense to me now. And now the TODO com
DaleCurtis 2013/01/30 01:31:06 Yeah, I suspect we need to plumb the values a la t
+ this, GetAudioHardwareBufferSize(), GetAudioHardwareSampleRate());
+
// Recreate the stream (DoCreate() will first shut down an existing stream).
// Exit if we ran into an error.
const State original_state = state_;

Powered by Google App Engine
This is Rietveld 408576698