From eea6e82e4e1b9d0827df2d496bbfee95b65db754 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 3 Nov 2021 21:42:37 -0700 Subject: [PATCH] fix vorbis play region issues --- src/FAudioGMS.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FAudioGMS.c b/src/FAudioGMS.c index de93c8e..77e0f40 100644 --- a/src/FAudioGMS.c +++ b/src/FAudioGMS.c @@ -944,7 +944,7 @@ static void FAudioGMS_INTERNAL_SoundInstance_AddBuffer(FAudioGMS_SoundInstance* { if (instance->loop) { - stb_vorbis_seek_frame(instance->soundData.streamingSound.fileHandle, instance->playBegin); + stb_vorbis_seek(instance->soundData.streamingSound.fileHandle, instance->playBegin); } else { @@ -1116,7 +1116,7 @@ static void FAudioGMS_INTERNAL_SoundInstance_Stop(FAudioGMS_SoundInstance* insta if (!instance->isStatic) { - stb_vorbis_seek_frame(instance->soundData.streamingSound.fileHandle, instance->playBegin); /* back to the start */ + stb_vorbis_seek(instance->soundData.streamingSound.fileHandle, instance->playBegin); /* back to the start */ FAudioGMS_INTERNAL_SoundInstance_AddBuffer(instance); /* preload so we dont stutter on play */ } } @@ -1313,7 +1313,7 @@ void FAudioGMS_SoundInstance_SetPlayRegion(double soundInstanceID, double startI else if (!instance->isStatic) { FAudioSourceVoice_FlushSourceBuffers(instance->voice.handle); - stb_vorbis_seek_frame(instance->soundData.streamingSound.fileHandle, instance->playBegin); + stb_vorbis_seek(instance->soundData.streamingSound.fileHandle, instance->playBegin); FAudioGMS_INTERNAL_SoundInstance_AddBuffer(instance); } }