forked from CommercialTribe/react-native-opentok
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OTDefaultAudioDevice.h
55 lines (42 loc) · 1.4 KB
/
OTDefaultAudioDevice.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
45
46
47
48
49
50
51
52
53
54
55
//
// OTAudioDeviceIOSDefault.h
//
// Copyright (c) 2014 TokBox, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <OpenTok/OpenTok.h>
#define AUDIO_DEVICE_HEADSET @"AudioSessionManagerDevice_Headset"
#define AUDIO_DEVICE_BLUETOOTH @"AudioSessionManagerDevice_Bluetooth"
#define AUDIO_DEVICE_SPEAKER @"AudioSessionManagerDevice_Speaker"
@interface OTDefaultAudioDevice : NSObject <OTAudioDevice>
/**
Returns YES if a wired headset is available.
*/
@property (nonatomic, readonly) BOOL headsetDeviceAvailable;
/**
Returns YES if a bluetooth device is available.
*/
@property (nonatomic, readonly) BOOL bluetoothDeviceAvailable;
- (BOOL)setAudioBus:(id<OTAudioBus>)audioBus;
- (OTAudioFormat*)captureFormat;
- (OTAudioFormat*)renderFormat;
- (BOOL)renderingIsAvailable;
- (BOOL)initializeRendering;
- (BOOL)renderingIsInitialized;
- (BOOL)captureIsAvailable;
- (BOOL)initializeCapture;
- (BOOL)captureIsInitialized;
- (BOOL)startRendering;
- (BOOL)stopRendering;
- (BOOL)isRendering;
- (BOOL)startCapture;
- (BOOL)stopCapture;
- (BOOL)isCapturing;
- (void)setAudioPlayoutMute:(BOOL)mute;
- (uint16_t)estimatedRenderDelay;
- (uint16_t)estimatedCaptureDelay;
//desired Audio Route can be bluetooth and headset.
//bluetooth has higher priority of all, next headset, next speaker
- (BOOL)configureAudioSessionWithDesiredAudioRoute:(NSString*)desiredAudioRoute;
- (BOOL)detectCurrentRoute;
@end