Audio: Minor fixes
This commit is contained in:
@@ -308,7 +308,7 @@ namespace Nz
|
||||
|
||||
std::shared_ptr<SoundStream> LoadSoundStreamStream(Stream& stream, const SoundStreamParams& parameters)
|
||||
{
|
||||
std::unique_ptr<sndfileStream> soundStream(new sndfileStream);
|
||||
std::shared_ptr<sndfileStream> soundStream = std::make_shared<sndfileStream>();
|
||||
if (!soundStream->Open(stream, parameters.forceMono))
|
||||
{
|
||||
NazaraError("Failed to open music stream");
|
||||
|
||||
@@ -497,9 +497,9 @@ namespace Nz
|
||||
void Music::StopThread()
|
||||
{
|
||||
if (m_impl->streaming)
|
||||
{
|
||||
m_impl->streaming = false;
|
||||
|
||||
if (m_impl->thread.joinable())
|
||||
m_impl->thread.join();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,15 +119,6 @@ namespace Nz
|
||||
return m_buffer != nullptr;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Checks whether the sound is playing
|
||||
* \return true if it is the case
|
||||
*/
|
||||
bool Sound::IsPlaying() const
|
||||
{
|
||||
return GetStatus() == SoundStatus::Playing;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Loads the sound from file
|
||||
* \return true if loading is successful
|
||||
|
||||
Reference in New Issue
Block a user