Author: duncan
Date: Sat Mar 15 10:43:52 2008
New Revision: 10531
Log:
Added a reset method
Added whitespace before methods where needed
Modified:
branches/rel-1/freevo/src/plugins/alsamixer2.py
Modified: branches/rel-1/freevo/src/plugins/alsamixer2.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/alsamixer2.py (original)
+++ branches/rel-1/freevo/src/plugins/alsamixer2.py Sat Mar 15 10:43:52 2008
@@ -173,6 +173,7 @@
if self.mute_ctrl is None:
self.mute_ctrl = self.main_ctrl
+
def config(self):
"""
Config is called automatically. For default settings run:
@@ -184,6 +185,7 @@
('ALSAMIXER2_CTRLS', [('PCM', 'default', 50, 0, 100)], 'Alsa mixer
control list'),
]
+
def eventhandler(self, event=None, menuw=None, arg=None):
"""
Event handler to handle VOLUME and MUTE events
@@ -207,10 +209,12 @@
return False
+
def getVolume(self):
""" Get the volume level of a control """
return self.main_ctrl.getvolume()[0]
+
def setVolume(self, val=0):
""" Set the volume level of a control (default 0) """
if val < self.main_ctrl_min:
@@ -219,20 +223,29 @@
val = self.main_ctrl_max
self.main_ctrl.setvolume(val)
+
def incVolume(self, step=5):
""" Increase the volume level by the step (default 5) """
self.setVolume(self.getVolume() + step)
return self.getVolume()
+
def decVolume(self, step=5):
""" Decrease the volume level by the step (default 5) """
self.setVolume(self.getVolume() - step)
return self.getVolume()
+
def getMute(self):
""" Get the muting of a control """
return self.mute_ctrl.getmute()[0]
+
def setMute(self, val=0):
""" Set the muting of a control (default 0) """
self.mute_ctrl.setmute(val)
+
+
+ def reset(self):
+ """ Resets the audio to defaults """
+ pass
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog