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

Unified Diff: media/audio/audio_util.cc

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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_util.cc
===================================================================
--- media/audio/audio_util.cc (revision 185058)
+++ media/audio/audio_util.cc (working copy)
@@ -29,6 +29,7 @@
#if defined(OS_MACOSX)
#include "media/audio/mac/audio_low_latency_input_mac.h"
#include "media/audio/mac/audio_low_latency_output_mac.h"
+#include "media/audio/mac/audio_unified_mac.h"
#elif defined(OS_WIN)
#include "base/win/windows_version.h"
#include "media/audio/audio_manager_base.h"
@@ -284,4 +285,18 @@
#endif
+int GetAudioHardwareOutputChannels() {
+#if defined(OS_MACOSX)
+ int channels, channels_per_frame;
+ if (AudioHardwareUnifiedStream::GetDefaultOutputChannels(
+ &channels, &channels_per_frame))
+ return channels;
+ else
+ return 2;
+#else
+ // !!!!
+ return 2;
+#endif
+}
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698