mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 07:35:40 +00:00
Removed setting of writeWrapped to false always on buffer under-run when underRunLoop is true as this is wrong. Suspect this may have been causing looping bug.
This commit is contained in:
parent
de3e56fc96
commit
b25cbb2391
|
@ -61,11 +61,8 @@ static void PlayCallback(void *data, Uint8 *stream, int len)
|
|||
|
||||
// Check if play position has moved past end of buffer
|
||||
if (playPos >= audioBufferSize)
|
||||
{
|
||||
// If so, wrap it around to beginning again and reset write wrapped flag
|
||||
// If so, wrap it around to beginning again (but keep write wrapped flag as before)
|
||||
playPos -= audioBufferSize;
|
||||
writeWrapped = false;
|
||||
}
|
||||
else
|
||||
// Otherwise, set write wrapped flag as will now appear as if write has wrapped but play position has not
|
||||
writeWrapped = true;
|
||||
|
@ -243,11 +240,8 @@ void OutputAudio(unsigned numSamples, INT16 *leftBuffer, INT16 *rightBuffer)
|
|||
|
||||
// Check if play position has moved past end of buffer
|
||||
if (playPos >= audioBufferSize)
|
||||
{
|
||||
// If so, wrap it around to beginning again and reset write wrapped flag
|
||||
// If so, wrap it around to beginning again (but keep write wrapped flag as before)
|
||||
playPos -= audioBufferSize;
|
||||
writeWrapped = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise, set write wrapped flag as will now appear as if write has wrapped but play position has not
|
||||
|
|
Loading…
Reference in a new issue