home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 511.lha / Arq_v1.61 / upd.doc.pp / upd.doc
Text File  |  1991-06-07  |  7KB  |  197 lines

  1. Release Beta 0.99
  2.  
  3.         The minimal player daemon - upd
  4.         ===============================
  5.  
  6.     © 1991 Jonas Petersson & Absolut Software (aka Sirius Soft)
  7.  
  8.  
  9. Introduction
  10. ============
  11.  
  12. Wouldn't it be nice to have a process hanging around to play any
  13. sound file for you on demand instead of you having to do all this
  14. mucking about with audio.device etc? But it really has to be small
  15. and it HAS to be able to play my very large samples anytime...
  16. I will be able to call it simply from anywhere - even from scripts!
  17. Tricky, but it can be done.
  18.  
  19. As a feature you can register you favourite sounds in a configuration
  20. file and well behaved programs will use the ones you like right now.
  21. It also has Arexx support - to be truly honest, that the ONLY way to
  22. use it...
  23.  
  24. Current version works rather well along the way I intended.
  25.  
  26.  
  27. Usage
  28. =====
  29.  
  30.     [run] upd [bufsize]
  31.  
  32. The "run" is ofcourse optional, but daemon really should be in the background
  33. unless you want the see the debugging information. "bufsize" is the abount
  34. of chip memory that each of the four buffers will use while playing. (These
  35. are allocated at start to make sure you will be able to play anytime - as long
  36. as you can get hold of the audio channels...). Default is 512 and specifying 
  37. less than 64 will give you the default.
  38.  
  39. Above won't produce any sound as you probably realize. Once run, the only way 
  40. to talk to upd is with Arexx - I even removed the BREAK stuff that was in it for
  41. Zound, since Arexx could hang around waiting for a reply forever when you
  42. interupted the sound that way. 
  43.  
  44. upd currently knows of three commands:
  45.  
  46.     file filepath [options] [anotherfilepath [options]]
  47.     id   id-in-s:upd.IDs
  48.     exit
  49.  
  50. Well, there is actually one more command: 'Can it, Marvin'. This will 
  51. silently interrupt the current sample. (To be truely honest, ANY command
  52. will interrupt a sample - if it's known, it will be used, otherwise the
  53. sound only stops).
  54.  
  55. The options are the same as for Zound except for the -n option that doesn't
  56. exist here (tell me you need it and I'll fix that too... sigh).
  57.  
  58. Example of usage (from WShell etc):
  59.  
  60.     "address play file 'sounds:chopper'
  61.     "address play id 2001
  62.     "address play exit
  63.  
  64. NOTE: Arexx normally converts everything to UPPERCASE and might try to
  65. do arithmetics etc on filenames which is why it's generally a good idea
  66. to 'singelquote' all paths, IDs etc. If you're looking for the port
  67. 'the hard way' to send your own message, the name is "PLAY" in uppercase.
  68.  
  69. NOTE2: If you are REALLY in a hurry to get rid of upd you could do this:
  70.  1) Send a any dummy Arexx message (this will stop the sound)
  71.  2) Send a break C to upd - break still works when upd is idle.
  72. or
  73.  A) Send the exit message. 
  74. This might sound much easier than above unless you (like me) have a trapped 
  75. DisplayBeep() that 'pings' via upd. In this case, producing a DisplayBeep() 
  76. and a break C is much simpler. The order is not relevant since the break 
  77. is "queued".
  78.  
  79.  
  80. Hints
  81. =====
  82.  
  83. Running upd from your SOUNDS: directory is a nice way to get rid of having
  84. you type the FULL path everytime you want to play a sample. (The daemon
  85. has no simple way of knowing WHERE you were when you sent the message 
  86. (that I know of) and therefore assumes it to be in the current directory)
  87.  
  88.  
  89.  
  90. Files:
  91. ======
  92.  
  93.     s:upd.IDs
  94.  
  95. This file contains the IDs of your favourite samples like a database
  96. the is easily editable. File format:
  97.  
  98. # Lines starting with '#' are comments
  99. # Id list for micro player daemon
  100. # Created 910201 Jonas Petersson (zap)
  101. # These sounds could be called for at certains situation
  102. # On severe error
  103. BUG    sounds:explosion -S
  104. # When asked for confirmation
  105. CONFIRM sounds:PressLeftMouseButton -L
  106. # Minor trouble
  107. ERROR   sounds:ImSorryDaveImAfraidICantDoThat -R
  108. # Personal shortcuts/favourites
  109. 2001    sounds:openpod -L sounds:hal -R
  110.  
  111. Removing entries will ofcourse result in no sound (this version of upd
  112. mourns about it on the standard output though, unless you redirect it).
  113.  
  114. Feel free to add whatever you like. Could be nice with some standard though.
  115. Suggestions are welcome.
  116.  
  117. NOTE: It *IS* possible to have white space, lowercase etc in the IDs, but
  118. it might cause confusion if used. Be warned.
  119.  
  120. NOTE2: The file is scanned once when the program starts. 
  121.  
  122. Return codes:
  123. =============
  124.  
  125. If the rexx command returns 20, the secondary result code gives the
  126. reason for the failure:
  127.  
  128. 10    Can't allocate channels. (NYI)
  129. 17    Can't open s:upd.IDs on request to play by ID.
  130. 18    Requested ID not found.
  131. 20    Error during parse of options.
  132. 21    Can't open file with sample.
  133. 22    File is IFF, but not FORM 8SVX.
  134. 23    Bad IFF file.
  135. 24    Bad CHAN length.
  136. 25    Bad VHDR length.
  137. 26    Can't open file 2nd time. (For stereo possibility)
  138. 30    Can't play backwards.
  139. 31    Can't allocate IOAudio structs.
  140. 32    Can't open ports for channels.
  141.  
  142.  
  143. Future enhancements:
  144. ====================
  145.  
  146. Maybe automatic detach (didn't work well in Aztec 5.0a, and I havn't really
  147. tried with 5.0d yet).
  148.  
  149. Probably not very much else - this is a simple sound daemon for minor
  150. background purposes of helping simple programs do more than DisplayBeep().
  151. I'd like to think of it as a complement to SPEAK: - if you want more
  152. you probably want it interactive. (Hmm, that's a thought - a SOUND: device)
  153.  
  154.  
  155.  
  156. Known Problems: 
  157. ===============
  158. 1. If your sample is on a floppy (or a very slow HD) there might be 
  159.    some sounds of silence when the playing rate exceeds the loading
  160.    rate... 
  161. Fix: You can now specify the amount of memory to be used by upd when you
  162.    start the daemon as in: 'upd 2000'. 
  163.  
  164. 2. Stereo and Fibonachi packed samples not yet supported (there are loading
  165.    problems - play them with 'Zound' instead for now).
  166. Fix: Stereo is OK now if you use the above size option (it actually worked
  167.    in RAM: before too - but I didn't enable it for the prerelease). As for 
  168.    Fibonachi: it's no too hard to fix, but I've never seen anyone using it -
  169.    is it worth the effort? If you happen to have a Fib-sample - PLEASE send it
  170.    to me - I dont' have the patience to reconstuct one by hand...
  171.  
  172.  
  173.  
  174.  
  175. Thanks to mjl@alison.at for the idea.
  176.  
  177.  
  178.  
  179.  
  180.     Jonas 'Zaphod' Petersson
  181.     Albrektsvagen 113A
  182.     S-603 53  Norrkoping
  183.     SWEDEN
  184.     Phone: +46 11 162517
  185.  
  186.     zaphod@magrathea.indic.se                   /* At home */
  187.     zap@indic.se                    /* At work  */
  188.     zaphod@slaka.sirius.se                   /* Absolute software */
  189.  
  190.  
  191. Feel free to send comments, bug reports (huh?), money, coke, beer, girls...
  192.  
  193. Just a "Hi, I liked your program" is just as good as a few bucks - I didn't
  194. write this to make money out of it...
  195.  
  196.  
  197.