Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Avoiding dropout in a time-consuming on_endofplayback()/on_endoftrack() function (Read 1225 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Avoiding dropout in a time-consuming on_endofplayback()/on_endoftrack() function

Dear community!
Currently I'm trying to improve the great foo_vst component by adding proper latency support. I'm listening to a lot of vinyl with iZotopes RX declicker plugin in the chain. This plugin has a latency of about 3 seconds, is quite CPU consuming, and is reporting it's latency correctly via the vst interface. The idea is to process the last 3 seconds on a plsylist in on_endofplayback() by processing the vst effect n times with the chunk-size used also in on_chunk() and using insert_chunk() in a loop.
I was hoping that insert_chunk() works asynchronoulsy, i.e. every chunk delivered by insert_chunk() is immedialetly ready for playback. But it seems that all chunks inserted are ready only after leaving on_endofplayback(). So this might be the reason for the short dropout.

So is there a possibility to make inserted chunks ready for playback immediately and still stay in on_endofplayback()?
Or maybe tell foobar that the plugin needs x more samples so that it continues calling on_chunk() for additional x samples at the end of the playlist? Then I could even easily process vst tails correctly.

Thank you for any helpful comments in advance.
Chris