-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAudioManager.h
41 lines (31 loc) · 1.72 KB
/
AudioManager.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
//
// AudioManager.h
//
// Created by Yamamoto Gota on 12/12/20.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
@interface AudioManager : NSObject
+ (AudioManager *)sharedManager;
- (void)stopPlayers;
- (void)removePlayer:(AVAudioPlayer *)player;
- (AVAudioPlayer *)playerWithURL:(NSURL *)url
success:(void(^)(AVAudioPlayer *audioPlayer, BOOL isSuccessfully))success
failure:(void(^)(AVAudioPlayer *audioPlayer, NSError *error))failure;
- (AVAudioPlayer *)playerWithPath:(NSString *)path
success:(void(^)(AVAudioPlayer *audioPlayer, BOOL isSuccessfully))success
failure:(void(^)(AVAudioPlayer *audioPlayer, NSError *error))failure;
- (void)playerWithURL:(NSURL *)url
prepare:(void(^)(AVAudioPlayer *audioPlayer))prepare
success:(void(^)(AVAudioPlayer *audioPlayer, BOOL isSuccessfully))success
failure:(void(^)(AVAudioPlayer *audioPlayer, NSError *error))failure;
- (void)playerWithPath:(NSString *)path
prepare:(void(^)(AVAudioPlayer *audioPlayer))prepare
success:(void(^)(AVAudioPlayer *audioPlayer, BOOL isSuccessfully))success
failure:(void(^)(AVAudioPlayer *audioPlayer, NSError *error))failure;
- (void)playerContinuousWithPath:(NSArray *)paths
prepare:(void(^)(AVAudioPlayer *audioPlayer))prepare
process:(void(^)(AVAudioPlayer *audioPlayer, NSString *path, BOOL *stop))process
success:(void(^)(AVAudioPlayer *audioPlayer, BOOL isSuccessfully))success
failure:(void(^)(AVAudioPlayer *audioPlayer, NSError *error))failure;
@end