Make Sound FilesystemAppComponent-compliant

This commit is contained in:
SweetId
2024-03-11 19:37:35 -04:00
parent 4199582a52
commit e306a66956
2 changed files with 20 additions and 15 deletions

View File

@@ -17,6 +17,8 @@ namespace Nz
class NAZARA_AUDIO_API Sound final : public SoundEmitter
{
public:
using Params = SoundBufferParams;
using SoundEmitter::SoundEmitter;
Sound();
Sound(AudioDevice& audioDevice, std::shared_ptr<SoundBuffer> soundBuffer);
@@ -36,9 +38,9 @@ namespace Nz
bool IsLooping() const override;
bool IsPlayable() const;
bool LoadFromFile(const std::filesystem::path& filePath, const SoundBufferParams& params = SoundBufferParams());
bool LoadFromMemory(const void* data, std::size_t size, const SoundBufferParams& params = SoundBufferParams());
bool LoadFromStream(Stream& stream, const SoundBufferParams& params = SoundBufferParams());
static std::shared_ptr<Sound> LoadFromFile(const std::filesystem::path& filePath, const Params& params = {});
static std::shared_ptr<Sound> LoadFromMemory(const void* data, std::size_t size, const Params& params = {});
static std::shared_ptr<Sound> LoadFromStream(Stream& stream, const Params& params = {});
void Pause() override;
void Play() override;