mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
Merge branch 'bugfix/soundstream_contention'
This commit is contained in:
commit
274b9331f0
@ -274,17 +274,21 @@ void SoundStream::streamData()
|
|||||||
m_isStreaming = false;
|
m_isStreaming = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Create the buffers
|
// Create the buffers
|
||||||
alCheck(alGenBuffers(BufferCount, m_buffers));
|
alCheck(alGenBuffers(BufferCount, m_buffers));
|
||||||
for (int i = 0; i < BufferCount; ++i)
|
for (int i = 0; i < BufferCount; ++i)
|
||||||
m_endBuffers[i] = false;
|
m_endBuffers[i] = false;
|
||||||
|
|
||||||
// Fill the queue
|
// Fill the queue
|
||||||
requestStop = fillQueue();
|
requestStop = fillQueue();
|
||||||
|
|
||||||
// Play the sound
|
// Play the sound
|
||||||
alCheck(alSourcePlay(m_source));
|
alCheck(alSourcePlay(m_source));
|
||||||
|
|
||||||
|
{
|
||||||
|
Lock lock(m_threadMutex);
|
||||||
|
|
||||||
// Check if the thread was launched Paused
|
// Check if the thread was launched Paused
|
||||||
if (m_threadStartState == Paused)
|
if (m_threadStartState == Paused)
|
||||||
|
Loading…
Reference in New Issue
Block a user