Big pile of dependant changes:

* Change pa_memblockq to carry silence memchunk instead of memblock and adapt all users
* Add new call pa_sink_input_get_silence() to get the suitable silence block for a sink input
* Implement monitoring sources properly by adding a delay queue to even out rewinds
* Remove pa_{sink|source}_ping() becaused unnecessary these days and not used
* Fix naming of various rewind related functions. Downstream is now _request_rewind(), upstream is _process_rewind()
* Fix volume adjustments for a single stream in pa_sink_render()
* Properly handle prebuf-style buffer underruns in pa_sink_input
* Don't allow rewinding to more than the last underrun
* Rework default buffering metrics selection for native protocol
* New functions pa_memblockq_prebuf_active(), pa_memblockq_silence()
* add option "mixer_reset=" to module-alsa-sink
* Other cleanups


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2283 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2008-04-20 20:16:55 +00:00
parent 7556ef5bfc
commit 62e7bc17c4
20 changed files with 950 additions and 531 deletions

View file

@ -89,14 +89,14 @@ struct pa_sink {
pa_asyncmsgq *asyncmsgq;
pa_rtpoll *rtpoll;
pa_memblock *silence;
pa_memchunk silence;
pa_usec_t min_latency; /* we won't go below this latency */
pa_usec_t max_latency; /* An upper limit for the latencies */
int (*set_state)(pa_sink *s, pa_sink_state_t state); /* may be NULL */
int (*set_volume)(pa_sink *s); /* dito */
int (*get_volume)(pa_sink *s); /* dito */
int (*set_volume)(pa_sink *s); /* dito */
int (*get_mute)(pa_sink *s); /* dito */
int (*set_mute)(pa_sink *s); /* dito */
pa_usec_t (*get_latency)(pa_sink *s); /* dito */
@ -138,7 +138,6 @@ typedef enum pa_sink_message {
PA_SINK_MESSAGE_GET_LATENCY,
PA_SINK_MESSAGE_GET_REQUESTED_LATENCY,
PA_SINK_MESSAGE_SET_STATE,
PA_SINK_MESSAGE_PING,
PA_SINK_MESSAGE_REMOVE_INPUT_AND_BUFFER,
PA_SINK_MESSAGE_ATTACH,
PA_SINK_MESSAGE_DETACH,
@ -199,13 +198,6 @@ int pa_sink_update_status(pa_sink*s);
int pa_sink_suspend(pa_sink *s, pa_bool_t suspend);
int pa_sink_suspend_all(pa_core *c, pa_bool_t suspend);
void pa_sink_rewind(pa_sink *s, size_t length);
/* Sends a ping message to the sink thread, to make it wake up and
* check for data to process even if there is no real message is
* sent */
void pa_sink_ping(pa_sink *s);
void pa_sink_set_volume(pa_sink *sink, const pa_cvolume *volume);
const pa_cvolume *pa_sink_get_volume(pa_sink *sink);
void pa_sink_set_mute(pa_sink *sink, pa_bool_t mute);
@ -217,14 +209,14 @@ unsigned pa_sink_used_by(pa_sink *s); /* Number of connected streams which are n
/* To be called exclusively by the sink driver, from IO context */
void pa_sink_process_rewind(pa_sink *s);
void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result);
void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result);
void pa_sink_render_into(pa_sink*s, pa_memchunk *target);
void pa_sink_render_into_full(pa_sink *s, pa_memchunk *target);
void pa_sink_skip(pa_sink *s, size_t length);
void pa_sink_process_rewind(pa_sink *s, size_t nbytes);
int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk);
void pa_sink_attach_within_thread(pa_sink *s);