home *** CD-ROM | disk | FTP | other *** search
- Release Beta 0.99
-
- The minimal player daemon - upd
- ===============================
-
- © 1991 Jonas Petersson & Absolut Software (aka Sirius Soft)
-
-
- Introduction
- ============
-
- Wouldn't it be nice to have a process hanging around to play any
- sound file for you on demand instead of you having to do all this
- mucking about with audio.device etc? But it really has to be small
- and it HAS to be able to play my very large samples anytime...
- I will be able to call it simply from anywhere - even from scripts!
- Tricky, but it can be done.
-
- As a feature you can register you favourite sounds in a configuration
- file and well behaved programs will use the ones you like right now.
- It also has Arexx support - to be truly honest, that the ONLY way to
- use it...
-
- Current version works rather well along the way I intended.
-
-
- Usage
- =====
-
- [run] upd [bufsize]
-
- The "run" is ofcourse optional, but daemon really should be in the background
- unless you want the see the debugging information. "bufsize" is the abount
- of chip memory that each of the four buffers will use while playing. (These
- are allocated at start to make sure you will be able to play anytime - as long
- as you can get hold of the audio channels...). Default is 512 and specifying
- less than 64 will give you the default.
-
- Above won't produce any sound as you probably realize. Once run, the only way
- to talk to upd is with Arexx - I even removed the BREAK stuff that was in it for
- Zound, since Arexx could hang around waiting for a reply forever when you
- interupted the sound that way.
-
- upd currently knows of three commands:
-
- file filepath [options] [anotherfilepath [options]]
- id id-in-s:upd.IDs
- exit
-
- Well, there is actually one more command: 'Can it, Marvin'. This will
- silently interrupt the current sample. (To be truely honest, ANY command
- will interrupt a sample - if it's known, it will be used, otherwise the
- sound only stops).
-
- The options are the same as for Zound except for the -n option that doesn't
- exist here (tell me you need it and I'll fix that too... sigh).
-
- Example of usage (from WShell etc):
-
- "address play file 'sounds:chopper'
- "address play id 2001
- "address play exit
-
- NOTE: Arexx normally converts everything to UPPERCASE and might try to
- do arithmetics etc on filenames which is why it's generally a good idea
- to 'singelquote' all paths, IDs etc. If you're looking for the port
- 'the hard way' to send your own message, the name is "PLAY" in uppercase.
-
- NOTE2: If you are REALLY in a hurry to get rid of upd you could do this:
- 1) Send a any dummy Arexx message (this will stop the sound)
- 2) Send a break C to upd - break still works when upd is idle.
- or
- A) Send the exit message.
- This might sound much easier than above unless you (like me) have a trapped
- DisplayBeep() that 'pings' via upd. In this case, producing a DisplayBeep()
- and a break C is much simpler. The order is not relevant since the break
- is "queued".
-
-
- Hints
- =====
-
- Running upd from your SOUNDS: directory is a nice way to get rid of having
- you type the FULL path everytime you want to play a sample. (The daemon
- has no simple way of knowing WHERE you were when you sent the message
- (that I know of) and therefore assumes it to be in the current directory)
-
-
-
- Files:
- ======
-
- s:upd.IDs
-
- This file contains the IDs of your favourite samples like a database
- the is easily editable. File format:
-
- # Lines starting with '#' are comments
- # Id list for micro player daemon
- # Created 910201 Jonas Petersson (zap)
- # These sounds could be called for at certains situation
- # On severe error
- BUG sounds:explosion -S
- # When asked for confirmation
- CONFIRM sounds:PressLeftMouseButton -L
- # Minor trouble
- ERROR sounds:ImSorryDaveImAfraidICantDoThat -R
- # Personal shortcuts/favourites
- 2001 sounds:openpod -L sounds:hal -R
-
- Removing entries will ofcourse result in no sound (this version of upd
- mourns about it on the standard output though, unless you redirect it).
-
- Feel free to add whatever you like. Could be nice with some standard though.
- Suggestions are welcome.
-
- NOTE: It *IS* possible to have white space, lowercase etc in the IDs, but
- it might cause confusion if used. Be warned.
-
- NOTE2: The file is scanned once when the program starts.
-
- Return codes:
- =============
-
- If the rexx command returns 20, the secondary result code gives the
- reason for the failure:
-
- 10 Can't allocate channels. (NYI)
- 17 Can't open s:upd.IDs on request to play by ID.
- 18 Requested ID not found.
- 20 Error during parse of options.
- 21 Can't open file with sample.
- 22 File is IFF, but not FORM 8SVX.
- 23 Bad IFF file.
- 24 Bad CHAN length.
- 25 Bad VHDR length.
- 26 Can't open file 2nd time. (For stereo possibility)
- 30 Can't play backwards.
- 31 Can't allocate IOAudio structs.
- 32 Can't open ports for channels.
-
-
- Future enhancements:
- ====================
-
- Maybe automatic detach (didn't work well in Aztec 5.0a, and I havn't really
- tried with 5.0d yet).
-
- Probably not very much else - this is a simple sound daemon for minor
- background purposes of helping simple programs do more than DisplayBeep().
- I'd like to think of it as a complement to SPEAK: - if you want more
- you probably want it interactive. (Hmm, that's a thought - a SOUND: device)
-
-
-
- Known Problems:
- ===============
- 1. If your sample is on a floppy (or a very slow HD) there might be
- some sounds of silence when the playing rate exceeds the loading
- rate...
- Fix: You can now specify the amount of memory to be used by upd when you
- start the daemon as in: 'upd 2000'.
-
- 2. Stereo and Fibonachi packed samples not yet supported (there are loading
- problems - play them with 'Zound' instead for now).
- Fix: Stereo is OK now if you use the above size option (it actually worked
- in RAM: before too - but I didn't enable it for the prerelease). As for
- Fibonachi: it's no too hard to fix, but I've never seen anyone using it -
- is it worth the effort? If you happen to have a Fib-sample - PLEASE send it
- to me - I dont' have the patience to reconstuct one by hand...
-
-
-
-
- Thanks to mjl@alison.at for the idea.
-
-
-
-
- Jonas 'Zaphod' Petersson
- Albrektsvagen 113A
- S-603 53 Norrkoping
- SWEDEN
- Phone: +46 11 162517
-
- zaphod@magrathea.indic.se /* At home */
- zap@indic.se /* At work */
- zaphod@slaka.sirius.se /* Absolute software */
-
-
- Feel free to send comments, bug reports (huh?), money, coke, beer, girls...
-
- Just a "Hi, I liked your program" is just as good as a few bucks - I didn't
- write this to make money out of it...
-
-
-