Added Sound::Is[Playable|Playing]
Former-commit-id: 526edb3f87884f45c6b677f44329a90457d3444b
This commit is contained in:
parent
bd98490d9f
commit
4f671db265
|
|
@ -28,6 +28,8 @@ class NAZARA_API NzSound : public NzSoundEmitter
|
||||||
nzSoundStatus GetStatus() const;
|
nzSoundStatus GetStatus() const;
|
||||||
|
|
||||||
bool IsLooping() const;
|
bool IsLooping() const;
|
||||||
|
bool IsPlayable() const;
|
||||||
|
bool IsPlaying() const;
|
||||||
|
|
||||||
bool LoadFromFile(const NzString& filePath, const NzSoundBufferParams& params = NzSoundBufferParams());
|
bool LoadFromFile(const NzString& filePath, const NzSoundBufferParams& params = NzSoundBufferParams());
|
||||||
bool LoadFromMemory(const void* data, std::size_t size, const NzSoundBufferParams& params = NzSoundBufferParams());
|
bool LoadFromMemory(const void* data, std::size_t size, const NzSoundBufferParams& params = NzSoundBufferParams());
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,16 @@ bool NzSound::IsLooping() const
|
||||||
return loop != AL_FALSE;
|
return loop != AL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NzSound::IsPlayable() const
|
||||||
|
{
|
||||||
|
return m_buffer != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool NzSound::IsPlaying() const
|
||||||
|
{
|
||||||
|
return GetStatus() == nzSoundStatus_Playing;
|
||||||
|
}
|
||||||
|
|
||||||
bool NzSound::LoadFromFile(const NzString& filePath, const NzSoundBufferParams& params)
|
bool NzSound::LoadFromFile(const NzString& filePath, const NzSoundBufferParams& params)
|
||||||
{
|
{
|
||||||
std::unique_ptr<NzSoundBuffer> buffer(new NzSoundBuffer);
|
std::unique_ptr<NzSoundBuffer> buffer(new NzSoundBuffer);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue