diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-25 02:41:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-25 02:41:09 +0100 |
commit | c6b9931bf109b175def6be581d1d946b48ed59d4 (patch) | |
tree | b8ddb8b6bf1532f24c78cb4df6d88dcfb0179150 | |
parent | 34bb996e69156ceacda6e6c7530e129d4198eddb (diff) |
virtual: when fixed block sizes are used the memblockq must have a silence block
-rw-r--r-- | src/modules/module-virtual-sink.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/module-virtual-sink.c b/src/modules/module-virtual-sink.c index 8a3ee0ff0..fac204d4c 100644 --- a/src/modules/module-virtual-sink.c +++ b/src/modules/module-virtual-sink.c @@ -504,7 +504,6 @@ int pa__init(pa_module*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); u->channels = ss.channels; /* Create sink */ @@ -584,7 +583,12 @@ int pa__init(pa_module*m) { u->sink_input->mute_changed = sink_input_mute_changed_cb; u->sink_input->userdata = u; - /* (9) INITIALIZE ANYTHING ELSE YOU NEED HERE */ + /* (9) IF YOU REQUIRE A FIXED BLOCK SIZE MAKE SURE TO PASS A + * SILENCE MEMBLOCK AS LAST PARAMETER + * HERE. pa_sink_input_get_silence() IS USEFUL HERE. */ + u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL); + + /* (10) INITIALIZE ANYTHING ELSE YOU NEED HERE */ pa_sink_put(u->sink); pa_sink_input_put(u->sink_input); |