cocos2d-x  3.3rc0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CDLongAudioSource Class Reference

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>

Inheritance diagram for CDLongAudioSource:
<CDAudioInterruptProtocol> <CDAudioInterruptProtocol>

Instance Methods

(void) - load:
 Loads the file into the audio source. More...
 
var - load:
 Loads the file into the audio source. More...
 
local - load:
 Loads the file into the audio source. More...
 
(void) - play
 Plays the audio source. More...
 
local - play
 Plays the audio source. More...
 
(void) - stop
 Stops playing the audio soruce. More...
 
local - stop
 Stops playing the audio soruce. More...
 
(void) - pause
 Pauses the audio source. More...
 
local - pause
 Pauses the audio source. More...
 
(void) - rewind
 Rewinds the audio source. More...
 
var - rewind
 Rewinds the audio source. More...
 
local - rewind
 Rewinds the audio source. More...
 
(void) - resume
 Resumes playing the audio source if it was paused. More...
 
local - 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...
 
local - stop
 Stops playing the audio soruce. More...
 
(void) - pause
 Pauses the audio source. More...
 
(void) - rewind
 Rewinds the audio source. More...
 
local - rewind
 Rewinds the audio source. More...
 
(void) - resume
 Resumes playing the audio source if it was paused. More...
 
local - resume
 Resumes playing the audio source if it was paused. More...
 
(BOOL) - isPlaying
 Returns whether or not the audio source is playing. More...
 
- Instance Methods inherited from <CDAudioInterruptProtocol>
(BOOL) - mute
 Is audio mute. More...
 
var - mute
 Is audio mute. More...
 
local - 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...
 
var - mute
 Is audio mute. More...
 
local - 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
var systemPaused
local systemPaused
NSTimeInterval systemPauseLocation
var systemPauseLocation
local systemPauseLocation

Protected Attributes

BOOL mute
var mute
local mute
BOOL enabled_
var enabled_
local enabled_
BOOL stopped
var stopped
local stopped
tLongAudioSourceState state
var state
local state

Properties

AVAudioPlayer * audioSourcePlayer
NSString * audioSourceFilePath
NSInteger numberOfLoops
float volume
id< CDLongAudioSourceDelegatedelegate
BOOL backgroundMusic
BOOL paused

Detailed Description

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.

Since
v0.99

Method Documentation

- (BOOL) isPlaying

Returns whether or not the audio source is playing.

var isPlaying

Returns whether or not the audio source is playing.

local isPlaying

Returns whether or not the audio source is playing.

- (BOOL) isPlaying

Returns whether or not the audio source is playing.

var isPlaying

Returns whether or not the audio source is playing.

local isPlaying

Returns whether or not the audio source is playing.

- (void) load: (NSString *)  filePath

Loads the file into the audio source.

- (void) load: var  filePath

Loads the file into the audio source.

- (void) load: local  filePath

Loads the file into the audio source.

- (void) load: (NSString *)  filePath

Loads the file into the audio source.

- (void) load: var  filePath

Loads the file into the audio source.

- (void) load: local  filePath

Loads the file into the audio source.

- (void) pause

Pauses the audio source.

var pause

Pauses the audio source.

local pause

Pauses the audio source.

- (void) pause

Pauses the audio source.

var pause

Pauses the audio source.

local pause

Pauses the audio source.

- (void) play

Plays the audio source.

var play

Plays the audio source.

local play

Plays the audio source.

- (void) play

Plays the audio source.

var play

Plays the audio source.

local play

Plays the audio source.

- (void) resume

Resumes playing the audio source if it was paused.

var resume

Resumes playing the audio source if it was paused.

local resume

Resumes playing the audio source if it was paused.

- (void) resume

Resumes playing the audio source if it was paused.

var resume

Resumes playing the audio source if it was paused.

local resume

Resumes playing the audio source if it was paused.

- (void) rewind

Rewinds the audio source.

var rewind

Rewinds the audio source.

local rewind

Rewinds the audio source.

- (void) rewind

Rewinds the audio source.

var rewind

Rewinds the audio source.

local rewind

Rewinds the audio source.

- (void) stop

Stops playing the audio soruce.

var stop

Stops playing the audio soruce.

local stop

Stops playing the audio soruce.

- (void) stop

Stops playing the audio soruce.

var stop

Stops playing the audio soruce.

local stop

Stops playing the audio soruce.

Member Data Documentation

- (BOOL) enabled_
protected
var enabled_
protected
local enabled_
protected
- (BOOL) mute
protected
var mute
protected
local mute
protected
- (tLongAudioSourceState) state
protected
var state
protected
local state
protected
- (BOOL) stopped
protected
var stopped
protected
local stopped
protected
- (BOOL) systemPaused
var systemPaused
local systemPaused
- (NSTimeInterval)
systemPauseLocation
var systemPauseLocation
local systemPauseLocation

Property Documentation

- (NSString *) audioSourceFilePath
readatomicassign
var audioSourceFilePath
readatomicassign
local audioSourceFilePath
readatomicassign
- (AVAudioPlayer
*) audioSourcePlayer
readatomicassign
var audioSourcePlayer
readatomicassign
local audioSourcePlayer
readatomicassign
- (BOOL) backgroundMusic
readwritenonatomicassign
var backgroundMusic
readwritenonatomicassign
local backgroundMusic
readwritenonatomicassign
- (id
< CDLongAudioSourceDelegate >
) delegate
readwriteatomicassign
var delegate
readwriteatomicassign
local delegate
readwriteatomicassign
- (NSInteger) numberOfLoops
readwritenonatomicassign
var numberOfLoops
readwritenonatomicassign
local numberOfLoops
readwritenonatomicassign
- (BOOL) paused
readatomicassign
var paused
readatomicassign
local paused
readatomicassign
- (float) volume
readwritenonatomicassign
var volume
readwritenonatomicassign
local volume
readwritenonatomicassign

The documentation for this class was generated from the following file: