hhyyrylainen / Leviathan

Leviathan Game Engine
Other
17 stars 8 forks source link

VideoPlayer audio stutters #31

Closed hhyyrylainen closed 5 years ago

hhyyrylainen commented 5 years ago

The approach with the audio callback (in the audio thread) trying to also read the file and decode audio when it has nothing to play seems to result in stuttering audio.

A fix for this is needed.

Initial idea: make the video frame decoding decode up to 10 future frames and make buffers of audio chunks for the audio thread to play, which will hopefully then always be able to quickly get audio data to play.