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
// TODO: Document decision: available() seems like a good candidate, but cannot be used in this case,
// because AudioFloatInputStreamResampler will always return 0 (probably because trying to calculate any meaningful
// value is quite hard given the different byte rates of the input and output streams).
// Furthermore, available() is some kind of 'best guess' method that is not very reliable.
// For instance, with Open microphone streams, it will show the amount of bytes for half a second as available,
// even though in reality it's much more.
// Anyway, there is a better option: always keep a little buffer ourselves that we can read from directly and
// just refill in the background (other thread) when needed. That other thread may be blocking, no problem,
// so no need to check available(), reading will be done when it's done.
// Only downside is: no option to fill a step partly. Decision: when the custom buffer is not ready, too bad, we just take
// only silence.
// TODO: maybe differentiate for live / non-live? Both in buffer size / refill policy and what to do when empty / not ready.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: