CocosDenshion iOS
1.0.1
CocosDenshion API Reference (iOS version) for Kobold2D developers
|
Public Member Functions | |
id | init () |
ALuint | playSound:sourceGroupId:pitch:pan:gain:loop: (int soundId,[sourceGroupId] int sourceGroupId,[pitch] float pitch,[pan] float pan,[gain] float gain,[loop] BOOL loop) |
CDSoundSource * | soundSourceForSound:sourceGroupId: (int soundId,[sourceGroupId] int sourceGroupId) |
void | stopSound: (ALuint sourceId) |
void | stopSourceGroup: (int sourceGroupId) |
void | stopAllSounds () |
void | defineSourceGroups: (NSArray *sourceGroupDefinitions) |
void | defineSourceGroups:total: (int[] sourceGroupDefinitions,[total] NSUInteger total) |
void | setSourceGroupNonInterruptible:isNonInterruptible: (int sourceGroupId,[isNonInterruptible] BOOL isNonInterruptible) |
void | setSourceGroupEnabled:enabled: (int sourceGroupId,[enabled] BOOL enabled) |
BOOL | sourceGroupEnabled: (int sourceGroupId) |
BOOL | loadBufferFromData:soundData:format:size:freq: (int soundId,[soundData] ALvoid *soundData,[format] ALenum format,[size] ALsizei size,[freq] ALsizei freq) |
BOOL | loadBuffer:filePath: (int soundId,[filePath] NSString *filePath) |
void | loadBuffersAsynchronously: (NSArray *loadRequests) |
BOOL | unloadBuffer: (int soundId) |
ALCcontext * | openALContext () |
float | bufferDurationInSeconds: (int soundId) |
ALsizei | bufferSizeInBytes: (int soundId) |
ALsizei | bufferFrequencyInHertz: (int soundId) |
void | _soundSourcePreRelease: (CDSoundSource *soundSource) |
Static Public Member Functions | |
void | setMixerSampleRate: (Float32 sampleRate) |
Protected Attributes | |
bufferInfo * | _buffers |
sourceInfo * | _sources |
sourceGroup * | _sourceGroups |
ALCcontext * | context |
NSUInteger | _sourceGroupTotal |
UInt32 | _audioSessionCategory |
BOOL | _handleAudioSession |
ALfloat | _preMuteGain |
NSObject * | _mutexBufferLoad |
BOOL | mute_ |
BOOL | enabled_ |
ALenum | lastErrorCode_ |
BOOL | functioning_ |
float | asynchLoadProgress_ |
BOOL | getGainWorks_ |
int | sourceTotal_ |
int | bufferTotal |
Properties | |
ALfloat | masterGain |
ALenum | lastErrorCode |
BOOL | functioning |
float | asynchLoadProgress |
BOOL | getGainWorks |
int | sourceTotal |
NSUInteger | sourceGroupTotal |
void CDSoundEngine::_soundSourcePreRelease: | ( | CDSoundSource * | soundSource | ) | [virtual] |
Used internally, never call unless you know what you are doing
float CDSoundEngine::bufferDurationInSeconds: | ( | int | soundId | ) | [virtual] |
Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid
ALsizei CDSoundEngine::bufferFrequencyInHertz: | ( | int | soundId | ) | [virtual] |
Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid
ALsizei CDSoundEngine::bufferSizeInBytes: | ( | int | soundId | ) | [virtual] |
Returns the size of the buffer in bytes or a negative value if the buffer id is invalid
id CDSoundEngine::init | ( | ) | [virtual] |
Initializes the engine with a group definition and a total number of groups
ALuint CDSoundEngine::playSound:sourceGroupId:pitch:pan:gain:loop: | ( | int | soundId, |
[sourceGroupId] int | sourceGroupId, | ||
[pitch] float | pitch, | ||
[pan] float | pan, | ||
[gain] float | gain, | ||
[loop] BOOL | loop | ||
) | [virtual] |
Plays a sound in a channel group with a pitch, pan and gain. The sound could played looped or not
void CDSoundEngine::setMixerSampleRate: | ( | Float32 | sampleRate | ) | [static, virtual] |
Sets the sample rate for the audio mixer. For best performance this should match the sample rate of your audio content
CDSoundSource * CDSoundEngine::soundSourceForSound:sourceGroupId: | ( | int | soundId, |
[sourceGroupId] int | sourceGroupId | ||
) | [virtual] |
Creates and returns a sound source object for the specified sound within the specified source group.
void CDSoundEngine::stopAllSounds | ( | ) | [virtual] |
Stops all playing sounds
void CDSoundEngine::stopSound: | ( | ALuint | sourceId | ) | [virtual] |
Stops playing a sound
void CDSoundEngine::stopSourceGroup: | ( | int | sourceGroupId | ) | [virtual] |
Stops playing a source group
NSUInteger CDSoundEngine::sourceGroupTotal [read, assign] |
Total number of source groups that have been defined
int CDSoundEngine::sourceTotal [read, assign] |
Total number of sources available