How to vary PortAudio latency?

Viewed 121

I am trying to vary the latency within

spitimeframevisualizervoronoitransparentwin32.txt (from .cpp)

and thought it was adjustable via line 555 (+/- 2)!

Line I tweaked the value of for changing latency:

char buffer[1024];

Varying this value does not appear to change latency!

Am I not at the right spot?

1 Answers

Search for FRAMES_PER_BUFFER in your project's .cpp and .h files

Google search portaudio latency for more details (http://www.portaudio.com/docs/latency.html)

The real-time latency of the playback and/or recording, in a portaudio-based app, is defined by the value framesPerBuffer that is received in the callback function renderaudio().

But you don't modify the value of this variable within this renderaudio() callback function.

Instead, you have the option to set the number of frames per buffer passed to this function, as a constant value in time, when modifying the line #define FRAMES_PER_BUFFER (some number like 64, 128, 256, 512, 1024, etc.)

If you want to set a minimal latency that is allowed to vary over time, you can read further the following portaudio documentation bit here at http://www.portaudio.com/docs/latency.html

Good luck!

Related