[mythtv] [PATCH] MythMusic Synaesthesia crash on mono
Dan M
dan at milkcarton.com
Sun Apr 20 22:59:06 EDT 2003
Attached is a patch for Synaesthesia to fix a crash on mono sound. This
patch puts an if around y[i] = nodes->right[i];
Andy Davidoff tracked down the problem and write the one liner, I'm just
submitting for him.
-dan
-------------- next part --------------
Index: mythmusic/synaesthesia.cpp
===================================================================
RCS file: /var/lib/cvs/mythmusic/mythmusic/synaesthesia.cpp,v
retrieving revision 1.9
diff -u -d -r1.9 synaesthesia.cpp
--- mythmusic/synaesthesia.cpp 23 Feb 2003 14:52:35 -0000 1.9
+++ mythmusic/synaesthesia.cpp 21 Apr 2003 05:49:32 -0000
@@ -432,7 +432,9 @@
for (i = 0; i < numSamps; i++)
{
x[i] = node->left[i];
- y[i] = node->right[i];
+ //If the song is mono, then there is no right channel
+ if ( node->right )
+ y[i] = node->right[i];
}
fft(x, y);
More information about the mythtv-dev
mailing list