Ticket #634 (new defect)
pa_simple_read audio cutting out
| Reported by: | fstriley | Owned by: | lennart |
|---|---|---|---|
| Milestone: | Component: | daemon | |
| Keywords: | Cc: |
Description
Application calls pa_simple_new, then loops over:
if (pa_simple_read(g_simple, adbuf, sizeof(adbuf), &err) < 0) {
sprintf (errmsg, "Failed to read %d bytes from PulseAudio: %s", sizeof(adbuf), pa_strerror(err)); return -1;
} fwrite(adbuf, sizeof(adbuf), 1, rawfh);
for about 4 seconds.
The audio file has small time increments cut out. Eg. If I say "I have a watermelon" while in the recording loop. File playback sounds like "I've a watermelon" or "ave a watermelon."
I've tried setting buffer attributes in pa_simple_new call: // pabufatr.maxlength = (uint32_t) -1; // pabufatr.fragsize = (uint32_t) -1; // pabufatr.tlength = (uint32_t) -1; // pabufatr.prebuf = (uint32_t) -1; // pabufatr.minreq = (uint32_t) -1; but pa_simple_new fails when I do so.
Is this normal ? I feel like I should be able to expect such a simple loop to get all the audio. The system (Core 2 Duo @ 1.5GHz each) is doing nothing else during the loop.
Any help would be appreciated.
