home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac_os2 / pmaud11.zip / PMAUD11.DOC < prev    next >
Text File  |  1996-04-24  |  9KB  |  205 lines

  1. I hate OS/2's digital audio player.
  2.  
  3.  
  4.  
  5.  
  6. Ok, don't get me wrong; it works well, and can be handy. But when you are
  7. pouring through several (or worse, several hundred) .WAV files in one folder,
  8. having to deal with that thing gets on my nerves.
  9.  
  10.  
  11.  
  12. So, I wrote a replacement.
  13.  
  14.  
  15.  
  16. WHAT IS THIS THING, ANYHOW?
  17. ---------------------------
  18. This is PMaud. It's the world's simplest Presentation Manager program. It
  19. simply takes a command line of a file (or several files), and plays them all.
  20. No windows. No buttons. No overhead or extra mouse clicks.
  21.  
  22.  
  23. HERE'S HOW TO INSTALL THE THING:
  24. --------------------------------
  25. 1) Make sure you have the EMX runtime installed on your system.
  26.    This can be found at ftp://hobbes.nmsu.edu/os2/unix/emx09b/emxrt.zip,
  27.    or on many OS/2-related BBSes. (LOTS of fine OS/2 products use this, so
  28.    you're probably going to have to get it eventually, anyhow...hey, it's free,
  29.    so why not?)
  30. 2) copy the .EXEs to your favorite place. Somewhere in the path'd be nice.
  31. 3) Find a nice quiet place to hide an icon on your desktop. I stick them in
  32.    OS/2 system/Productivity, myself.
  33. 4) Open the Templates folder. Drag a 'Program' template to your nice quiet
  34.    place, and when the Program Settings notebook opens...
  35. 5) ...Set the filename to whatever directory PMaud.exe is in, and the filename.
  36.    (i.e. -- c:\nifties\pmaud.exe)
  37. 6) Leave the rest of the fields blank.
  38. 7) Click on the 'Associations' notebook tab.
  39. 8) Find 'Digital Audio'...add it.
  40. 9) Also, add *.WAV, *.IFF, *.AIF, *.AU, and *.SND, as well.
  41. 10) Click on the 'General' notebook tab.
  42. 11) Change the name to 'PMaud'...make an icon, if you choose.
  43. 12) Find the WEPM.EXE icon, in your MMOS2 directory.
  44. 13) Right-click it, select 'settings'.
  45. 14) Click on the 'Associations' notebook tab.
  46. 15) Remove 'Digital Audio', and all the file extensions.
  47.  
  48. (if you are really daring, you could set both apps up to handle the same
  49. associations, so both programs are on a sound object's 'OPEN' menu, but I
  50. prefer this, as I never really do any .WAV editing...)
  51.  
  52. There we are! Whew!
  53.  
  54.  
  55. HOW TO USE PMAUD:
  56. -----------------
  57. Now, open up a drive object, find a sound object (something with a .WAV
  58. extension...try in the \mmos2\sounds directory), and double-click it. It should
  59. play the sound file without (forgive the pun) the extra bells and whistles.
  60.  
  61. You can also, if you don't choose to keep the 'program' icon you pulled off
  62. the template for PMaud in a nice quiet place...that is, right on your desktop
  63. or somewhere convenient, you can also drag sound file objects and drop them
  64. onto the PMaud icon. That will play them as well.
  65.  
  66. If you want to pass a command line to PMaud, in the settings notebook for it,
  67. under 'Parameters' on the 'Program' page, put (without the quotes)
  68.  
  69. "[Sound file to play?]"
  70.  
  71. And you will be prompted when PMaud loads for a filename. (This works for any
  72. OS/2 program, put something in "[]" in the parameters field of any program
  73. object, and it'll prompt you before loading.)
  74.  
  75.  
  76. WEBEXPLORER INSTALLATION:
  77. -------------------------
  78. If you want to use PMaud with WebExplorer, and get 'transparent' sound
  79. playback, follow these steps...
  80.  
  81. 1) Load up WebExplorer.
  82. 2) Click on the 'Configure' menu.
  83. 3) Select 'Viewers'
  84. 4) Find these types : "WAV audio format",
  85.                       "AU audio format",
  86.                   and "AIF/AIFF/AIFC audio format".
  87. 5) For all of these, put "x:\path\pmaud.exe" in the 'program' field, where
  88.    "x:\path\" is the drive and directory where you put pmaud.exe.
  89.  
  90.  
  91. Now, next time you follow a link to a .WAV, .AU, or .AIF? file, it'll simply
  92. play it without the extra overhead and fanfare of WebExplorer's (lousy)
  93. sound player.
  94.  
  95. One warning, though. You'll probably be downloading the sound file everytime
  96. you want to hear it by this method, as PMaud discards the file after playback,
  97. with no chance or option to save the file. (Of course, it's likely that file
  98. is sitting in your \tcpip\tmp directory, but with a cryptic filename.) As you
  99. can see, not having a 'Save As...' menu option, or a menu at all can be a
  100. blessing and a curse.
  101.  
  102.  
  103. HOW TO CHANGE THESE PROGRAMS' ICONS:
  104. ------------------------------------
  105.      (for the newbie OS/2 programmer...)
  106. 1) Edit the file PMAUD.RC with your favorite text editor.
  107. 2) Find the line "POINTER 1 wavrec.ico"
  108. 3) change "wavrec.ico" to a path\filename on your system. After this procedure
  109.    is done, you won't need to keep that icon anymore if you don't want it.
  110.    (That is to say, a copy of it will be attached to the .EXEs; OS/2 won't
  111.    be reading that icon from the file you specify.)
  112. 4) save the file and quit your text editor.
  113. 5) from the command line, type 
  114.  
  115.       rc pmaud.rc pmaud.exe
  116.       rc pmaud.rc audt.exe
  117.  
  118. (rc.exe is a program that comes with OS/2...it's in your path somewhere, in all
  119. likelyhood)
  120.  
  121. There! Now, there should be a new icon attached to this file. Run this copy of
  122. audt.exe from a OS/2 Window...did your icon appear in the control box in the
  123. upper left hand corner?  Good. It worked.
  124.  
  125. You don't need to keep any of the files in this archive except the .EXEs you
  126. want in order for PMaud or audt to run correctly.
  127.  
  128.  
  129. ALSO INCLUDED:
  130. --------------
  131. The source code is in this archive. It's real simple. This was written with
  132. EMX 0.9b and the multimedia import libraries. (You can find all this stuff at
  133. ftp://hobbes.nmsu.edu/os2/unix/emx09b/  ...the multimedia libs are one more
  134. directory down in /contrib/mm4emx10.zip) If EMX is installed correctly, the
  135. makefile should compile these with no complaints.
  136.  
  137. Also included is the source code (all...oh, say, FIVE lines of it) and program
  138. audt.exe...this is the same as PMaud, but it is a 'VIO' program (that is, it
  139. runs in an 'OS/2 Window' or 'OS/2 Full Screen' session.) The command line
  140. is the same...this can be handy for adding some life to batch (*.cmd) files and
  141. such. Be creative with it. It can handle wildcards (so can PMaud). So if I were
  142. to run "audt.exe c:\mmos2\sounds\*.wav", it'd run all the .WAV files in my
  143. MMOS/2 sound bytes directory.
  144.  
  145.  
  146. HARDWARE/SOFTWARE SUPPORTED:
  147. ----------------------------------------
  148. Theoretically, PMaud should handle any sound file that MMOS/2 understands.
  149. (However, I have only tested .WAV, .AU, and .SND files with it...My Ensoniq
  150. Soundscape doesn't do MIDI playback due to a pathetically piss-poor driver.
  151. Ever see Ensoniq's Win95 driver for this card? Absolutely FEATURE PACKED;
  152. it has full-duplex support, SB emulation for DOS windows, all sorts of volume
  153. controls, and the joystick port on it works. However, they have recently opted
  154. to discontinue their BETA OS/2 Warp driver, which has NONE of the above
  155. features. What PMaud does on my system is the extent of what the Ensoniq
  156. Soundscape drivers for Warp do. Everyone bitch at Ensoniq and get them to get
  157. their asses in gear for OS/2, eh?  Good. So someone pass this thing a MIDI file
  158. on the command line, and see if it plays it, then get back to me.)
  159.  
  160. Anyhow, ranting aside, this has only been tested under Warp red-spine, but it
  161. should, in all likelyhood, work with any OS/2 from 2.0 up, with Multimedia
  162. installed. Although, before we get too far from the topic of device drivers,
  163. this program opens the digital audio device (your soundcard) in SHARED mode.
  164. That is, other programs may use it at the same time as PMaud, even other
  165. instances of PMaud. (If you double-click on a second sound object before the
  166. first one completes playback, for example). However, depending on what kind of
  167. sound card is in your machine, and what the drivers choose to do is beyond my
  168. control. Some may mix and play both sounds at once (which is super-cool!), or,
  169. like my card, it may choose to end playback of the first sound, and play the
  170. second. I'd be curious to know how different setups handle this; please feel
  171. free to email me and let me know what your computer does.
  172.  
  173.  
  174. FREEWARE:
  175. ---------
  176. There is no charge to use these programs. Although I'd really appreciate an
  177. email if you like (or even if you don't like) them, so I know people are using
  178. (or at least noticing) my work.
  179.  
  180.  
  181. FINAL THOUGHTS:
  182. ---------------
  183. To conclude, a BIG thanks to jcc on IRC's #os/2 channel for all his help
  184. passing my programs around. /me gives jcc big hug.  :)
  185.  
  186. So, another freeware app, to make life a little simpler for us Warpers. Enjoy.
  187.                                --Ryan C. Gordon (mailto:warped42@ix.netcom.com)
  188.  
  189.  
  190. VERSION HISTORY:
  191. ----------------
  192. v1.0 : Works. Works well. Love it.
  193. v1.1 : Shrunk the EXEs by about 80% through various compiler options.
  194.        Default icon added to .exe files.
  195.        Updated the docs to make it a wee bit clearer.
  196.        Added a section on how to change the default icon, and this history.
  197.        Added wildcard expansion (being the only NON-API library call in
  198.          the entire program)
  199.  
  200. (who'd've thought I could write so much documentation for such a TINY
  201.  program?!  heheh...)
  202.  
  203.  
  204.  
  205.