forked from pokeb/PASoundEngine
/
PASoundMgr.h
48 lines (40 loc) · 1.51 KB
/
PASoundMgr.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
/* cocos2d for iPhone
*
* http://www.cocos2d-iphone.org
*
* Copyright (C) 2009 by Florin Dumitrescu. Some changes by Ben Copsey.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the 'cocos2d for iPhone' license.
*
* You will find a copy of this license within the cocos2d for iPhone
* distribution inside the "LICENSE" file.
*
*/
#import <UIKit/UIKit.h>
#import "cocos2d.h"
@class PASoundListener, PASound, PASoundSource;
@interface PASoundMgr : NSObject {
NSMutableDictionary *sounds;
PASoundListener *listener;
float soundsMasterGain;
NSMutableArray *playingSounds;
int maximumConcurrentSoundsForSoundGroup[4];
int playingSoundsForSoundGroup[4];
}
@property (readwrite, retain, nonatomic) PASoundListener *listener;
@property (readwrite, assign, nonatomic) float soundsMasterGain;
@property (readwrite, retain, nonatomic) NSMutableArray *playingSounds;
+ (PASoundMgr *)sharedSoundManager;
- (void)setMaxSounds:(unsigned int)max forSoundGroup:(unsigned int)group;
- (PASound *)addSound:(NSString *)name;
- (PASound *)sound:(NSString *)name;
- (void)stopSound:(PASoundSource *)sound;
- (PASoundSource *)playSound:(NSString *)name inGroup:(unsigned int)group atPosition:(CGPoint)p looped:(BOOL)looped withGain:(float)g fadeIn:(BOOL)fadeIn;
- (PASoundSource *)playSound:(NSString *)name inGroup:(unsigned int)group;
- (void)fadeOutAllSounds;
- (void)stopAllSoundsWithGroup:(unsigned int)group;
- (void)performFading;
- (void)initOpenAL;
- (void)initListener;
@end