synaesthesia (2.4-3) devfs-sounddev.patch

Summary

 main.cc |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

## devfs-sounddev.patch by Devin Carraway <devin@debian.org>
## DP: Support devfs-style sound device names, when present

Index: synaesthesia-2.4/main.cc
===================================================================
--- synaesthesia-2.4.orig/main.cc	2005-12-28 18:52:19.000000000 -0800
+++ synaesthesia-2.4/main.cc	2012-01-17 22:38:36.000000000 -0800
@@ -107,8 +107,14 @@
   windY=30;
   windWidth = DefaultWidth;
   windHeight = DefaultHeight;
-  strcpy(dspName, "/dev/dsp");
-  strcpy(mixerName, "/dev/mixer");
+  if (!access("/dev/sound/dsp", F_OK))
+	  strcpy(dspName, "/dev/sound/dsp");
+  else
+	  strcpy(dspName, "/dev/dsp");
+  if (!access("/dev/sound/mixer", F_OK))
+	  strcpy(mixerName, "/dev/sound/mixer");
+  else
+	  strcpy(mixerName, "/dev/mixer");
   strcpy(cdromName, "/dev/cdrom");
 
   //Should i free this? Manual is unclear