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

Unified Diff: media/audio/mac/aggregate_device_manager.h

Issue 13403002: Add OSX aggregate audio device support for best performance. (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
Index: media/audio/mac/aggregate_device_manager.h
===================================================================
--- media/audio/mac/aggregate_device_manager.h (revision 0)
+++ media/audio/mac/aggregate_device_manager.h (revision 0)
@@ -0,0 +1,62 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_
+#define MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_
+
+#include <CoreAudio/CoreAudio.h>
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+class MEDIA_EXPORT AggregateDeviceManager {
+ public:
+ AggregateDeviceManager();
+ ~AggregateDeviceManager();
+
+ // Returns |true| if the default input and output devices are suitable
+ // for use with an aggregate device.
+ bool UseDefaultAggregateDevice();
no longer working on chromium 2013/04/03 21:11:57 can we merge this UseDefaultAggregateDevice to Get
Chris Rogers 2013/04/05 20:01:38 Yes, good point. DONE
+
+ // Lazily creates an aggregate device based on the default
+ // input and output devices.
+ AudioDeviceID GetDefaultAggregateDevice();
+
+ private:
+ // Helper methods.
+
+ // The caller is responsible for releasing the CFStringRef.
+ static CFStringRef GetDeviceUID(AudioDeviceID id);
+
+ static OSStatus GetDeviceName(AudioDeviceID id, char* name, UInt32 size);
+ static UInt32 GetClockDomain(AudioDeviceID device_id);
+ static OSStatus GetPluginID(AudioObjectID* id);
+
+ CFMutableDictionaryRef CreateAggregateDeviceDictionary(
+ AudioDeviceID input_id,
+ AudioDeviceID output_id);
+
+ CFMutableArrayRef CreateSubDeviceArray(CFStringRef input_device_UID,
+ CFStringRef output_device_UID);
+
+ OSStatus CreateAggregateDevice(AudioDeviceID input_id,
+ AudioDeviceID output_id,
+ AudioDeviceID* aggregate_device);
+ OSStatus DestroyAggregateDevice();
+
+ AudioObjectID plugin_id_;
+ AudioDeviceID input_device_;
+ AudioDeviceID output_device_;
+
+ AudioDeviceID aggregate_device_;
+
+ DISALLOW_COPY_AND_ASSIGN(AggregateDeviceManager);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_
« no previous file with comments | « no previous file | media/audio/mac/aggregate_device_manager.cc » ('j') | media/audio/mac/aggregate_device_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698