home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Amiga
/
Workbench
/
DOpus
/
Play16-GUIplay.lha
/
play16-Play.dopus5
< prev
Wrap
Text File
|
1998-05-06
|
5KB
|
213 lines
/* $VER: Play16-play.dopus5 1.1 (06 May 1998)
⌐1998 by mike@kily.ruhr.de (http://kily.home.pages.de)
DOPUS5.5+ AREXX Script for Play16-Soundplaying
with ProgressBar-GUI with timecounter !
needs:
DOPUS 5.5+
play16 1.8
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 Play16 player by Thomas Wenzel.
Displays Name/Soundformat/Time in a DOPUS PROGRESS Window.
Shows the runtime on a proggressbar and a timecounter.
Checks dopusfiletypes and recognizes CDDA format.
installation:
as Button,Menu,...
NO Parameters, only select: <AREXX> Dopus5:ARexx/Play16-Play.dopus5
If you want to use this script from multiply OPUS add the DOPUS Port:
<AREXX> Dopus5:ARexx/Play16-play.dopus5 {Qp}
For Filetype-startup (dobbleclick start) install it as:
<AREXX> Dopus5:ARexx/Play16-play.dopus5 {Qp} {Ql} {o}
usage:
select all sound files and start Play16-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 play16 parameters (playmode) in this script.
to change the abort time change "stop<5 & secs<5" in this script.
bugs:
The time display is only 98% correct.
info:
if you want the same script/GUI for MPEG soundfiles
use my MPEGA-GUIplay.lha (Aminet or Supportpage)
This is the same GUI for MPEGA by Stephane TAVENARD.
EmailWare:
this script ist Email-ware,
please mail me your favourit Internet-Site !
*/
OPTIONS RESULTS
playmode="PRE FILTER=AUTO OUT=Paula14c"
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 sound-file 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
file='"'pfad||files.j'"'
DOPUS getfiletype file
art = upper(RESULT)
skip=0
if (index(art,"AUDIO")=0 & index(art,"SOUND")=0) | index(art,"MPEG")>0 then
DO
in=files.j||'0a'x" is not a sound file ?!"||'0a'x"Filetype="art
dopus request '"'in'"' "Skip|CDDA|Sound"
if rc=1 then skip=1
if rc=2 then art="CDDA"
END
IF SKIP~=1 then DO
call time('R')
if index(art,"CDDA")>0 then ADDRESS COMMAND 'RUN >NIL: <NIL: play16 'playmode' freq 44100 RAW bits 16 tracks 2 intel V=1 'file' >PIPE:play16t'
else ADDRESS COMMAND 'RUN >NIL: <NIL: play16 'playmode' V=1 'file' >PIPE:play16t'
CALL Open('play16out','PIPE:play16t','r')
in=Readch('play16out',1)
iin=""
format=" RAW"
do forever
in=Readch('play16out',1)
newl = Verify(in,'0a'x,'m')
if newl>0 then do
if index(iin,"Play16")>0 then parse var iin version" by"dummy
if index(iin,"Filetype")>0 then parse var iin "Filetype is"format"."
if index(iin,"tracks")>0 then parse var iin dummy": "tracks
if index(iin,"Bits")>0 then parse var iin dummy": "bits
if index(iin,"Compression")>0 then parse var iin dummy": "comp
if index(iin,"time")>0 then parse var iin dummy": "time
if index(iin,"frequency")>0 then parse var iin dummy": "freq
if index(iin,"playin")>0 then leave
if index(iin,"Error")>0 then do
LISTER SET Handle BUSY OFF
iin="Play16"||'0a'x||iin
dopus request '"'iin'"' "Oops"
CALL Close('play16out')
exit
end
iin=""
end
iin=iin||in
end
parse var time pm":"ps
if tracks=1 then tracks="mono"
else tracks="stereo"
format=format" "tracks" "bits"bit "freq"hz"
ptotal=pm*60+ps
LISTER SET Handle NEWPROGRESS NAME "Name: "files.j
LISTER SET Handle NEWPROGRESS INFO "00:00 / 00:00 / loading sound..."
LISTER SET Handle NEWPROGRESS title j+1' / 'files.count' - 'version
LISTER SET Handle NEWPROGRESS bar ptotal 0
secs=0
mt=0
kst=0
do while secs<ptotal
azeit=secs
secs=TRUNC(time('E'))
if secs=azeit then address command "wait 1 sec"
secs=TRUNC(time('E'))
st=secs-kst
if st>59 then
DO
mt=mt+1
kst=kst+60
st=secs-kst
END
zmt=mt
if length(mt)<2 then zmt="0"mt
zst=st
if length(st)<2 then zst="0"st
zpm=pm
if length(pm)<2 then zpm="0"pm
LISTER SET Handle NEWPROGRESS INFO zpm":"ps" / "zmt":"zst" / "format
LISTER SET Handle NEWPROGRESS bar ptotal secs
LISTER QUERY Handle abort
skip=result
IF skip=1 THEN
DO
ADDRESS COMMAND 'kill play16 >nil:'
CALL Close('play16out')
if stop<5 & secs<5 then
DO
LISTER REFRESH Handle
LISTER SET Handle BUSY OFF
EXIT
end
stop=secs
secs=ptotal
END
END
END
LISTER CLEAR Handle abort
LISTER SELECT Handle '"'files.j'"' OFF
LISTER REFRESH Handle
end
ADDRESS COMMAND 'kill play16 >nil:'
LISTER SET Handle BUSY OFF
CALL Close('play16out')
EXIT