diff --exclude='#*#' --exclude='*.orig' --exclude='*.rej' --exclude='*~' --exclude='Makefile*' --exclude='*svn*' --exclude='moc_*.cpp' -rNu ../decoderlocking/mythplugins/mythmusic/mythmusic/goom/mythgoom.cpp mythplugins/mythmusic/mythmusic/goom/mythgoom.cpp
--- ../decoderlocking/mythplugins/mythmusic/mythmusic/goom/mythgoom.cpp	2005-10-14 20:56:20.000000000 -0700
+++ mythplugins/mythmusic/mythmusic/goom/mythgoom.cpp	2005-12-02 12:54:50.031255776 -0800
@@ -78,19 +78,28 @@
         return true;
 
     int numSamps = 512;
+    int step = 1;
+
     if (node->length < 512)
-        numSamps = node->length;
+        step = 512 / node->length;
 
     signed short int data[2][512];
    
     int i = 0;
-    for (i = 0; i < numSamps; i++)
+    for (i = 0; i < numSamps; i += step)
     {
         data[0][i] = node->left[i];
         if (node->right)
             data[1][i] = node->right[i];
         else
             data[1][i] = data[0][i];
+
+        if (step > 1) 
+            for (int j = 1; j < step; j++)
+            {
+                data[0][i+j] = data[0][i];
+                data[1][i+j] = data[1][i];
+            }
     }
 
     for (; i < 512; i++)
diff --exclude='#*#' --exclude='*.orig' --exclude='*.rej' --exclude='*~' --exclude='Makefile*' --exclude='*svn*' --exclude='moc_*.cpp' -rNu ../decoderlocking/mythplugins/mythmusic/mythmusic/inlines.h mythplugins/mythmusic/mythmusic/inlines.h
--- ../decoderlocking/mythplugins/mythmusic/mythmusic/inlines.h	2005-12-01 18:14:53.000000000 -0800
+++ mythplugins/mythmusic/mythmusic/inlines.h	2005-12-02 14:58:23.126294032 -0800
@@ -11,6 +11,64 @@
 
 // *fast* convenience functions
 
+static inline void smoothen_mono(short *in_data, short *out_data, int len, int new_len)
+{
+    int step = new_len/len;
+    int dii = 0;
+    for (int ii = 0; ii < len; ii++)            
+    {
+        out_data[dii] = in_data[ii];
+        
+        short smooth = 0;
+
+        if (ii < len-1) 
+            smooth = in_data[ii+1] - in_data[ii];
+
+        if (smooth)
+            smooth /= step;
+        
+        for (int cc = 1; cc < step; cc++) {
+            out_data[dii+cc] = out_data[dii+cc-1] + smooth;
+        }
+        
+        dii += step;
+    }
+}
+
+static inline void smoothen_stereo(short *l_in_data, short *l_out_data, 
+                                   short *r_in_data, short *r_out_data,
+                                   int len, int new_len)
+{
+    int step = new_len/len;
+    int dii = 0;
+    for (int ii = 0; ii < len; ii++)            
+    {
+        l_out_data[dii] = l_in_data[ii];
+        r_out_data[dii] = r_in_data[ii];
+        
+        short l_smooth = 0;
+        short r_smooth = 0;
+
+        if (ii < len-1) {
+            l_smooth = l_in_data[ii+1] - l_in_data[ii];
+            r_smooth = r_in_data[ii+1] - r_in_data[ii];
+        }
+
+        if (l_smooth)
+            l_smooth /= step;
+        
+        if (r_smooth)
+            r_smooth /= step;
+        
+        for (int cc = 1; cc < step; cc++) {
+            l_out_data[dii+cc] = l_out_data[dii+cc-1] + l_smooth;
+            r_out_data[dii+cc] = r_out_data[dii+cc-1] + r_smooth;
+        }
+        
+        dii += step;
+    }
+}
+
 static inline void stereo16_from_stereopcm8(register short *l,
 					    register short *r,
 					    register uchar *c,
diff --exclude='#*#' --exclude='*.orig' --exclude='*.rej' --exclude='*~' --exclude='Makefile*' --exclude='*svn*' --exclude='moc_*.cpp' -rNu ../decoderlocking/mythplugins/mythmusic/mythmusic/mainvisual.cpp mythplugins/mythmusic/mythmusic/mainvisual.cpp
--- ../decoderlocking/mythplugins/mythmusic/mythmusic/mainvisual.cpp	2005-12-01 18:14:53.000000000 -0800
+++ mythplugins/mythmusic/mythmusic/mainvisual.cpp	2005-12-02 14:49:08.956540640 -0800
@@ -229,6 +229,35 @@
     else
         len = 0;
 
+    if (len < 512)
+    {
+        short *new_l = 0;
+        short *new_r = 0;
+
+        if (c == 1)
+        {
+            new_l = new short[512];
+            smoothen_mono(l, new_l, len, 512);
+            delete r;
+            delete l;
+            r = new_r;
+            l = new_l;
+        }
+
+        if (c == 2)
+        {
+            new_l = new short[512];
+            new_r = new short[512];
+            smoothen_stereo(l, new_l, r, new_r, len, 512);
+            delete r;
+            delete l;
+            r = new_r;
+            l = new_l;
+        }
+
+        len = 512;
+    }
+
     nodes.append(new VisualNode(l, r, len, w));
 }
 
@@ -401,10 +430,10 @@
     long s, indexTo;
     double *magnitudesp = magnitudes.data();
     double valL, valR, tmpL, tmpR;
-    double index, step = 512.0 / size.width();
 
     if (node) {
-	index = 0;
+    double step = (node->length < 512 ? node->length : 512.0) / size.width();
+	double index = 0;
 	for ( i = 0; i < size.width(); i++) {
 	    indexTo = (int)(index + step);
             if (indexTo == (int)(index))
@@ -600,11 +629,10 @@
     double *magnitudesp = magnitudes.data();
     double val, tmp;
 
-    double index, step = 512.0 / size.width();
-
     if (node) 
     {
-        index = 0;
+        double step = (node->length < 512 ? node->length : 512.0) / size.width();
+        double index = 0;
         for ( i = 0; i < size.width(); i++) 
         {
             indexTo = (int)(index + step);
