00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #import "CDAudioManager.h"
00027
00040 @interface SimpleAudioEngine : NSObject <CDAudioInterruptProtocol> {
00041
00042 BOOL mute_;
00043 BOOL enabled_;
00044 }
00045
00047 @property (readwrite) float backgroundMusicVolume;
00049 @property (readwrite) float effectsVolume;
00051 @property (readonly) BOOL willPlayBackgroundMusic;
00052
00054 + (SimpleAudioEngine*) sharedEngine;
00055
00057 -(void) preloadBackgroundMusic:(NSString*) filePath;
00058
00060 -(void) playBackgroundMusic:(NSString*) filePath;
00062 -(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop;
00064 -(void) stopBackgroundMusic;
00066 -(void) pauseBackgroundMusic;
00068 -(void) resumeBackgroundMusic;
00070 -(void) rewindBackgroundMusic;
00072 -(BOOL) isBackgroundMusicPlaying;
00073
00075 -(ALuint) playEffect:(NSString*) filePath;
00077 -(void) stopEffect:(ALuint) soundId;
00079 -(ALuint) playEffect:(NSString*) filePath pitch:(Float32) pitch pan:(Float32) pan gain:(Float32) gain;
00081 -(void) preloadEffect:(NSString*) filePath;
00083 -(void) unloadEffect:(NSString*) filePath;
00085 -(CDSoundSource *) soundSourceForFile:(NSString*) filePath;
00086
00088 +(void) end;
00089
00090 @end