Fix: SoundBuffer should not move (as a refcount)
This commit is contained in:
parent
aa80f52597
commit
85442a14fa
|
|
@ -53,7 +53,7 @@ namespace Nz
|
||||||
SoundBuffer() = default;
|
SoundBuffer() = default;
|
||||||
SoundBuffer(AudioFormat format, UInt64 sampleCount, UInt32 sampleRate, const Int16* samples);
|
SoundBuffer(AudioFormat format, UInt64 sampleCount, UInt32 sampleRate, const Int16* samples);
|
||||||
SoundBuffer(const SoundBuffer&) = delete;
|
SoundBuffer(const SoundBuffer&) = delete;
|
||||||
SoundBuffer(SoundBuffer&&) noexcept = default;
|
SoundBuffer(SoundBuffer&&) = delete;
|
||||||
~SoundBuffer();
|
~SoundBuffer();
|
||||||
|
|
||||||
bool Create(AudioFormat format, UInt64 sampleCount, UInt32 sampleRate, const Int16* samples);
|
bool Create(AudioFormat format, UInt64 sampleCount, UInt32 sampleRate, const Int16* samples);
|
||||||
|
|
@ -75,7 +75,7 @@ namespace Nz
|
||||||
template<typename... Args> static SoundBufferRef New(Args&&... args);
|
template<typename... Args> static SoundBufferRef New(Args&&... args);
|
||||||
|
|
||||||
SoundBuffer& operator=(const SoundBuffer&) = delete;
|
SoundBuffer& operator=(const SoundBuffer&) = delete;
|
||||||
SoundBuffer& operator=(SoundBuffer&&) noexcept = default;
|
SoundBuffer& operator=(SoundBuffer&&) = delete;
|
||||||
|
|
||||||
// Signals:
|
// Signals:
|
||||||
NazaraSignal(OnSoundBufferDestroy, const SoundBuffer* /*soundBuffer*/);
|
NazaraSignal(OnSoundBufferDestroy, const SoundBuffer* /*soundBuffer*/);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace Nz
|
||||||
public:
|
public:
|
||||||
Resource() = default;
|
Resource() = default;
|
||||||
Resource(const Resource&) = default;
|
Resource(const Resource&) = default;
|
||||||
Resource(Resource&&) = default;
|
Resource(Resource&&) noexcept = default;
|
||||||
virtual ~Resource();
|
virtual ~Resource();
|
||||||
|
|
||||||
const String& GetFilePath() const;
|
const String& GetFilePath() const;
|
||||||
|
|
@ -25,7 +25,7 @@ namespace Nz
|
||||||
void SetFilePath(const String& filePath);
|
void SetFilePath(const String& filePath);
|
||||||
|
|
||||||
Resource& operator=(const Resource&) = default;
|
Resource& operator=(const Resource&) = default;
|
||||||
Resource& operator=(Resource&&) = default;
|
Resource& operator=(Resource&&) noexcept = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
String m_filePath;
|
String m_filePath;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue