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
With the way that the node addon is currently setup in symboxtra/SplitSound, the WebAudio ScriptProcessor node clocks its reads at a perfect rate as HulaLoop ring buffer is filled. This is desirable because we never get underflow or overflow or have to sleep, but it creates a problem if we ever miss a read or slow down, which inevitably happens.
Once the ring buffer fills during that hiccup, the reader will never catch back up to real time. Right now, this can introduce up to ~.8s of latency into the stream which will remain until the ring buffer is drained.
This would apply to other clients as well and would prevent their buffers from getting stale.
TODO
Add a setting to HulaAudioSettings that sets the aggressiveness of this feature
Default to the least aggressive mode
Add a getReadAvailable() method to HulaRingBuffer that returns the number of available samples
Add a check in NodeAddon::readBuffer that watches for build up that exceeds the threshold determined by the aggressiveness setting
Possible thresholds
Percentage of buffer that should be allowed to be full. Range: [.1, 1.0] if readAvailable >= thresh * bufferSize: drainBuffer
With the way that the node addon is currently setup in symboxtra/SplitSound, the WebAudio
ScriptProcessor
node clocks its reads at a perfect rate as HulaLoop ring buffer is filled. This is desirable because we never get underflow or overflow or have to sleep, but it creates a problem if we ever miss a read or slow down, which inevitably happens.Once the ring buffer fills during that hiccup, the reader will never catch back up to real time. Right now, this can introduce up to ~.8s of latency into the stream which will remain until the ring buffer is drained.
This would apply to other clients as well and would prevent their buffers from getting stale.
TODO
HulaAudioSettings
that sets the aggressiveness of this featuregetReadAvailable()
method toHulaRingBuffer
that returns the number of available samplesNodeAddon::readBuffer
that watches for build up that exceeds the threshold determined by the aggressiveness settingPossible thresholds
[.1, 1.0]
if readAvailable >= thresh * bufferSize: drainBuffer
Related to: symboxtra/SplitSound#1
The text was updated successfully, but these errors were encountered: