mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 05:40:44 +00:00
Update the audio offset when skipping a full update
This commit is contained in:
parent
1a233b08c3
commit
a2f0c1aee6
1 changed files with 3 additions and 2 deletions
|
@ -281,14 +281,15 @@ public:
|
|||
if(!ZMusic_FillStream(MusicStream, buff, len))
|
||||
return false;
|
||||
|
||||
// Offset the measured audio position to account for the skipped samples.
|
||||
audiooffset += skip/framesize;
|
||||
|
||||
if(skip == len)
|
||||
return ZMusic_FillStream(MusicStream, buff, len);
|
||||
memmove(buff, (char*)buff+skip, len-skip);
|
||||
if(!ZMusic_FillStream(MusicStream, (char*)buff+len-skip, skip))
|
||||
memset((char*)buff+len-skip, 0, skip);
|
||||
|
||||
// Offset the measured audio position to account for the skipped samples.
|
||||
audiooffset += skip/framesize;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue