You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TSF library is working really well. However, I notice a significant latency between the note command and the note actually playing. In other MIDI libraries, this issue could be solved by simply reducing the size of a buffer, but I don't find this option in TSF. What could I do to reduce the latency?
The text was updated successfully, but these errors were encountered:
How exactly are you using it? Basically, if you tsf_render_... too much in advance (can be both too much in terms of buffer size, and in terms of time when you let it sit for too long before you move your render result into whatever audio library you're using for actual output) then you'll get latency. Also, I think lowering TSF_RENDER_EFFECTSAMPLEBLOCK and TSF_RENDER_SHORTBUFFERBLOCK could help but I could be wrong, these default to 64 and 512 and the latter needs to be a multiple of the former. (You can define these to new values before including the tsf headers, and that should override it then.) Maybe some of that helps you figure out what is going on?
I have also encountered this issue. I am using it in the android app, and there is a delay from pressing a virtual piano key to hearing the sound.
However, if my sf2 file has a sample rate of 44100, but the code sets it to 48000, there is no delay, but the sound is distorted. This is understandable, but I don't quite understand the principle behind it and don't know how to avoid the delay.
The TSF library is working really well. However, I notice a significant latency between the note command and the note actually playing. In other MIDI libraries, this issue could be solved by simply reducing the size of a buffer, but I don't find this option in TSF. What could I do to reduce the latency?
The text was updated successfully, but these errors were encountered: