Hi all,
Attached is a patch to fix a problem of the mixer not being detected
when called by getbyname.
This means that the plugin idlebar.volume is never displayed.
And this code always fails:
mixer = plugin.getbyname('MIXER')
if mixer and config.MAJOR_AUDIO_CTRL == 'VOL':
mixer_vol = mixer.getMainVolume()
mixer.setMainVolume(0)
elif mixer and config.MAJOR_AUDIO_CTRL == 'PCM':
mixer_vol = mixer.getPcmVolume()
mixer.setPcmVolume(0)
The cause is that
plugin.__init__(self) called from plugin.DaemonPlugin.__init__(self)
reset the plugin_name to ''
The fix is move the plugin_name after plugin.DaemonPlugin.__init__(self).
Regards,
Duncan
diff -Naur freevo-1.5.4.orig/src/plugins/joy.py freevo-1.5.4/src/plugins/joy.py
--- freevo-1.5.4.orig/src/plugins/joy.py 2005-10-16 11:18:49.000000000
+0200
+++ freevo-1.5.4/src/plugins/joy.py 2006-07-28 19:43:05.000000000 +0200
@@ -55,7 +55,6 @@
class PluginInterface(plugin.DaemonPlugin):
def __init__(self):
- self.plugin_name = 'JOY'
self.device_name = ''
if config.JOY_DEV == 0:
@@ -82,6 +81,7 @@
# ok, joystick is working
plugin.DaemonPlugin.__init__(self)
+ self.plugin_name = 'JOY'
print 'using joystick', config.JOY_DEV
diff -Naur freevo-1.5.4.orig/src/plugins/mixer.py
freevo-1.5.4/src/plugins/mixer.py
--- freevo-1.5.4.orig/src/plugins/mixer.py 2005-10-16 11:18:49.000000000
+0200
+++ freevo-1.5.4/src/plugins/mixer.py 2006-07-28 19:43:13.000000000 +0200
@@ -73,7 +73,6 @@
SOUND_MASK_LINE = 64
def __init__(self):
- self.plugin_name = 'MIXER'
self.mixfd = None
self.muted = 0
@@ -87,6 +86,7 @@
return
# init here
plugin.DaemonPlugin.__init__(self)
+ self.plugin_name = 'MIXER'
if 0:
self.mainVolume = 0
diff -Naur freevo-1.5.4.orig/src/plugins/ossmixer.py
freevo-1.5.4/src/plugins/ossmixer.py
--- freevo-1.5.4.orig/src/plugins/ossmixer.py 2005-10-16 11:18:49.000000000
+0200
+++ freevo-1.5.4/src/plugins/ossmixer.py 2006-07-28 19:43:23.000000000
+0200
@@ -75,7 +75,6 @@
SOUND_MASK_LINE = 64
def __init__(self):
- self.plugin_name = 'MIXER'
self.mixfd = None
self.muted = 0
@@ -90,6 +89,7 @@
# init here
plugin.DaemonPlugin.__init__(self)
+ self.plugin_name = 'MIXER'
if 0:
self.mainVolume = 0
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel