indexing description: "[ Implements the preset part for the master. Use this class to store/load the master settings. Note: This is the class where the master settings are stored. ]" date: "$Date$" revision: "$Revision$" class MIXER_PRESET_MASTER inherit EM_AUDIO_CONSTANTS export {NONE} all end create make feature {NONE} -- Initialization make (a_master: MIXER_MASTER) is -- Initialize preset music channel. require a_master_not_void: a_master /= Void do active := a_master.active.active mute := a_master.mute.active reverse := a_master.reverse.active fade := a_master.fade.active create fade_value.make_from_string (a_master.fade_value.text) echo := a_master.echo.active phasing := a_master.phasing.active panning := a_master.panning.current_value internal_volume := a_master.volume.current_value end feature -- Implementation load (a_master: MIXER_MASTER) is -- Load settings of `a_master'. require a_master_not_void: a_master /= Void do if active /= a_master.active.active then a_master.active_button_clicked end if mute /= a_master.mute.active then a_master.mute_button_clicked end if reverse /= a_master.reverse.active then a_master.reverse_button_clicked end if fade /= a_master.fade.active then a_master.fade_button_clicked end if not fade_value.is_equal (a_master.fade_value.text) then a_master.fade_value.set_text (fade_value) end if echo /= a_master.echo.active then a_master.echo_button_clicked end if phasing /= a_master.phasing.active then a_master.phasing_button_clicked end if panning /= a_master.panning.current_value then a_master.panning.set_current_value (panning) end if volume /= a_master.volume.current_volume then a_master.volume.set_current_value (internal_volume) end end feature -- Access active: BOOLEAN -- Is master active? mute: BOOLEAN -- Is mute active? reverse: BOOLEAN -- Is reverse active? fade: BOOLEAN -- Is fade active? fade_value: STRING -- Current fade value echo: BOOLEAN -- Is echo active? phasing: BOOLEAN -- Is phasing active? panning: INTEGER -- Current panning value volume: INTEGER is -- Current volume value do Result := Em_max_volume - internal_volume end feature -- Internal variables internal_volume: INTEGER end