However, in the callback, you simply use the WAV writer as soon as p->capturing is true. Meaning that you might be using an uninitialized WAV (Note that this exact thing happened in the last stream, though the code looked a little different, when you tried to use a debugger).
In
start_capture
, you initialize capturing. You do this by settingp->capturing = true
, and then initializing the WAV writer.https://github.com/tsoding/musializer/blob/9ddb4d26990ee9a7a5354f3ff054fb6f2e350162/src/plug.c#L1260-L1270
However, in the callback, you simply use the WAV writer as soon as
p->capturing
is true. Meaning that you might be using an uninitialized WAV (Note that this exact thing happened in the last stream, though the code looked a little different, when you tried to use a debugger).https://github.com/tsoding/musializer/blob/9ddb4d26990ee9a7a5354f3ff054fb6f2e350162/src/plug.c#L487-L491