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 // Lazily creates an aggregate device based on the default | |
22 // input and output devices. | |
23 // It will either return a valid device or kAudioDeviceUnknown | |
24 // if the default devices are not suitable for aggregate devices. | |
25 AudioDeviceID GetDefaultAggregateDevice(); | |
26 | |
27 private: | |
28 // Helper methods. | |
DaleCurtis
2013/04/17 01:01:38
Floating comment.
Chris Rogers
2013/04/17 20:42:31
Removed comment
| |
29 | |
30 // The caller is responsible for releasing the CFStringRef. | |
31 static CFStringRef GetDeviceUID(AudioDeviceID id); | |
32 | |
33 static OSStatus GetDeviceName(AudioDeviceID id, char* name, UInt32 size); | |
34 static UInt32 GetClockDomain(AudioDeviceID device_id); | |
35 static OSStatus GetPluginID(AudioObjectID* id); | |
36 | |
37 CFMutableDictionaryRef CreateAggregateDeviceDictionary( | |
38 AudioDeviceID input_id, | |
39 AudioDeviceID output_id); | |
40 | |
41 CFMutableArrayRef CreateSubDeviceArray(CFStringRef input_device_UID, | |
42 CFStringRef output_device_UID); | |
43 | |
44 OSStatus CreateAggregateDevice(AudioDeviceID input_id, | |
45 AudioDeviceID output_id, | |
46 AudioDeviceID* aggregate_device); | |
47 void DestroyAggregateDevice(); | |
48 | |
49 AudioObjectID plugin_id_; | |
50 AudioDeviceID input_device_; | |
51 AudioDeviceID output_device_; | |
52 | |
53 AudioDeviceID aggregate_device_; | |
54 | |
55 DISALLOW_COPY_AND_ASSIGN(AggregateDeviceManager); | |
56 }; | |
57 | |
58 } // namespace media | |
59 | |
60 #endif // MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_ | |
OLD | NEW |