Update Music to use correct Resource API

This commit is contained in:
SweetId
2024-03-11 17:15:27 -04:00
parent cc91b8d3b9
commit cc2c36c75d
2 changed files with 31 additions and 16 deletions

View File

@@ -25,6 +25,8 @@ namespace Nz
class NAZARA_AUDIO_API Music final : public Resource, public SoundEmitter
{
public:
using Params = SoundStreamParams;
Music();
Music(AudioDevice& device);
Music(const Music&) = delete;
@@ -46,9 +48,9 @@ namespace Nz
bool IsLooping() const override;
bool OpenFromFile(const std::filesystem::path& filePath, const SoundStreamParams& params = SoundStreamParams());
bool OpenFromMemory(const void* data, std::size_t size, const SoundStreamParams& params = SoundStreamParams());
bool OpenFromStream(Stream& stream, const SoundStreamParams& params = SoundStreamParams());
static std::shared_ptr<Music> OpenFromFile(const std::filesystem::path& filePath, const Params& params = Params());
static std::shared_ptr<Music> OpenFromMemory(const void* data, std::size_t size, const Params& params = Params());
static std::shared_ptr<Music> OpenFromStream(Stream& stream, const Params& params = Params());
void Pause() override;
void Play() override;