fix vorbis play region issues

main
cosmonaut 2021-11-03 21:42:37 -07:00
parent 90d71b2c0d
commit eea6e82e4e
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}