home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Amiga
/
Workbench
/
DOpus
/
MPEGA-GUIplay.lha
/
MPEGA-Play.dopus5
< prev
Wrap
Text File
|
1998-05-06
|
4KB
|
184 lines
/* $VER: MPEGA-Play.dopus5 1.8 (06 May 1998)
⌐1998 by mike@kily.ruhr.de (http://kily.home.pages.de)
DOPUS5.5+ AREXX Script for MPEGA-Soundplaying
with ProgressBar-GUI with timecounter.
needs:
DOPUS 5.5+
MPEGA 3.3
RexxMaster (ARexx) running
mounted PIPE: device > SYS:DEVS/DOSDRIVERS/PIPE
kill > Task breaker tool by Magnus Holmgren (included)
description:
A DOPUS GUI for the Great MPEGA player by Stephane TAVENARD.
displays Name/MPEG-Quality/Time in a DOPUS PROGRESS Window.
it shows the runtime on a proggressbar and a timecounter.
installation:
as Button,Menu,...
NO Parameters, only select: <AREXX> Dopus5:ARexx/MPEGA-Play.dopus5
If you want to use this script from multiply OPUS add the DOPUS Port:
<AREXX> Dopus5:ARexx/MPEGA-Play.dopus5 {Qp}
For Filetype-startup (dobbleclick start) install it as:
<AREXX> Dopus5:ARexx/MPEGA-Play.dopus5 {Qp} {Ql} {o}
usage:
select all .mp files and start MPEG-play.
if you want to skip a soundfile press the abort button.
to abort the complete script abort two times in the first 5 secs.
configuration:
check/change the mpega startup parameters in this script.
to change the abort time change "stop<5 & secs<5" in this script.
bugs:
if MPEGA needs too much CPU-Power then the time display is too slow/wrong.
solution: get a faster CPU.
info:
if you want the same script/GUI for normal soundfiles
use my PLAY16-GUIplay.lha (Aminet or Supportpage)
This is the same GUI for play16 by Thomas Wenzel.
EmailWare:
this script ist Email-ware,
please mail me your favourit Internet-Site !
*/
OPTIONS RESULTS
playmode="-d2 -m -q2 -v120"
PARSE ARG portname' 'handle' 'file
IF portname='' THEN portname='DOPUS.1'
ADDRESS VALUE portname
IF handle="" THEN DO
LISTER QUERY SOURCE
handle=result
IF RC~=0 THEN DO
DOPUS REQUEST '"no Source-directory selected !?!" OOPS!'
EXIT
END
LISTER QUERY Handle selfiles stem files.
IF files.count=0 THEN DO
DOPUS REQUEST '"no MPEG sound-files selected !?!" OOPS!'
EXIT
END
END
IF file~="" then DO
files.0=compress(file,'"')
files.count=1
END
LISTER QUERY Handle path
pfad=result
LISTER SET Handle BUSY ON
LISTER SET Handle newprogress name info bar abort
DO j = 0 TO files.count-1
IF index(upper(files.j),".MP") >1 then do
LISTER SET Handle NEWPROGRESS NAME "Name: "files.j
LISTER SET Handle NEWPROGRESS INFO "00:00 / 00:00 / decoding MPEG sound..."
file='"'pfad||files.j'"'
ADDRESS COMMAND 'RUN >NIL: <NIL: mpega 'playmode' -T 'file' >PIPE:mpegout'
CALL Open('mpegout','PIPE:mpegout','r')
string = ReadLn('mpegout')
string=Text( string )
parse var string version "[680"CPU "(C)"dummy
version=version" "CPU
LISTER SET Handle NEWPROGRESS title j+1' / 'files.count' - 'version
DO until dummy=""
dummy = ReadLn('mpegout')
END
string = ReadLn('mpegout')
string=Text( string )
parse var string dummy"MPEG"MTYPE
MPGMODE="MPEG"MTYPE
string = ReadLn('mpegout')
string=Text( string )
parse var string dummy": "pm":"ps
ptotal=pm*60+ps
secs=0
LISTER SET Handle NEWPROGRESS bar ptotal 0
DO UNTIL Eof('mpegout')
time=ReadCh('mpegout',29)
secs=secs+1
if index(time,"err")>0 then dopus request "error"'0a'x||time
time=left(right(time,10),5)
if time="" then time=" End."
LISTER QUERY Handle abort
skip=result
IF skip=1 THEN DO
ADDRESS COMMAND 'kill MPEGA >nil:'
if stop<5 & secs<5 then do
LISTER REFRESH Handle
LISTER SET Handle BUSY OFF
CALL Close('mpegout')
EXIT
end
stop=secs
dummy=ReadCh('mpegout',256)
END
ELSE DO
LISTER SET Handle NEWPROGRESS INFO pm":"ps" / "time" / "MPGMODE
LISTER SET Handle NEWPROGRESS bar ptotal secs
END
END
LISTER CLEAR Handle abort
CALL Close('mpegout')
LISTER SELECT Handle '"'files.j'"' OFF
LISTER REFRESH Handle
END
END
LISTER SET Handle BUSY OFF
EXIT
TEXT:
PROCEDURE
TEXT=Arg( 1 )
esc2=1
do until esc1=0
esc1=Verify(text,'1b'x,'m')
if esc1~=0 then text=delstr(text,esc1,1)
parse var text d1'[1m'd2'[22m'd3
text=d1||d2||d3
end
RETURN TEXT