-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyOpenAL.h
More file actions
43 lines (30 loc) · 1.28 KB
/
MyOpenAL.h
File metadata and controls
43 lines (30 loc) · 1.28 KB
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
/*
File: MyOpenAL.h
Abstract: OpenAL-related support functions
Source: http://www.gehacktes.net/2009/03/iphone-programming-part-6-multiple-sounds-with-openal/
Contributor: Alexander Shvetsov <ashvetsov@definitif.ru>
*/
#import <OpenAL/al.h>
#import <OpenAL/alc.h>
@interface MyOpenAL : NSObject {
ALCcontext* mContext;
ALCdevice* mDevice;
NSMutableArray* bufferStorageArray;
NSMutableDictionary* soundDictionary;
}
@property (nonatomic, retain) NSMutableArray* bufferStorageArray;
@property (nonatomic, retain) NSMutableDictionary* soundDictionary;
- (id)init;
- (void)playSoundWithId:(NSUInteger)soundId;
- (void)playSoundWithKey:(NSString*)soundKey;
- (void)playSoundWithId:(NSUInteger)soundId atVolume:(float)vol;
- (void)playSoundWithKey:(NSString*)soundKey atVolume:(float)vol;
- (void)stopSoundWithId:(NSUInteger)soundId;
- (void)stopSoundWithKey:(NSString*)soundKey;
- (bool)isPlayingSoundWithId:(NSUInteger)soundId;
- (bool)isPlayingSoundWithKey:(NSString*)soundKey;
- (void)rewindSoundWithId:(NSUInteger)soundId;
- (void)rewindSoundWithKey:(NSString*)soundKey;
- (NSUInteger)loadSoundFromFile:(NSString*)file ext:(NSString*)ext withLoop:(bool)loops;
- (bool)loadSoundWithKey:(NSString*)soundKey fromFile:(NSString*)file ext:(NSString*)ext withLoop:(bool)loops;
@end