22#include <kiwano-audio/Sound.h>
23#include <kiwano/base/ObjectBase.h>
29KGE_DECLARE_SMART_PTR(SoundPlayer);
51 size_t Load(
const String& file_path);
63 void Play(
size_t id,
int loop_count = 0);
68 void Pause(
size_t id);
73 void Resume(
size_t id);
83 bool IsPlaying(
size_t id);
87 float GetVolume()
const;
92 void SetVolume(
float volume);
98 size_t GetId(
const String& file_path)
const;
104 size_t GetId(
const Resource& res)
const;
109 SoundPtr GetSound(
size_t id)
const;
130 using SoundMap = Map<size_t, SoundPtr>;
131 SoundMap sound_cache_;
基础对象
Definition: ObjectBase.h:137
资源
Definition: Resource.h:41
音频播放器
Definition: SoundPlayer.h:41