OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_ | |
6 #define MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_ | |
7 | |
8 #include <CoreAudio/CoreAudio.h> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "base/compiler_specific.h" | |
12 #include "media/base/media_export.h" | |
13 | |
14 namespace media { | |
15 | |
16 class MEDIA_EXPORT AggregateDeviceManager { | |
17 public: | |
18 AggregateDeviceManager(); | |
19 ~AggregateDeviceManager(); | |
20 | |
21 // Returns |true| if the default input and output devices are suitable | |
22 // for use with an aggregate device. | |
23 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
| |
24 | |
25 // Lazily creates an aggregate device based on the default | |
26 // input and output devices. | |
27 AudioDeviceID GetDefaultAggregateDevice(); | |
28 | |
29 private: | |
30 // Helper methods. | |
31 | |
32 // The caller is responsible for releasing the CFStringRef. | |
33 static CFStringRef GetDeviceUID(AudioDeviceID id); | |
34 | |
35 static OSStatus GetDeviceName(AudioDeviceID id, char* name, UInt32 size); | |
36 static UInt32 GetClockDomain(AudioDeviceID device_id); | |
37 static OSStatus GetPluginID(AudioObjectID* id); | |
38 | |
39 CFMutableDictionaryRef CreateAggregateDeviceDictionary( | |
40 AudioDeviceID input_id, | |
41 AudioDeviceID output_id); | |
42 | |
43 CFMutableArrayRef CreateSubDeviceArray(CFStringRef input_device_UID, | |
44 CFStringRef output_device_UID); | |
45 | |
46 OSStatus CreateAggregateDevice(AudioDeviceID input_id, | |
47 AudioDeviceID output_id, | |
48 AudioDeviceID* aggregate_device); | |
49 OSStatus DestroyAggregateDevice(); | |
50 | |
51 AudioObjectID plugin_id_; | |
52 AudioDeviceID input_device_; | |
53 AudioDeviceID output_device_; | |
54 | |
55 AudioDeviceID aggregate_device_; | |
56 | |
57 DISALLOW_COPY_AND_ASSIGN(AggregateDeviceManager); | |
58 }; | |
59 | |
60 } // namespace media | |
61 | |
62 #endif // MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_ | |
OLD | NEW |