forked from MoonsideGames/FAudioGMS
fix vorbis play region issues
parent
90d71b2c0d
commit
eea6e82e4e
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue