[pulseaudio-discuss] pa_simple_read returns 0 data on success
Laxmikant Rashinkar
lk.rashinkar at gmail.com
Sat Mar 17 10:01:24 PDT 2012
Hi,
I'm using the simple API to read from a monitor source like this:
simple = pa_simple_new(NULL, "xrdp", PA_STREAM_RECORD, NULL,
"record", &samp_spec, NULL, NULL, &error);
... perform error checking ...
bytes_read = pa_simple_read(simple, cptr, AUDIO_BUF_SIZE, &error)) < 0)
When audio data is available, pa_simple_read() works fine. But when
there is no audio data available, pa_simple_read() returns with
success, but the data is always 0. My understanding was that pa_simple_read()
would block till data was available.
1) Any idea why this is happening?
2) Is there a way to determine how many bytes were read by pa_simple_read()?
pa_simple_read() always returns zero on success.
thanks
L.K
More information about the pulseaudio-discuss
mailing list