| cocos2d-x 3.0 |
)- 类列表 - 类索引 - 类继承关系 - 类成员
全部) 类) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义) 组) 页)
Instance Methods | Class Methods | Protected 属性 | 属性 | 所有成员列表
CDSoundEngine类 参考
#import
类 CDSoundEngine 继承关系图:
| ## Instance Methods | |
| (id) | - init |
| Initializes the engine with a group definition and a total number of groups. 更多… | |
| (ALuint) | - playSound:sourceGroupId:pitch:pan:gain:loop: |
| Plays a sound in a channel group with a pitch, pan and gain. 更多… | |
| (CDSoundSource ) | - soundSourceForSound:sourceGroupId: |
| Creates and returns a sound source object for the specified sound within the specified source group. 更多… | |
| (void) | - stopSound: |
| Stops playing a sound. 更多… | |
| (void) | - stopSourceGroup: |
| Stops playing a source group. 更多… | |
| (void) | - stopAllSounds |
| Stops all playing sounds. 更多… | |
| (void) | - pauseSound: |
| Pause a sound. 更多… | |
| (void) | - pauseAllSounds |
| Pause all sounds. 更多… | |
| (void) | - resumeSound: |
| Resume a sound. 更多… | |
| (void) | - resumeAllSounds |
| Resume all sounds. 更多… | |
| (void) | - defineSourceGroups: |
| (void) | - defineSourceGroups:total: |
| (void) | - setSourceGroupNonInterruptible:isNonInterruptible: |
| (void) | - setSourceGroupEnabled:enabled: |
| (BOOL) | - sourceGroupEnabled: |
| (BOOL) | - loadBufferFromData:soundData:format:size:freq: |
| (BOOL) | - loadBuffer:filePath: |
| (void) | - loadBuffersAsynchronously: |
| (BOOL) | - unloadBuffer: |
| (ALCcontext ) | - openALContext |
| (float) | - bufferDurationInSeconds: |
| Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid. 更多… | |
| (ALsizei) | - bufferSizeInBytes: |
| Returns the size of the buffer in bytes or a negative value if the buffer id is invalid. 更多… | |
| (ALsizei) | - bufferFrequencyInHertz: |
| Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid. 更多… | |
| (void) | - _soundSourcePreRelease: |
| Used internally, never call unless you know what you are doing. 更多… | |
| (id) | - init |
| Initializes the engine with a group definition and a total number of groups. 更多… | |
| (ALuint) | - playSound:sourceGroupId:pitch:pan:gain:loop: |
| Plays a sound in a channel group with a pitch, pan and gain. 更多… | |
| (CDSoundSource ) | - soundSourceForSound:sourceGroupId: |
| Creates and returns a sound source object for the specified sound within the specified source group. 更多… | |
| (void) | - stopSound: |
| Stops playing a sound. 更多… | |
| (void) | - stopSourceGroup: |
| Stops playing a source group. 更多… | |
| (void) | - stopAllSounds |
| Stops all playing sounds. 更多… | |
| (void) | - pauseSound: |
| Pause a sound. 更多… | |
| (void) | - pauseAllSounds |
| Pause all sounds. 更多… | |
| (void) | - resumeSound: |
| Resume a sound. 更多… | |
| (void) | - resumeAllSounds |
| Resume all sounds. 更多… | |
| (void) | - defineSourceGroups: |
| (void) | - defineSourceGroups:total: |
| (void) | - setSourceGroupNonInterruptible:isNonInterruptible: |
| (void) | - setSourceGroupEnabled:enabled: |
| (BOOL) | - sourceGroupEnabled: |
| (BOOL) | - loadBufferFromData:soundData:format:size:freq: |
| (BOOL) | - loadBuffer:filePath: |
| (void) | - loadBuffersAsynchronously: |
| (BOOL) | - unloadBuffer: |
| (ALCcontext ) | - openALContext |
| (float) | - bufferDurationInSeconds: |
| Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid. 更多… | |
| (ALsizei) | - bufferSizeInBytes: |
| Returns the size of the buffer in bytes or a negative value if the buffer id is invalid. 更多… | |
| (ALsizei) | - bufferFrequencyInHertz: |
| Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid. 更多… | |
| (void) | - _soundSourcePreRelease: |
| Used internally, never call unless you know what you are doing. 更多… | |
Instance Methods 继承自 <CDAudioInterruptProtocol> | |
| (BOOL) | - mute |
| Is audio mute. 更多… | |
| (void) | - setMute: |
| If YES then audio is silenced but not stopped, calls to start new audio will proceed but silently. 更多… | |
| (BOOL) | - enabled |
| Is audio enabled. 更多… | |
| (void) | - setEnabled: |
| If NO then all audio is stopped and any calls to start new audio will be ignored. 更多… | |
| (BOOL) | - mute |
| Is audio mute. 更多… | |
| (void) | - setMute: |
| If YES then audio is silenced but not stopped, calls to start new audio will proceed but silently. 更多… | |
| (BOOL) | - enabled |
| Is audio enabled. 更多… | |
| (void) | - setEnabled: |
| If NO then all audio is stopped and any calls to start new audio will be ignored. 更多… | |
| ## Class Methods | |
| (void) | + setMixerSampleRate: |
| Sets the sample rate for the audio mixer. 更多… | |
| (void) | + setMixerSampleRate: |
| Sets the sample rate for the audio mixer. 更多… | |
| ## Protected 属性 | |
| 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 |
| ## 属性 | |
| ALfloat | masterGain |
| ALenum | lastErrorCode |
| BOOL | functioning |
| float | asynchLoadProgress |
| BOOL | getGainWorks |
| int | sourceTotal |
| Total number of sources available. 更多… | |
| NSUInteger | sourceGroupTotal |
| Total number of source groups that have been defined. 更多… | |
Method Documentation
| - (void) _soundSourcePreRelease: | (CDSoundSource *) | soundSource |
Used internally, never call unless you know what you are doing.
| - (void) _soundSourcePreRelease: | (CDSoundSource *) | soundSource |
Used internally, never call unless you know what you are doing.
| - (float) bufferDurationInSeconds: | (int) | soundId |
Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid.
| - (float) bufferDurationInSeconds: | (int) | soundId |
Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid.
| - (ALsizei) bufferFrequencyInHertz: | (int) | soundId |
Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid.
| - (ALsizei) bufferFrequencyInHertz: | (int) | soundId |
Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid.
| - (ALsizei) bufferSizeInBytes: | (int) | soundId |
Returns the size of the buffer in bytes or a negative value if the buffer id is invalid.
| - (ALsizei) bufferSizeInBytes: | (int) | soundId |
Returns the size of the buffer in bytes or a negative value if the buffer id is invalid.
| - (void) defineSourceGroups: | (NSArray *) | sourceGroupDefinitions |
| - (void) defineSourceGroups: | (NSArray *) | sourceGroupDefinitions |
| - (void) defineSourceGroups: | (int[]) | sourceGroupDefinitions | |
| total: | (NSUInteger) | total | |
| - (void) defineSourceGroups: | (int[]) | sourceGroupDefinitions | |
| total: | (NSUInteger) | total | |
| - (id) init |
Initializes the engine with a group definition and a total number of groups.
| - (id) init |
Initializes the engine with a group definition and a total number of groups.
| - (BOOL) loadBuffer: | (int) | soundId | |
| filePath: | (NSString *) | filePath | |
| - (BOOL) loadBuffer: | (int) | soundId | |
| filePath: | (NSString *) | filePath | |
| - (BOOL) loadBufferFromData: | (int) | soundId | |
| soundData: | (ALvoid *) | soundData | |
| format: | (ALenum) | format | |
| size: | (ALsizei) | size | |
| freq: | (ALsizei) | freq | |
| - (BOOL) loadBufferFromData: | (int) | soundId | |
| soundData: | (ALvoid *) | soundData | |
| format: | (ALenum) | format | |
| size: | (ALsizei) | size | |
| freq: | (ALsizei) | freq | |
| - (void) loadBuffersAsynchronously: | (NSArray *) | loadRequests |
| - (void) loadBuffersAsynchronously: | (NSArray *) | loadRequests |
| - (ALCcontext *) openALContext |
| - (ALCcontext *) openALContext |
| - (void) pauseAllSounds |
Pause all sounds.
| - (void) pauseAllSounds |
Pause all sounds.
| - (void) pauseSound: | (ALuint) | sourceId |
Pause a sound.
| - (void) pauseSound: | (ALuint) | sourceId |
Pause a sound.
| - (ALuint) playSound: | (int) | soundId | |
| sourceGroupId: | (int) | sourceGroupId | |
| pitch: | (float) | pitch | |
| pan: | (float) | pan | |
| gain: | (float) | gain | |
| loop: | (BOOL) | loop | |
Plays a sound in a channel group with a pitch, pan and gain.
The sound could played looped or not
| - (ALuint) playSound: | (int) | soundId | |
| sourceGroupId: | (int) | sourceGroupId | |
| pitch: | (float) | pitch | |
| pan: | (float) | pan | |
| gain: | (float) | gain | |
| loop: | (BOOL) | loop | |
Plays a sound in a channel group with a pitch, pan and gain.
The sound could played looped or not
| - (void) resumeAllSounds |
Resume all sounds.
| - (void) resumeAllSounds |
Resume all sounds.
| - (void) resumeSound: | (ALuint) | sourceId |
Resume a sound.
| - (void) resumeSound: | (ALuint) | sourceId |
Resume a sound.
| + (void) setMixerSampleRate: | (Float32) | sampleRate |
Sets the sample rate for the audio mixer.
For best performance this should match the sample rate of your audio content
| + (void) setMixerSampleRate: | (Float32) | sampleRate |
Sets the sample rate for the audio mixer.
For best performance this should match the sample rate of your audio content
| - (void) setSourceGroupEnabled: | (int) | sourceGroupId | |
| enabled: | (BOOL) | enabled | |
| - (void) setSourceGroupEnabled: | (int) | sourceGroupId | |
| enabled: | (BOOL) | enabled | |
| - (void) setSourceGroupNonInterruptible: | (int) | sourceGroupId | |
| isNonInterruptible: | (BOOL) | isNonInterruptible | |
| - (void) setSourceGroupNonInterruptible: | (int) | sourceGroupId | |
| isNonInterruptible: | (BOOL) | isNonInterruptible | |
| - (CDSoundSource *) soundSourceForSound: | (int) | soundId | |
| sourceGroupId: | (int) | sourceGroupId | |
Creates and returns a sound source object for the specified sound within the specified source group.
| - (CDSoundSource *) soundSourceForSound: | (int) | soundId | |
| sourceGroupId: | (int) | sourceGroupId | |
Creates and returns a sound source object for the specified sound within the specified source group.
| - (BOOL) sourceGroupEnabled: | (int) | sourceGroupId |
| - (BOOL) sourceGroupEnabled: | (int) | sourceGroupId |
| - (void) stopAllSounds |
Stops all playing sounds.
| - (void) stopAllSounds |
Stops all playing sounds.
| - (void) stopSound: | (ALuint) | sourceId |
Stops playing a sound.
| - (void) stopSound: | (ALuint) | sourceId |
Stops playing a sound.
| - (void) stopSourceGroup: | (int) | sourceGroupId |
Stops playing a source group.
| - (void) stopSourceGroup: | (int) | sourceGroupId |
Stops playing a source group.
| - (BOOL) unloadBuffer: | (int) | soundId |
| - (BOOL) unloadBuffer: | (int) | soundId |
类成员变量说明
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
| protected |
属性说明
| readwriteatomicassign |
| readatomicassign |
| readatomicassign |
| readatomicassign |
| readwritenonatomicassign |
| readatomicassign |
Total number of source groups that have been defined.
| readatomicassign |
Total number of sources available.
该类的文档由以下文件生成:
- /Users/zeroyang/Documents/github/cocos2d-x/cocos/audio/ios/CocosDenshion.h
- CDSoundEngine
- 生成于 2014年 五月 29日 星期四 09:41:42 , 为 cocos2d-x使用
1.8.6
Instance Methods 继承自 