Questions: Audio Programming Fundamentals

4 questions to test your understanding

Score: 0 / 4
Question 1 Multiple Choice

Why can the audio callback thread not use mutex locks or dynamic memory allocation?

AAudio threads have a lower execution priority that makes locks unavailable
BBoth operations have unpredictable timing — a blocked mutex or heap allocation can cause the callback to miss its deadline, producing audio dropouts
CMemory allocation is prohibited in audio APIs by specification
DMutex locks introduce phase distortion in the audio signal
Question 2 True / False

True or false: FFT-based audio processing introduces latency proportional to the FFT block size.

TTrue
FFalse
Question 3 Short Answer

What is a circular buffer, and why is it essential for audio programming?

Think about your answer, then reveal below.
Question 4 Multiple Choice

In a VST plugin, how should parameter changes from the GUI thread be communicated to the audio callback thread safely?

ADirectly modify the audio thread's parameter variables from the GUI thread — modern CPUs handle this safely
BUse a mutex lock to protect shared parameter variables between threads
CUse lock-free data structures (atomic variables or a FIFO message queue) to pass parameter changes to the audio thread
DStore parameter changes in a file that the audio thread polls