I'm working on a simple sine wave audio generator, using libpulse on Ubuntu 20.04.
It's using the pa_stream_begin_write
and pa_stream_write
functions within a callback function set up using:
pa_stream_set_write_callback(stream, stream_write_cb, &u);
It works, I get 30 seconds of sine wave coming out of the speakers.
Each time the stream_write_cb
callback function is called I use it to load up another chunk of sine wave data.
But, what happens at exactly 30 seconds?
enum pa_operation_state opState = pa_operation_get_state(o);
The opState
changes to PA_OPERATION_DONE
, and I don't know why.
It happens at exactly 30 seconds of audio playback - so it feels like there is an internal libpulse timeout thing going on.
Anyone have any ideas how to prevent the timeout happening?