]> code.delx.au - pulseaudio/blobdiff - src/modules/module-ladspa-sink.c
ladspa: move LADSPA_Data size check to compile time
[pulseaudio] / src / modules / module-ladspa-sink.c
index 15af74a6b9d71affa9cfe069a97de0963352621e..24334995486c2aff5025ab5e7df2e7e481a3c04c 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 
 #include <pulse/xmalloc.h>
+#include <pulse/i18n.h>
 
 #include <pulsecore/core-error.h>
 #include <pulsecore/namereg.h>
 #include "ladspa.h"
 
 PA_MODULE_AUTHOR("Lennart Poettering");
-PA_MODULE_DESCRIPTION("Virtual LADSPA sink");
+PA_MODULE_DESCRIPTION(_("Virtual LADSPA sink"));
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
-        "sink_name=<name for the sink> "
-        "sink_properties=<properties for the sink> "
-        "master=<name of sink to remap> "
-        "format=<sample format> "
-        "rate=<sample rate> "
-        "channels=<number of channels> "
-        "channel_map=<channel map> "
-        "plugin=<ladspa plugin name> "
-        "label=<ladspa plugin label> "
-        "control=<comma seperated list of input control values>");
+        _("sink_name=<name for the sink> "
+          "sink_properties=<properties for the sink> "
+          "master=<name of sink to filter> "
+          "format=<sample format> "
+          "rate=<sample rate> "
+          "channels=<number of channels> "
+          "channel_map=<channel map> "
+          "plugin=<ladspa plugin name> "
+          "label=<ladspa plugin label> "
+          "control=<comma seperated list of input control values>"));
 
 #define MEMBLOCKQ_MAXLENGTH (16*1024*1024)
 
@@ -177,6 +178,9 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
     if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
         return -1;
 
+    /* Hmm, process any rewind request that might be queued up */
+    pa_sink_process_rewind(u->sink, 0);
+
     while (pa_memblockq_peek(u->memblockq, &tchunk) < 0) {
         pa_memchunk nchunk;
 
@@ -391,7 +395,7 @@ int pa__init(pa_module*m) {
 
     pa_assert(m);
 
-    pa_assert(sizeof(LADSPA_Data) == sizeof(float));
+    pa_assert_cc(sizeof(LADSPA_Data) == sizeof(float));
 
     if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
         pa_log("Failed to parse module arguments.");