home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / misc / arq_upd.lzh / arq_upd / UPD.doc < prev    next >
Encoding:
Text File  |  1991-05-31  |  5.8 KB  |  168 lines

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