cocos2d-x
3.3
|
CDLongAudioSource represents an audio source that has a long duration which makes it costly to load into memory for playback as an effect using CDSoundEngine. More...
#import <CDAudioManager.h>
Instance Methods | |
(void) | - load: |
Loads the file into the audio source. More... | |
(void) | - play |
Plays the audio source. More... | |
(void) | - stop |
Stops playing the audio soruce. More... | |
(void) | - pause |
Pauses the audio source. More... | |
(void) | - rewind |
Rewinds the audio source. More... | |
(void) | - resume |
Resumes playing the audio source if it was paused. More... | |
(BOOL) | - isPlaying |
Returns whether or not the audio source is playing. More... | |
(void) | - load: |
Loads the file into the audio source. More... | |
(void) | - play |
Plays the audio source. More... | |
(void) | - stop |
Stops playing the audio soruce. More... | |
(void) | - pause |
Pauses the audio source. More... | |
(void) | - rewind |
Rewinds the audio source. More... | |
(void) | - resume |
Resumes playing the audio source if it was paused. More... | |
(BOOL) | - isPlaying |
Returns whether or not the audio source is playing. More... | |
![]() | |
(BOOL) | - mute |
Is audio mute. More... | |
(void) | - setMute: |
If YES then audio is silenced but not stopped, calls to start new audio will proceed but silently. More... | |
(BOOL) | - enabled |
Is audio enabled. More... | |
(void) | - setEnabled: |
If NO then all audio is stopped and any calls to start new audio will be ignored. More... | |
(BOOL) | - mute |
Is audio mute. More... | |
(void) | - setMute: |
If YES then audio is silenced but not stopped, calls to start new audio will proceed but silently. More... | |
(BOOL) | - enabled |
Is audio enabled. More... | |
(void) | - setEnabled: |
If NO then all audio is stopped and any calls to start new audio will be ignored. More... | |
Public Attributes | |
BOOL | systemPaused |
NSTimeInterval | systemPauseLocation |
Protected Attributes | |
BOOL | mute |
BOOL | enabled_ |
BOOL | stopped |
tLongAudioSourceState | state |
Properties | |
AVAudioPlayer * | audioSourcePlayer |
NSString * | audioSourceFilePath |
NSInteger | numberOfLoops |
float | volume |
id< CDLongAudioSourceDelegate > | delegate |
BOOL | backgroundMusic |
BOOL | paused |
CDLongAudioSource represents an audio source that has a long duration which makes it costly to load into memory for playback as an effect using CDSoundEngine.
Examples include background music and narration tracks. The audio file may or may not be compressed. Bear in mind that current iDevices can only use hardware to decode a single compressed audio file at a time and playing multiple compressed files will result in a performance drop as software decompression will take place.
- (BOOL) isPlaying |
Returns whether or not the audio source is playing.
- (BOOL) isPlaying |
Returns whether or not the audio source is playing.
- (void) load: | (NSString *) | filePath |
Loads the file into the audio source.
- (void) load: | (NSString *) | filePath |
Loads the file into the audio source.
- (void) pause |
Pauses the audio source.
- (void) pause |
Pauses the audio source.
- (void) play |
Plays the audio source.
- (void) play |
Plays the audio source.
- (void) resume |
Resumes playing the audio source if it was paused.
- (void) resume |
Resumes playing the audio source if it was paused.
- (void) rewind |
Rewinds the audio source.
- (void) rewind |
Rewinds the audio source.
- (void) stop |
Stops playing the audio soruce.
- (void) stop |
Stops playing the audio soruce.
|
protected |
|
protected |
|
protected |
|
protected |
- (BOOL) systemPaused |
- (NSTimeInterval) systemPauseLocation |
|
readatomicassign |
|
readatomicassign |
|
readwritenonatomicassign |
|
readwriteatomicassign |
|
readwritenonatomicassign |
|
readatomicassign |
|
readwritenonatomicassign |