Multiple-Sound-Card-Wizard

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple-Sound-Card-Wizard

Geoffrey
This post was updated on .
Edit: removed unneeded echoed text from script.
Edit2: when setting up card removes user slider settings.

I was trying to add a new sound device in Tahr pup and found that Retrovol wasn't being updated, the code to replace the hardware selection in the .retrovolrc just doesn't work and from what I gather has gone about doing so the wrong way, I see no point in removing and replacing any .retrovolrc entries beginning with "#", these are overwritten each time Retrovol is run.

The changes I've made simply remove the tray_control=, sliders: and card=hw then append the the selected hardware on the line after the #card=hw:0 entry, if the entry happens to be card=hw:0 then nothing is added and retrovol default is used.

This results in the tray volume level being the correct one for the device selected and no need to change the hardware device from within the Retrovol GUI.

This is my second time doing a diff file, worked for me  Multiple-Sound-Card-Wizard-150624.diff


--- /Multiple-Sound-Card-Wizard 2014-06-19 22:44:50.000000000 +1000
+++ /Multiple-Sound-Card-Wizard-150624 2015-06-24 08:37:33.886542033 +1000
@@ -2,6 +2,7 @@
 #120323 npierce: remove OK button if no cards detected. refer: http://murga-linux.com/puppy/viewtopic.php?t=76182&start=90
 #120815 rodin.s: i18n
 #130216 01micko, BK: fix retrovol.
+#150624 Geoffrey, fix retrovol
 
 export TEXTDOMAIN=multiple_soundcard
 export OUTPUT_CHARSET=UTF-8
@@ -75,18 +76,21 @@
 
  killall retrovol
 
- if [ -f $HOME/.retrovolrc ];then #created when retrovol 1st starts..
-  sed -i -e '/^card=hw/d' $HOME/.retrovolrc
-  rPTN1='s%^#card=%#card=hw:0\ncard=%'
-  rPTN2="s%^card=.*%card=hw:${Card}%"
-  sed -i -e "$rPTN1" -e "$rPTN2" $HOME/.retrovolrc
- else
-  echo "# $(gettext 'Config file for retrovol')
-# $(gettext "This file should reside in the user's home directory and be named:") .retrovolrc
-
-#card=hw:0
-card=hw:${Card}" > $HOME/.retrovolrc #'geany
- fi
+#150624 Geoffrey, fix retrovol
+ [ -f $HOME/.retrovolrc ] && sed -i -e "/^card=hw/d;/^tray_control=/d;/^sliders:/d;/#card=hw:0/a card=hw:${Card}" $HOME/.retrovolrc || echo "card=hw:${Card}" > $HOME/.retrovolrc
+# This don't work
+# if [ -f $HOME/.retrovolrc ];then #created when retrovol 1st starts..
+#  sed -i -e '/^card=hw/d' $HOME/.retrovolrc
+#  rPTN1='s%^#card=%#card=hw:0\ncard=%'
+#  rPTN2="s%^card=.*%card=hw:${Card}%"
+#  sed -i -e "$rPTN1" -e "$rPTN2" $HOME/.retrovolrc
+# else
+#  echo "# $(gettext 'Config file for retrovol')
+## $(gettext "This file should reside in the user's home directory and be named:") .retrovolrc
+#
+##card=hw:0
+#card=hw:${Card}" > $HOME/.retrovolrc #'geany
+# fi
 
  echo '<window title="'$(gettext "Multiple Sound Card Wizard")'"><vbox>
   <frame Card '$Card'>


Loading...