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

Unified Diff: media/audio/audio_manager_base.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 | « content/test/webrtc_audio_device_test.cc ('k') | media/audio/audio_output_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.cc
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index 86a3db0f611c58bb2339c52ef92c0cd362fae8ed..990c465cc22393eeba42d09c9043136f826aac55 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -123,6 +123,7 @@ AudioOutputStream* AudioManagerBase::MakeAudioOutputStream(
NOTIMPLEMENTED();
return NULL;
#else
+ LOG(ERROR) << "CREATED VIRTUAL OUTPUT STREAM";
stream = new VirtualAudioOutputStream(
params, message_loop_, virtual_audio_input_stream_,
base::Bind(&AudioManagerBase::ReleaseVirtualOutputStream,
@@ -162,7 +163,9 @@ AudioInputStream* AudioManagerBase::MakeAudioInputStream(
}
AudioInputStream* stream = NULL;
- if (params.format() == AudioParameters::AUDIO_VIRTUAL) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kForceAudioMirroring) ||
+ params.format() == AudioParameters::AUDIO_VIRTUAL) {
#if defined(OS_IOS)
// We do not currently support iOS.
NOTIMPLEMENTED();
@@ -171,6 +174,8 @@ AudioInputStream* AudioManagerBase::MakeAudioInputStream(
// TODO(justinlin): Currently, audio mirroring will only work for the first
// request. Subsequent requests will not get audio.
if (!virtual_audio_input_stream_) {
+
+ LOG(ERROR) << "CREATED VIRTUAL INPUT STREAM";
virtual_audio_input_stream_ = new VirtualAudioInputStream(
params, message_loop_,
base::Bind(&AudioManagerBase::ReleaseVirtualInputStream,
@@ -405,6 +410,9 @@ AudioParameters AudioManagerBase::GetPreferredLowLatencyOutputStreamParameters(
#else
// TODO(dalecurtis): This should include bits per channel and channel layout
// eventually.
+ // TODO(dalecurtis): GetAudio*() methods should be cached by each platform
+ // specific audio manager to avoid system calls to retrieve the values, the
+ // cache should be updated on device changes.
return AudioParameters(
AudioParameters::AUDIO_PCM_LOW_LATENCY, input_params.channel_layout(),
GetAudioHardwareSampleRate(), 16, GetAudioHardwareBufferSize());
« no previous file with comments | « content/test/webrtc_audio_device_test.cc ('k') | media/audio/audio_output_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698