Upgrade NazaraAudio

This commit is contained in:
Jérôme Leclercq
2021-05-22 18:20:27 +02:00
parent a52103a641
commit b936946154
13 changed files with 206 additions and 243 deletions

View File

@@ -10,7 +10,6 @@
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Audio/Config.hpp>
#include <Nazara/Audio/Enums.hpp>
#include <Nazara/Core/ObjectRef.hpp>
#include <Nazara/Core/Resource.hpp>
#include <Nazara/Core/ResourceLoader.hpp>
#include <Nazara/Core/ResourceParameters.hpp>
@@ -29,12 +28,9 @@ namespace Nz
class SoundStream;
using SoundStreamLoader = ResourceLoader<SoundStream, SoundStreamParams>;
using SoundStreamRef = Nz::ObjectRef<SoundStream>;
class NAZARA_AUDIO_API SoundStream : public RefCounted, public Resource
class NAZARA_AUDIO_API SoundStream : public Resource
{
friend SoundStreamLoader;
public:
SoundStream() = default;
virtual ~SoundStream();
@@ -49,12 +45,9 @@ namespace Nz
virtual void Seek(UInt64 offset) = 0;
virtual UInt64 Tell() = 0;
static SoundStreamRef OpenFromFile(const std::filesystem::path& filePath, const SoundStreamParams& params = SoundStreamParams());
static SoundStreamRef OpenFromMemory(const void* data, std::size_t size, const SoundStreamParams& params = SoundStreamParams());
static SoundStreamRef OpenFromStream(Stream& stream, const SoundStreamParams& params = SoundStreamParams());
private:
static SoundStreamLoader::LoaderList s_loaders;
static std::shared_ptr<SoundStream> OpenFromFile(const std::filesystem::path& filePath, const SoundStreamParams& params = SoundStreamParams());
static std::shared_ptr<SoundStream> OpenFromMemory(const void* data, std::size_t size, const SoundStreamParams& params = SoundStreamParams());
static std::shared_ptr<SoundStream> OpenFromStream(Stream& stream, const SoundStreamParams& params = SoundStreamParams());
};
}