mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-30 11:08:50 -05:00
* 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
This commit is contained in:
parent
4dd3b31825
commit
5e9295037f
2 changed files with 239 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue