pulseaudio/src/pulse
Tanu Kaskinen dfd44036b5 pulse: Fix hole handling in pa_stream_peek().
Previously, if there was a hole in a recording stream,
pa_stream_peek() would crash. Holes could be handled silently inside
pa_stream_peek() by generating silence (wouldn't work for compressed
streams, though) or by skipping any holes. However, I think it's
better to let the caller decide how the holes should be handled, so
in case of holes, pa_stream_peek() will return NULL data pointer and
the length of the hole in the nbytes argument.

This change is technically an interface break, because previously the
documentation didn't mention the possibility of holes that need
special handling. However, since holes caused crashing anyway in the
past, it's not a regression if applications keep misbehaving due to
not handing holes properly.

Some words about when holes can appear in recording streams: I think
it would be reasonable behavior if overruns due to the application
reading data too slowly would cause holes. Currently that's not the
case - overruns will just cause audio to be skipped. But the point is
that this might change some day. I'm not sure how holes can occur
with the current code, but as the linked bug shows, they can happen.
It's most likely due to recording from a monitor source where the
thing being monitored has holes in its playback stream.

BugLink: http://bugs.launchpad.net/bugs/1058200
2012-11-08 15:38:32 +01:00
..
.gitignore add another .gitignore file, this time for pulse/ 2008-06-18 00:47:32 +02:00
cdecl.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
channelmap.c Move i18n.[ch] to src/pulsecore 2011-08-11 13:23:42 +02:00
channelmap.h doc: Add some more doxygen tags to existing comments 2011-10-04 09:40:05 +01:00
client-conf-x11.c Move i18n.[ch] to src/pulsecore 2011-08-11 13:23:42 +02:00
client-conf-x11.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
client-conf.c conf-parser: Add support for parsing property lists. 2012-06-29 13:23:07 +03:00
client-conf.h client: introduce auto-connect-display= following the scheme of auto-connect-localhost= 2010-01-13 22:15:52 +01:00
client.conf.in client.conf.in: Typo. s/a/are/ 2010-02-02 09:02:21 +01:00
context.c context: get rid of really old runtime dir logic, i.e. break compat with >4y-old PA 2012-05-15 16:24:22 +02:00
context.h fix the ever-popular 'the the' typo 2012-01-28 17:51:59 +02:00
def.h introspect: Expose port info per card to clients 2012-03-11 12:23:46 +05:30
error.c error: Fix spelling of 'initialization' in errortab for PA_ERR_MODINITFAILED 2011-12-12 23:57:54 +00:00
error.h Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
ext-device-manager.c Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
ext-device-manager.h Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
ext-device-restore.c Squash the last gcc warnings 2011-09-03 12:17:13 +02:00
ext-device-restore.h device-restore: Change the API to include type information (sink vs. source) 2011-08-18 17:33:08 +01:00
ext-stream-restore.c Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
ext-stream-restore.h Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
fork-detect.c add pa_assert_cc() for compile time assertions 2009-03-23 21:03:52 +01:00
fork-detect.h try to detect when stupid clients forks and refuse all service from then on 2009-03-05 04:33:40 +01:00
format.c format: Allow format->sample spec conversion for compressed formats 2012-03-05 20:30:33 +05:30
format.h format: Allow format->sample spec conversion for compressed formats 2012-03-05 20:30:33 +05:30
gccmacro.h gccmacro: Disable printf-like format checking on mingw32 compilers. 2012-10-23 15:50:23 +05:30
glib-mainloop.c glib: Stop using g_source_get_current_time() 2012-06-28 20:00:00 +05:30
glib-mainloop.h doxygen: Add 'See also' linking to the overview page 2010-10-13 09:07:39 +01:00
internal.h format: Allow format->sample spec conversion for compressed formats 2012-03-05 20:30:33 +05:30
introspect.c introspect: Add functions to handle the latency offset. 2012-06-30 14:41:08 +03:00
introspect.h introspect: Minor documentation fix 2012-11-08 14:57:48 +05:30
mainloop-api.c Move i18n.[ch] to src/pulsecore 2011-08-11 13:23:42 +02:00
mainloop-api.h Spelling fixes in public headers 2011-08-25 11:27:35 +01:00
mainloop-signal.c Move i18n.[ch] to src/pulsecore 2011-08-11 13:23:42 +02:00
mainloop-signal.h Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
mainloop.c core: Proper poll() emulation to fix pacat and friends on Windows 2012-10-30 16:22:18 +05:30
mainloop.h doxygen: Add 'See also' linking to the overview page 2010-10-13 09:07:39 +01:00
Makefile build-sys: readd stub makefiles to subdirectories to make building with emacs easier 2012-05-15 14:17:58 +02:00
operation.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
operation.h client: extend documentation on pa_operation_cancel() a bit 2009-08-03 23:07:59 +02:00
proplist.c proplist: Change proplist_name_valid() to be public function pa_proplist_key_valid(). 2012-06-29 12:58:44 +03:00
proplist.h proplist: Change proplist_name_valid() to be public function pa_proplist_key_valid(). 2012-06-29 12:58:44 +03:00
pulseaudio.h pulse: Document general error handling. 2012-01-28 15:07:20 +02:00
rtclock.c Add sys/time.h include to rtclock.c 2011-06-24 00:29:47 +01:00
rtclock.h Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
sample.c Move i18n.[ch] to src/pulsecore 2011-08-11 13:23:42 +02:00
sample.h Spelling fixes in public headers 2011-08-25 11:27:35 +01:00
scache.c Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
scache.h doxygen: Add 'See also' linking to the overview page 2010-10-13 09:07:39 +01:00
simple.c Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
simple.h simple: Fix typos in simple.h doxygen documentation 2011-12-12 23:57:54 +00:00
stream.c pulse: Fix hole handling in pa_stream_peek(). 2012-11-08 15:38:32 +01:00
stream.h pulse: Fix hole handling in pa_stream_peek(). 2012-11-08 15:38:32 +01:00
subscribe.c Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
subscribe.h doc: Document subscription events better 2011-07-27 21:52:32 +05:30
thread-mainloop.c Move i18n.[ch] to src/pulsecore 2011-08-11 13:23:42 +02:00
thread-mainloop.h mainloop: Fix typos and rewording of thread-mainloop.h doxygen documentation 2011-12-12 23:57:55 +00:00
timeval.c More spelling fixes 2011-08-25 11:27:47 +01:00
timeval.h Spelling fixes in public headers 2011-08-25 11:27:35 +01:00
utf8.c Do something sensible when compiled without iconv support 2011-10-11 22:48:21 +05:30
utf8.h utf8: Fix doxygen file description for utf8.h 2011-12-12 23:57:54 +00:00
util.c win32: Make some unused-variable warnings go away 2011-06-24 00:34:05 +01:00
util.h Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
version.h.in libpulse: Always return a three part version number in API calls. 2011-10-01 13:21:03 +01:00
volume.c Move i18n.[ch] to src/pulsecore 2011-08-11 13:23:42 +02:00
volume.h pulse: Fix for volume documentation 2012-10-24 10:55:45 +05:30
xmalloc.c Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
xmalloc.h malloc: implement pa_xrenew() 2009-06-17 03:07:42 +02:00