summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sound-file-stream.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-20 20:16:55 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-20 20:16:55 +0000
commit62e7bc17c41c5542779a3c395a9d47d2bd306de2 (patch)
tree4445167f4164a8af45438519fee8202c14a35892 /src/pulsecore/sound-file-stream.c
parent7556ef5bfc37c99064d95857626bcf9f20423c70 (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/sound-file-stream.c')
-rw-r--r--src/pulsecore/sound-file-stream.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c
index 7e0f8ef1..9030d6db 100644
--- a/src/pulsecore/sound-file-stream.c
+++ b/src/pulsecore/sound-file-stream.c
@@ -235,7 +235,7 @@ int pa_play_file(
pa_sample_spec ss;
pa_sink_input_new_data data;
int fd;
- pa_memblock *silence;
+ pa_memchunk silence;
pa_assert(sink);
pa_assert(fname);
@@ -336,13 +336,9 @@ int pa_play_file(
u->sink_input->kill = sink_input_kill_cb;
u->sink_input->userdata = u;
- silence = pa_silence_memblock_new(
- u->core->mempool,
- &u->sink_input->sample_spec,
- u->sink_input->thread_info.resampler ? pa_resampler_max_block_size(u->sink_input->thread_info.resampler) : 0);
-
- u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&u->sink_input->sample_spec), 1, 1, 0, silence);
- pa_memblock_unref(silence);
+ pa_sink_input_get_silence(u->sink_input, &silence);
+ u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&u->sink_input->sample_spec), 1, 1, 0, &silence);
+ pa_memblock_unref(silence.memblock);
pa_sink_input_put(u->sink_input);