diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-04-20 20:16:55 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-04-20 20:16:55 +0000 |
commit | 62e7bc17c41c5542779a3c395a9d47d2bd306de2 (patch) | |
tree | 4445167f4164a8af45438519fee8202c14a35892 /src/pulsecore/source.h | |
parent | 7556ef5bfc37c99064d95857626bcf9f20423c70 (diff) |
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
Diffstat (limited to 'src/pulsecore/source.h')
-rw-r--r-- | src/pulsecore/source.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h index ab7236eb..b8859c84 100644 --- a/src/pulsecore/source.h +++ b/src/pulsecore/source.h @@ -91,6 +91,8 @@ struct pa_source { pa_asyncmsgq *asyncmsgq; pa_rtpoll *rtpoll; + pa_memchunk silence; + pa_usec_t min_latency; /* we won't go below this latency setting */ pa_usec_t max_latency; /* An upper limit for the latencies */ @@ -112,6 +114,10 @@ struct pa_source { pa_bool_t requested_latency_valid; size_t requested_latency; + + /* Then number of bytes this source will be rewound for at + * max */ + size_t max_rewind; } thread_info; void *userdata; @@ -130,7 +136,6 @@ typedef enum pa_source_message { PA_SOURCE_MESSAGE_GET_LATENCY, PA_SOURCE_MESSAGE_GET_REQUESTED_LATENCY, PA_SOURCE_MESSAGE_SET_STATE, - PA_SOURCE_MESSAGE_PING, PA_SOURCE_MESSAGE_ATTACH, PA_SOURCE_MESSAGE_DETACH, PA_SOURCE_MESSAGE_MAX @@ -189,8 +194,6 @@ int pa_source_update_status(pa_source*s); int pa_source_suspend(pa_source *s, pa_bool_t suspend); int pa_source_suspend_all(pa_core *c, pa_bool_t suspend); -void pa_source_ping(pa_source *s); - void pa_source_set_volume(pa_source *source, const pa_cvolume *volume); const pa_cvolume *pa_source_get_volume(pa_source *source); void pa_source_set_mute(pa_source *source, pa_bool_t mute); @@ -203,6 +206,7 @@ unsigned pa_source_used_by(pa_source *s); /* Number of connected streams that ar /* To be called exclusively by the source driver, from IO context */ void pa_source_post(pa_source*s, const pa_memchunk *b); +void pa_source_process_rewind(pa_source *s, size_t nbytes); int pa_source_process_msg(pa_msgobject *o, int code, void *userdata, int64_t, pa_memchunk *chunk); @@ -211,6 +215,8 @@ void pa_source_detach_within_thread(pa_source *s); pa_usec_t pa_source_get_requested_latency_within_thread(pa_source *s); +void pa_source_set_max_rewind(pa_source *s, size_t max_rewind); + /* To be called exclusively by source output drivers, from IO context */ void pa_source_invalidate_requested_latency(pa_source *s); |