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

Side by Side Diff: media/audio/mac/aggregate_device_manager.h

Issue 163343002: Reland 153623004: Remove the unified IO code on the browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed the cras bot Created 6 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 unified diff | Download patch
« no previous file with comments | « media/audio/fake_audio_manager.cc ('k') | media/audio/mac/aggregate_device_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // The caller is responsible for releasing the CFStringRef.
29 static CFStringRef GetDeviceUID(AudioDeviceID id);
30
31 static void GetDeviceName(AudioDeviceID id, char* name, UInt32 size);
32 static UInt32 GetClockDomain(AudioDeviceID device_id);
33 static OSStatus GetPluginID(AudioObjectID* id);
34
35 CFMutableDictionaryRef CreateAggregateDeviceDictionary(
36 AudioDeviceID input_id,
37 AudioDeviceID output_id);
38
39 CFMutableArrayRef CreateSubDeviceArray(CFStringRef input_device_UID,
40 CFStringRef output_device_UID);
41
42 OSStatus CreateAggregateDevice(AudioDeviceID input_id,
43 AudioDeviceID output_id,
44 AudioDeviceID* aggregate_device);
45 void DestroyAggregateDevice();
46
47 AudioObjectID plugin_id_;
48 AudioDeviceID input_device_;
49 AudioDeviceID output_device_;
50
51 AudioDeviceID aggregate_device_;
52
53 DISALLOW_COPY_AND_ASSIGN(AggregateDeviceManager);
54 };
55
56 } // namespace media
57
58 #endif // MEDIA_AUDIO_MAC_AGGREGATE_DEVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « media/audio/fake_audio_manager.cc ('k') | media/audio/mac/aggregate_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698