From 5e9295037f073fc768c1011253685ef35dba6331 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 29 Jul 2006 15:06:49 +0000 Subject: * implement "hot" moving of playback streams between sinks (pa_sink_input_move_to()). * optimize the adjusting of the volume in pa_sink_input_peek() a little git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1168 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/sink-input.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/pulsecore/sink-input.h') diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h index 60105d31..b1971d0a 100644 --- a/src/pulsecore/sink-input.h +++ b/src/pulsecore/sink-input.h @@ -55,6 +55,11 @@ struct pa_sink_input { pa_channel_map channel_map; pa_cvolume volume; + + /* Some silence to play before the actual data. This is used to + * compensate for latency differences when moving a sink input + * "hot" between sinks. */ + size_t move_silence; int (*peek) (pa_sink_input *i, pa_memchunk *chunk); void (*drop) (pa_sink_input *i, const pa_memchunk *chunk, size_t length); @@ -66,6 +71,11 @@ struct pa_sink_input { pa_memchunk resampled_chunk; pa_resampler *resampler; + + int variable_rate; + pa_resample_method_t resample_method; + + pa_memblock *silence_memblock; }; pa_sink_input* pa_sink_input_new( @@ -76,7 +86,7 @@ pa_sink_input* pa_sink_input_new( const pa_channel_map *map, const pa_cvolume *volume, int variable_rate, - int resample_method); + pa_resample_method_t resample_method); void pa_sink_input_unref(pa_sink_input* i); pa_sink_input* pa_sink_input_ref(pa_sink_input* i); @@ -103,4 +113,6 @@ void pa_sink_input_set_name(pa_sink_input *i, const char *name); pa_resample_method_t pa_sink_input_get_resample_method(pa_sink_input *i); +int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately); + #endif -- cgit