pa_simple_read returns 0 data on success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux