Inherits from NSObject
Conforms to CDAudioInterruptProtocol
CDAudioTransportProtocol
Declared in CocosDenshion.h

Overview

CDSoundSource is a wrapper around an OpenAL sound source. It allows you to manipulate properties such as pitch, gain, pan and looping while the sound is playing. CDSoundSource is based on the old CDSourceWrapper class but with much added functionality.

Tasks

Properties

durationInSeconds

Returns the duration of the attached buffer in seconds or a negative value if the buffer is invalid

@property (readonly) float durationInSeconds

Declared In

CocosDenshion.h

gain

isPlaying

lastError

Stores the last error code that occurred. Check against AL_NO_ERROR

@property (readonly) ALenum lastError

Declared In

CocosDenshion.h

looping

pan

pitch

soundId

Instance Methods

init:sourceIndex:soundEngine:

Do not init yourself, get an instance from the sourceForSound factory method on CDSoundEngine

- (id)init:(ALuint)theSourceId sourceIndex:(int)index soundEngine:(CDSoundEngine *)engine

Declared In

CocosDenshion.h