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

Unified Diff: media/audio/win/audio_manager_win.cc

Issue 12918026: Adds support for CoreAudioUtil::IsChannelLayoutSupported() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « no previous file | media/audio/win/core_audio_util_win.h » ('j') | media/audio/win/core_audio_util_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/win/audio_manager_win.cc
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc
index fff5be5d1ee5bf2a5c2a2f01d6c1f4ba4f9869fc..204c8ea24cbd4dd42b131942e6f900e877aec3ec 100644
--- a/media/audio/win/audio_manager_win.cc
+++ b/media/audio/win/audio_manager_win.cc
@@ -387,6 +387,14 @@ AudioParameters AudioManagerWin::GetPreferredOutputStreamParameters(
}
if (input_params.IsValid()) {
+ if (CoreAudioUtil::IsChannelLayoutSupported(
+ eRender, eConsole, input_params.channel_layout())) {
+ // Open up using the same channel layout as the source if it is
+ // supported by the hardware.
+ channel_layout = input_params.channel_layout();
+ VLOG(1) << "Hardware channel layout is not used; using same "
+ << "layout as the source instead (" << channel_layout << ")";
+ }
input_channels = input_params.input_channels();
if (!CoreAudioUtil::IsSupported()) {
// If WASAPI isn't supported we'll fallback to WaveOut, which will take
« no previous file with comments | « no previous file | media/audio/win/core_audio_util_win.h » ('j') | media/audio/win/core_audio_util_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698