22#include <kiwano/core/Resource.h>
23#include <kiwano-audio/AudioData.h>
114 void Play(
int loop_count = 0);
134 bool IsPlaying()
const;
138 float GetVolume()
const;
143 void SetVolume(
float volume);
151 List<RefPtr<SoundCallback>>& GetCallbacks();
155 const List<RefPtr<SoundCallback>>& GetCallbacks()
const;
171 List<RefPtr<SoundCallback>> callbacks_;
188 callbacks_.push_back(callback);
Definition: Function.h:228
含有本地指针的对象
Definition: NativeObject.hpp:32
引用计数智能指针
Definition: RefBasePtr.hpp:35
资源
Definition: Resource.h:41
音频模块
Definition: Module.h:50
音频回调
Definition: Sound.h:43
virtual float OnVolumeChanged(Sound *sound, float volume)
在音频修改音量时执行
Definition: Sound.h:75
virtual void OnEnd(Sound *sound)
在音频结束时执行
Definition: Sound.h:71
virtual void OnLoopEnd(Sound *sound)
在音频循环结束时执行
Definition: Sound.h:67
virtual void OnStart(Sound *sound)
在音频开始播放时执行
Definition: Sound.h:63
音频播放器
Definition: SoundPlayer.h:39
void AddCallback(RefPtr< SoundCallback > callback)
添加回调
Definition: Sound.h:186
List< RefPtr< SoundCallback > > & GetCallbacks()
获取所有回调
Definition: Sound.h:176