home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / do_mci.zip / ReadMe.Txt < prev    next >
Text File  |  1993-11-28  |  2KB  |  44 lines

  1. Notes on Do_MCI.C
  2.  
  3. I thought it might be useful to have a little sample of just how simple 
  4. programming multimedia devices on OS/2 can be. The enclosed program 
  5. allows you to manipulate the sound card in a very simple fashion.
  6.  
  7. MMOS2 provides a number of API's to the multimedia devices.  By far, 
  8. the simplest of these is the string interface.  This interface is 
  9. documented in the 'Multimedia With REXX' .INF that gets installed 
  10. when you install MMOS2.  Unfortunately, REXX seems to be terribly 
  11. slow at this business.  It turns out that the string interface isn't 
  12. nearly so slow when invoked from C.  Problem is, you need to have the 
  13. MMOS2 SDK to use it ... or do you.
  14.  
  15. Actually, there's not much magic in the SDK.  The real biggie is that 
  16. you need libraries to link against.  That turns out not to be much of 
  17. a problem.  For this sample,  just run IMPLIB against MDM.DLL in your 
  18. MMOS2 directory to create a library.  The interface is fully documented 
  19. in 'The OS/2 Online Book Collection', but if you don't have that, this 
  20. example program will set you on your way to being able to do a lot of 
  21. multimedia stuff with very little problem.
  22.  
  23. I compiled the program with Borland's C++.  If you have the C Set/2 you 
  24. may already have the libraries, I don't know.  The relevant thing is 
  25. that playing MIDI's, WAV's or AVI's is pretty trivial through this 
  26. interface.
  27.  
  28. The enclosed program simply reads MCI command strings and passes them 
  29. to MMOS2 through the mciSendString interface.  If there's a problem, 
  30. the error code is converted to a string through the mciGetErrorString 
  31. call.  Other than those two calls, the entire program is about reading 
  32. the text file and echoing it to the screen.  Not at all tough.
  33.  
  34. The file 'Sample.MCI' is a little example of how one of these scripts
  35. might look.
  36.  
  37. Enjoy.
  38.  
  39. P.S.: Comments, questions, nasty remarks - the best place to contact me 
  40. is on Norloff's board or IBM's NSC BBS.  Fairly often I check YCCMR.  I 
  41. check into other boards a lot more infrequently.
  42.  
  43. John McDonough
  44.