CocosDenshion iOS  1.0.1
CocosDenshion API Reference (iOS version) for Kobold2D developers
CDSoundSource Interface Reference

#include <CocosDenshion.h>

Inheritance diagram for CDSoundSource:
Collaboration diagram for CDSoundSource:

List of all members.

Public Member Functions

id init:sourceIndex:soundEngine: (ALuint theSourceId,[sourceIndex] int index,[soundEngine] CDSoundEngine *engine)

Public Attributes

ALuint _sourceId
ALuint _sourceIndex
CDSoundEngine_engine
int _soundId
float _preMuteGain
BOOL enabled_
BOOL mute_

Properties

float pitch
float gain
float pan
BOOL looping
BOOL isPlaying
int soundId
float durationInSeconds
ALenum lastError

Detailed Description

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.

Since:
v1.0

Member Function Documentation

id CDSoundSource::init:sourceIndex:soundEngine: ( ALuint  theSourceId,
[sourceIndex] int  index,
[soundEngine] CDSoundEngine engine 
) [virtual]

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


Property Documentation

float CDSoundSource::durationInSeconds [read, assign]

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

ALenum CDSoundSource::lastError [read, assign]

Stores the last error code that occurred. Check against AL_NO_ERROR


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