My application is to play a single stream with pulseaudio Asynchronous API based on "Main Loop - A minimal but fast implementation based on poll()." implementation . I am going to set up an independent thread for pulseaudio context and the related stream setup and I would like to use "Polled" model instead of "Asynchronous " model to feed the audio raw data .
The point is : data is transferred with pa_stream_write() at "Polled" model at the other thread. Namely , at the other thread , both pa_stream_writable_size() and pa_stream_write() will be executed from time to time . Will it work ?