mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
6951fd1fbe
Testing has been completed on outgoing calls only. It is recommended that testing is conducted on incoming calls before a commit to upstream.
31 lines
870 B
Objective-C
31 lines
870 B
Objective-C
#import <AVFoundation/AVAudioPlayer.h>
|
|
|
|
/**
|
|
* Wrapper for system dependant audio interface.
|
|
**/
|
|
|
|
@interface SoundInstance : NSObject <AVAudioPlayerDelegate>
|
|
|
|
typedef enum {
|
|
SoundInstanceTypeNothing,
|
|
SoundInstanceTypeInboundRingtone,
|
|
SoundInstanceTypeOutboundRingtone,
|
|
SoundInstanceTypeHandshakeSound,
|
|
SoundInstanceTypeCompletedSound,
|
|
SoundInstanceTypeBusySound,
|
|
SoundInstanceTypeErrorAlert,
|
|
SoundInstanceTypeAlert
|
|
} SoundInstanceType;
|
|
|
|
@property (nonatomic) SoundInstanceType instanceType;
|
|
|
|
+(SoundInstance*) soundInstanceForFile:(NSString*) audioFile;
|
|
-(NSString*) getId;
|
|
|
|
-(void) setAudioToLoopIndefinitely;
|
|
-(void) setAudioLoopCount:(NSInteger) loopCount;
|
|
-(void) setCompeletionBlock:(void (^)(SoundInstance*)) block;
|
|
|
|
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player
|
|
successfully:(BOOL)flag;
|
|
@end
|