1,
0,
0,
- NULL);
+ &u->sink->silence);
pa_assert_se(pa_idxset_put(u->outputs, o, NULL) == 0);
update_description(u);
unsigned long input_port, output_port, p, j, n_control;
unsigned c;
pa_bool_t *use_default = NULL;
+ pa_memchunk silence;
pa_assert(m);
u = pa_xnew0(struct userdata, 1);
u->module = m;
m->userdata = u;
- u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
+
+ pa_silence_memchunk_get(&m->core->silence_cache, m->core->mempool, &silence, &ss, 0);
+ u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, &silence);
+ pa_memblock_unref(silence.memblock);
if (!(e = getenv("LADSPA_PATH")))
e = LADSPA_PATH;
pa_memblockq *q;
int r;
+ pa_memchunk silence;
pa_assert(sink);
pa_assert(ss);
pa_assert(chunk);
- q = pa_memblockq_new(0, chunk->length, 0, pa_frame_size(ss), 1, 1, 0, NULL);
+ pa_silence_memchunk_get(&sink->core->silence_cache, sink->core->mempool, &silence, ss, 0);
+ q = pa_memblockq_new(0, chunk->length, 0, pa_frame_size(ss), 1, 1, 0, &silence);
+ pa_memblock_unref(silence.memblock);
+
pa_assert_se(pa_memblockq_push(q, chunk) >= 0);
if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, sink_input_index)) < 0) {
size_t l;
pa_sink *sink = NULL;
pa_sink_input_new_data sdata;
+ pa_memchunk silence;
connection_assert_ref(c);
pa_assert(data);
CHECK_VALIDITY(c->sink_input, "Failed to create sink input.");
l = (size_t) ((double) pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS);
+ pa_sink_input_get_silence(c->sink_input, &silence);
c->input_memblockq = pa_memblockq_new(
0,
l,
(size_t) -1,
l/PLAYBACK_BUFFER_FRAGMENTS,
0,
- NULL);
+ &silence);
+ pa_memblock_unref(silence.memblock);
pa_iochannel_socket_set_rcvbuf(c->io, l);
c->sink_input->parent.process_msg = sink_input_process_msg;
if (o->playback) {
pa_sink_input_new_data data;
+ pa_memchunk silence;
size_t l;
pa_sink *sink;
pa_sink_input_set_requested_latency(c->sink_input, DEFAULT_SINK_LATENCY);
l = (size_t) ((double) pa_bytes_per_second(&o->sample_spec)*PLAYBACK_BUFFER_SECONDS);
+ pa_sink_input_get_silence(c->sink_input, &silence);
c->input_memblockq = pa_memblockq_new(
0,
l,
(size_t) -1,
l/PLAYBACK_BUFFER_FRAGMENTS,
0,
- NULL);
+ &silence);
+ pa_memblock_unref(silence.memblock);
+
pa_iochannel_socket_set_rcvbuf(io, l);
pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq));
pa_sink_input_new_data data;
int fd;
SF_INFO sfi;
+ pa_memchunk silence;
pa_assert(sink);
pa_assert(fname);
u->sink_input->state_change = sink_input_state_change_cb;
u->sink_input->userdata = u;
- u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
+ pa_sink_input_get_silence(u->sink_input, &silence);
+ u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, &silence);
+ pa_memblock_unref(silence.memblock);
pa_sink_input_put(u->sink_input);