mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 16:59:06 +00:00
Lock sound timer thread.
svn-id: r23340
This commit is contained in:
parent
d954c5ebd5
commit
5e7d109e3c
@ -43,6 +43,14 @@ static GPSOUNDBUF soundBuf;
|
||||
// polls the current playing position within the buffer.
|
||||
|
||||
static void soundTimer() {
|
||||
static int locked = false;
|
||||
|
||||
if (locked) {
|
||||
return;
|
||||
}
|
||||
|
||||
locked = true;
|
||||
|
||||
unsigned int sampleshiftVal = soundBuf.samples << shiftVal;
|
||||
unsigned int t = (((unsigned int)(*soundPos) - (unsigned int)buffer) >> shiftVal) >= soundBuf.samples ? 1 : 0;
|
||||
if (t != frame) {
|
||||
@ -90,6 +98,8 @@ static void soundTimer() {
|
||||
} while ((uint32)d < max);
|
||||
}
|
||||
}
|
||||
|
||||
locked = false;
|
||||
}
|
||||
|
||||
int gp_soundBufStart(GPSOUNDBUF *sb) {
|
||||
|
Loading…
Reference in New Issue
Block a user