Delay after FIRST record
RandomVertebrate opened this issue · comments
Transition to playing from recording of the FIRST loop is not seamless; there is a half-second-ish delay. This is probably due to the time taken to write the audio to the loop and initialize things. Solution might be non-trivial.
sd-cards are known not be slow, maybe putting raspios on a ram-disk can speed up the write process?
the volumio mediaplayer does this. another advantage of a ramdisk thingie is, that the looper can be powered off anytime without a worry, because all os-data is fresh copied from kinda template with every boot, so os-data cannot be messed up by the power off.
i think it's worth a try, the audio framework of your project is quite complex, because it handles pulse plus alsa plus python.
to say everything audio is happening on ram can be kinda brave ;)
i can imagine there is some buffernig mechanics inside asla/pulse you cannot manipulate/handle inside python.
to me it seems this has been a topic in the volumio cummunity since their beginning, mainly because they have to deal with tons of different hifi-hardware rigs by beeing high quality audiophile freaks.
This issue is fixed now. I did it essentially by removing the "special" initialization method that only loop 1 was using. Loop 1 now uses the same function as all the other tracks for initialization.