Bug 48879 - pa_stream_flush() does not reset record stream's readable size
Summary: pa_stream_flush() does not reset record stream's readable size
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-18 07:48 UTC by Andrew Eikum
Modified: 2018-07-30 10:13 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
C source demonstrating bug (5.59 KB, text/plain)
2012-04-18 07:48 UTC, Andrew Eikum
Details

Description Andrew Eikum 2012-04-18 07:48:46 UTC
Created attachment 60256 [details]
C source demonstrating bug

As reported on the mailing list:
http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-April/013328.html

The documentation for pa_stream_flush() reads, "This discards any audio in the buffer." To me, this implies that pa_stream_readable_size() should return 0 after a call to pa_stream_flush(). Tanu Kaskinen on the mailing list agrees, and asked me to report it here.

Attached is a program to demonstrate this failure. On my machine with PulseAudio 1.1:
$ gcc -pthread -lpulse -o test pulse_capture_flush.c
$ ./test
pulse is ready now!
format: 3
rate: 44100
channels: 2
stream is ready now!
pre-sleep avail: 0 bytes
post-cork avail: 349360 bytes
post-flush avail: 349360 bytes
$
Comment 1 GitLab Migration User 2018-07-30 10:13:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/284.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.