JuliaAudio / JACKAudio.jl

Access Audio I/O using the JACK Audio Connection Kit from Julia
Other
27 stars 7 forks source link

channels can become out-of-sync #3

Closed ssfrr closed 8 years ago

ssfrr commented 8 years ago

Because I'm using a separate ringbuffer for each channel, it's possible for channels to get de-synced if the callback happens to hit while the read or write is interacting with the ringbuffers. Fix: use a single ringbuffer in each direction and have the reader on each side only act when there's a full block

ssfrr commented 8 years ago

fixed by 3cfbaac

ssfrr commented 8 years ago

Incidentally I didn't use this approach, as it introduces a dependence on the Julia side to know the underlying blocksize. Instead I keep separate per-channel ringbuffers but do a pass through them all before any reads to find the smallest number of samples available, and then read that many from all channels.