/* PlayMain.rexx */ options results; address MrMPEG MUIA_List_Active = 0x8042391c; MUIA_Disabled = 0x80423661 list ID SLIST ATTRS MUIA_List_Active list ID SLIST POS result if result ~= '' then do parse var result filename','dummy if ~exists(filename) then do temp_string = "Could not open the file '"filename"'." request ID WARN GADGETS '"OK"' temp_string call Stop() check ID PLAY ATTRS MUIA_Disabled 0 return end call GetInfo() image ID RWND ATTRS MUIA_Disabled 1 image ID FFWD ATTRS MUIA_Disabled 1 slider ID PROG ATTRS MUIA_Disabled 1 slider ID PRIO ATTRS MUIA_Disabled 1 knob ID VOLM; volume = '-v'result check ID MONO if result = 0 then stereo = '-m' else stereo = '' check ID FILT; filter = '-f'||result cycle ID DIVS if result = '1:1' then division = '-d1' else if result = '1:2' then division = '-d2' else division = '-d4' cycle ID QUAL if result = 'Low' then quality = '-q0' else if result = 'Medium' then quality = '-q1' else quality = '-q2' slider ID PRIO; priority = '-p'result cycle ID MAXF if result = 'OFF' then maxf = '' else maxf = '-F'result cycle ID MIXF if result = 'OFF' then mixf = '' else mixf = '-x'result cycle ID ABUF; abuffer = '-t'result * 1000 cycle ID IBUF; ibuffer = '-b'result text ID AHID; parse var result 'br'ahi_id check ID UAHI if result = 1 then ahi = '-I'ahi_id else ahi = '' popasl ID PATH; pathname = result slider ID PROG; position = result * 1000 setvar current_time right(result % 60, 2, 0)":"right(result // 60, 2, 0) setvar current_song filename address command 'run <>NIL: rx Timer.rexx' check ID PLAY ATTRS MUIA_Disabled 0 address command pathname'MPEGA >NIL: -n -w -S'position ahi division quality stereo volume filter mixf maxf priority filename abuffer ibuffer image ID RWND ATTRS MUIA_Disabled 0 image ID FFWD ATTRS MUIA_Disabled 0 slider ID PROG ATTRS MUIA_Disabled 0 slider ID PRIO ATTRS MUIA_Disabled 0 end /* of if result */ else do call Stop() check ID PLAY ATTRS MUIA_Disabled 0 end return