forked from robbiehanson/AlarmClock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MTCoreAudioDevice.h
44 lines (33 loc) · 1.19 KB
/
MTCoreAudioDevice.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// MTCoreAudioDevice.h
// MTCoreAudio.framework
//
// Created by Michael Thornburgh on Sun Dec 16 2001.
// Copyright (c) 2001 Michael Thornburgh. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreAudio/CoreAudio.h>
typedef enum MTCoreAudioDirection {
kMTCoreAudioDevicePlaybackDirection,
kMTCoreAudioDeviceRecordDirection
} MTCoreAudioDirection;
typedef struct _MTCoreAudioVolumeInfo {
Boolean hasVolume;
Boolean canSetVolume;
Float32 theVolume;
Boolean canMute;
Boolean isMuted;
Boolean canPlayThru;
Boolean playThruIsSet;
} MTCoreAudioVolumeInfo;
@interface MTCoreAudioDevice : NSObject {
AudioDeviceID myDevice;
}
- (MTCoreAudioDevice *) initWithDeviceID:(AudioDeviceID)theID;
+ (MTCoreAudioDevice *) deviceWithID:(AudioDeviceID)theID;
+ (MTCoreAudioDevice *) defaultOutputDevice;
+ (MTCoreAudioDevice *) defaultSystemOutputDevice;
- (Float32) volumeForChannel:(UInt32)theChannel forDirection:(MTCoreAudioDirection)theDirection;
- (void) setVolume:(Float32)theVolume forChannel:(UInt32)theChannel forDirection:(MTCoreAudioDirection)theDirection;
- (void) setMute:(BOOL)isMuted forChannel:(UInt32)theChannel forDirection:(MTCoreAudioDirection)theDirection;
@end