When you have made an vol_gui class instance vol, you can use the arm(vol_min_dB=-60, vol_max_dB=20, vol_def_dB=-20, vol_tick=10) method call to configure the volume GUI. These values correspond: to the minimum value of the slider, the maximum value of the slider, the beginning value of the slider, and the tick spacing uder the slider (use 0 for no ticks). This method call also enables the user to move the volume slider and press the OK button.
vol.arm(vol_min_dB=-60, vol_max_dB=20, vol_def_dB=-20, vol_tick=10)You can receive the user volume adjustment values with the get_event() method call. It returns a tuple: string, list, float. The first string is an event type it is either SLIDERVAL which means user has moved the slider or ANSWER meaning that user has pressed the OK button. The params list contains one string which is the integer value of the current volume slider position. The last float is the current timestamp.
type, params, stamp = vol.get_event()When the volume adjustment is over, the GUI is closed with the close() method. You should not access the object after calling this method.
vol.close() vol = None