Phonations/Joker — pull request #211 by tlecomte (2014-07-08 07:56:53+00:00)
Title: Windows LTC

Dear Joker developers,

This pull request is about LTC sync on Windows.

The current audio input settings cause the LTC decoder to fail permanently on Windows. This is fixed by the following changes:
- first, output the overflow info from PortAudio to help debugging,
- ask PortAudio for a reasonable but non-zero audio latency. On Windows, the zero latency setting causes PortAudio to work on extremely small buffers (a few samples, which makes sense for zero latency!) but leads to permanent overflows in Joker since buffers are read by hundreds of samples... In turns this prevents the LTC decoder from returning meaningful timecodes.
- also switch from 8 bits to 16 bits audio samples. On Windows with a Realtek HD Audio card (quite mainstream) the 8 bits setting produce null samples. This is probably a bug in PortAudio. However, since 16 bits is much more common than 8 bits for audio, using 16 bits is probably safer in general.

Thanks for your attention !