cocos2d-x 3.0
- 首页 - 相关页面 - 模块 - 命名空间 - - 文件 -
Instance Methods - 图1 Instance Methods - 图2)
- 类列表 - 类索引 - 类继承关系 - 类成员

全部)) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义)))

Instance Methods | Public 属性 | Protected 属性 | 属性 | 所有成员列表

CDLongAudioSource类 参考

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. 更多…

#import

类 CDLongAudioSource 继承关系图:

Instance Methods - 图3 <CDAudioInterruptProtocol> <CDAudioInterruptProtocol>

## Instance Methods
(void) - load:
加载文件到音频源中 更多…
(void) - play
播放音频源 更多…
(void) - stop
停止播放音频源 更多…
(void) - pause
暂停播放音频源 更多…
(void) - rewind
将音频源倒放 更多…
(void) - resume
恢复暂停播放的音频源 更多…
(BOOL) - isPlaying
音频源是否在播放中 更多…
(void) - load:
Loads the file into the audio source. 更多…
(void) - play
Plays the audio source. 更多…
(void) - stop
Stops playing the audio soruce. 更多…
(void) - pause
Pauses the audio source. 更多…
(void) - rewind
Rewinds the audio source. 更多…
(void) - resume
Resumes playing the audio source if it was paused. 更多…
(BOOL) - isPlaying
Returns whether or not the audio source is playing. 更多…
- 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. 更多…
## Public 属性
BOOL systemPaused
NSTimeInterval systemPauseLocation
## Protected 属性
BOOL mute
BOOL enabled_
BOOL stopped
tLongAudioSourceState state
## 属性
AVAudioPlayer audioSourcePlayer
NSString audioSourceFilePath
NSInteger numberOfLoops
float volume
id< CDLongAudioSourceDelegate > delegate
BOOL backgroundMusic
BOOL paused

详细描述

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. CDLongAudioSource表示的是需要花费较长时间来加载音频文件到内存中,并且使用CDSoundEngine来播放的音频源。比如: 背景音乐或者叙述性的语音。这类的语音文件有可能被压缩,目前的设备只能硬解码单个的这类文件,如果同时播放多个这类 文件只能通过软解码来代替。

  • 自从
  • v0.99

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.

  • 自从
  • v0.99

Method Documentation

- (BOOL) isPlaying

Returns whether or not the audio source is playing.

- (BOOL) isPlaying

音频源是否在播放中

- (void) load: (NSString *) filePath

Loads the file into the audio source.

- (void) load: (NSString *) filePath

加载文件到音频源中

- (void) pause

Pauses the audio source.

- (void) pause

暂停播放音频源

- (void) play

Plays the audio source.

- (void) play

播放音频源

- (void) resume

Resumes playing the audio source if it was paused.

- (void) resume

恢复暂停播放的音频源

- (void) rewind

Rewinds the audio source.

- (void) rewind

将音频源倒放

- (void) stop

Stops playing the audio soruce.

- (void) stop

停止播放音频源

类成员变量说明

- (BOOL) enabled_

protected

- (BOOL) mute

protected

- (tLongAudioSourceState) state

protected

- (BOOL) stopped

protected

- (BOOL) systemPaused

- (NSTimeInterval) systemPauseLocation

属性说明

- (NSString *) audioSourceFilePath

readatomicassign

- (AVAudioPlayer *) audioSourcePlayer

readatomicassign

- (BOOL) backgroundMusic

readwritenonatomicassign

- (id< CDLongAudioSourceDelegate >) delegate

readwriteatomicassign

- (NSInteger) numberOfLoops

readwritenonatomicassign

- (BOOL) paused

readatomicassign

- (float) volume

readwritenonatomicassign


该类的文档由以下文件生成:

  • CDLongAudioSource
  • 生成于 2014年 五月 29日 星期四 09:41:42 , 为 cocos2d-x使用 doxygen 1.8.6