mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
Made the sound less choppy. Though we may have to do some kind of double
buffering here to completely fix the problem. svn-id: r31627
This commit is contained in:
parent
bd1cee2104
commit
179479f6f4
@ -50,6 +50,12 @@ void PmvPlayer::play(const char *filename) {
|
||||
|
||||
//FILE *raw = fopen("track.raw", "wb");
|
||||
|
||||
uint32 frameCount = 0;
|
||||
|
||||
// TODO: Sound can still be a little choppy. A bug in the decoder or -
|
||||
// perhaps more likely - do we have to implement double buffering to
|
||||
// get it to work well?
|
||||
|
||||
while (!_abort && !_fd->eof()) {
|
||||
|
||||
readChunk(chunkType, chunkSize);
|
||||
@ -100,7 +106,11 @@ void PmvPlayer::play(const char *filename) {
|
||||
|
||||
delete[] frameData;
|
||||
|
||||
_system->delayMillis(frameDelay);
|
||||
frameCount++;
|
||||
|
||||
while (_mixer->getSoundElapsedTime(_audioStreamHandle) < frameCount * frameDelay) {
|
||||
_system->delayMillis(10);
|
||||
}
|
||||
}
|
||||
|
||||
_audioStream->finish();
|
||||
|
Loading…
x
Reference in New Issue
Block a user