diff src/audacious/flow.c @ 3708:6f4068a0f291

make sndstretch work properly
author William Pitcock <nenolod@atheme.org>
date Mon, 08 Oct 2007 01:36:41 -0500
parents cc888ce7b6fb
children a41fb6bc632a
line wrap: on
line diff
--- a/src/audacious/flow.c	Sun Oct 07 19:12:28 2007 -0500
+++ b/src/audacious/flow.c	Mon Oct 08 01:36:41 2007 -0500
@@ -37,17 +37,18 @@
     g_slice_free(Flow, flow);    
 }
 
-void flow_execute(Flow *flow, gint time, gpointer data, gsize len, AFormat fmt, 
+gsize
+flow_execute(Flow *flow, gint time, gpointer *data, gsize len, AFormat fmt, 
      gint srate, gint channels)
 {
     FlowElement *element;
     FlowContext context = {};
 
-    g_return_if_fail(flow != NULL);
-    g_return_if_fail(data != NULL);
+    g_return_val_if_fail(flow != NULL, 0);
+    g_return_val_if_fail(data != NULL, 0);
 
     context.time = time;
-    context.data = data;
+    context.data = *data;
     context.len = len;
     context.fmt = fmt;
     context.srate = srate;
@@ -61,6 +62,10 @@
         if (context.error)
             break;
     }
+
+    *data = context.data;
+
+    return context.len;
 }
 
 Flow *