home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mmsspg.zip / mmsspg.inf (.txt)
OS/2 Help File  |  1999-05-12  |  800KB  |  18,001 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction ΓòÉΓòÉΓòÉ
  3.  
  4. This book provides guidelines for developing multimedia subsystems. Each 
  5. subsystem component is described in detail in individual chapters.  Models are 
  6. used to complement the information provided by component sample program 
  7. templates. 
  8.  
  9.  
  10. ΓòÉΓòÉΓòÉ 1.1. Additional Multimedia Information ΓòÉΓòÉΓòÉ
  11.  
  12.  Multimedia REXX - (online) 
  13.            Describes REXX functions that enable media control interface string 
  14.            commands to be sent from an OS/2 command file to control multimedia 
  15.            devices.  This online book is provided with OS/2 multimedia. 
  16.  
  17.  Guide to Multimedia User Interface Design - (41G2922) 
  18.            Describes design concepts to be considered when designing a CUA 
  19.            multimedia interface that is consistent within a particular 
  20.            multimedia product and across other products. 
  21.  
  22.  OS/2 Multimedia Device Driver Developers:  The Device Driver Source Kit for 
  23.  OS/2 contains documented source code and detailed information on how to build 
  24.  a virtual device driver (VDD) and audio physical device driver (PDD) for OS/2 
  25.  multimedia. 
  26.  
  27.  The kit covers the complete range of OS/2 physical and virtual device drivers, 
  28.  from printers, displays, SCSIs and CD-ROM drives, to the device drivers for 
  29.  Pen for OS/2 and OS/2 multimedia. Comprehensive descriptions of all the device 
  30.  driver interfaces and system services are included. 
  31.  
  32.  
  33. ΓòÉΓòÉΓòÉ 1.2. Using This Online Book ΓòÉΓòÉΓòÉ
  34.  
  35. Before you begin to use this online book, it would be helpful to understand how 
  36. you can: 
  37.  
  38.      Expand the Contents to see all available topics 
  39.      Obtain additional information for a highlighted word or phrase 
  40.      Use action bar choices. 
  41.  
  42.  How To Use the Contents 
  43.  
  44.  When the Contents window first appears, some topics have a plus (+) sign 
  45.  beside them.  The plus sign indicates that additional topics are available. 
  46.  
  47.  To expand the Contents if you are using a mouse, select the plus sign (+).  If 
  48.  you are using a keyboard, use the Up or Down Arrow key to highlight the topic, 
  49.  and press the plus key (+). 
  50.  
  51.  To view a topic, double-click on the topic (or press the Up or Down Arrow key 
  52.  to highlight the topic, and then press Enter). 
  53.  
  54.  How To Obtain Additional Information 
  55.  
  56.  After you select a topic, the information for that topic appears in a window. 
  57.  Highlighted words or phrases indicate that additional information is 
  58.  available.  You will notice that certain words in the following paragraph are 
  59.  highlighted in green letters, or in white letters on a black background. These 
  60.  are called hypertext terms.  If you are using a mouse, double-click on the 
  61.  highlighted word.  If you are using a keyboard, press the Tab key to move to 
  62.  the highlighted word, and then press the Enter key.  Additional information 
  63.  will appear in a window. 
  64.  
  65.  How To Use Action Bar Choices 
  66.  
  67.  Several choices are available for managing information presented in the 
  68.  M-Control Program/2 Programming Reference.  There are three pull-down menus on 
  69.  the action bar:  the Services menu, the Options menu, and the Help menu. 
  70.  
  71.  The actions that are selectable from the Services menu operate on the active 
  72.  window currently displayed on the screen.  These actions include the 
  73.  following: 
  74.  
  75.  Bookmark 
  76.     Sets a place holder so you can retrieve information of interest to you. 
  77.  
  78.     When you place a bookmark on a topic, it is added to a list of bookmarks 
  79.     you have previously set.  You can view the list, and you can remove one or 
  80.     all bookmarks from the list.  If you have not set any bookmarks, the list 
  81.     is empty. 
  82.  
  83.     To set a bookmark, do the following: 
  84.  
  85.       1. Select a topic from the Contents. 
  86.  
  87.       2. When that topic appears, choose the Bookmark option from the Services 
  88.          menu. 
  89.  
  90.       3. If you want to change the name used for the bookmark, type the new 
  91.          name in the field. 
  92.  
  93.       4. Select the Place radio button (or press the Up or Down Arrow key to 
  94.          select it). 
  95.  
  96.       5. Select OK.  The bookmark is then added to the bookmark list. 
  97.  
  98.  Search 
  99.     Finds occurrences of a word or phrase in the current topic, selected 
  100.     topics, or all topics. 
  101.  
  102.     You can specify a word or phrase to be searched.  You can also limit the 
  103.     search to a set of topics by first marking the topics in the Contents list. 
  104.  
  105.     To search for a word or phrase in all topics, do the following: 
  106.  
  107.       1. Choose the Search option from the Services pull-down. 
  108.  
  109.       2. Type the word or words to be searched. 
  110.  
  111.       3. Select All sections. 
  112.  
  113.       4. Select Search to begin the search. 
  114.  
  115.       5. The list of topics where the word or phrase appears is displayed. 
  116.  
  117.  Print 
  118.     Prints one or more topics.  You can also print a set of topics by first 
  119.     marking the topics in the Contents list. 
  120.  
  121.     You can print one or more topics.  You can also print a set of topics by 
  122.     first marking the topics on the Contents list. 
  123.  
  124.     To print the document Contents list, do the following: 
  125.  
  126.       1. Select Print from the Services menu. 
  127.  
  128.       2. Select Contents. 
  129.  
  130.       3. Select Print. 
  131.  
  132.       4. The Contents list is printed on your printer. 
  133.  
  134.  Copy 
  135.     Copies a topic you are viewing to a file you can edit. 
  136.  
  137.     You can copy a topic you are viewing into a temporary file named TEXT.TMP. 
  138.     You can later edit that file by using an editor such as the System Editor. 
  139.  
  140.     To copy a topic, do the following: 
  141.  
  142.       1. Expand the Contents list and select a topic. 
  143.  
  144.       2. When the topic appears, select Copy to file from the Services menu. 
  145.  
  146.     The system copies the text pertaining to that topic into the temporary 
  147.     TEXT.TMP file. 
  148.  
  149.     For information on any of the other choices in the Services menu, highlight 
  150.     the choice and press the F1 key. 
  151.  
  152.  Options 
  153.     Changes the way the Contents is displayed. 
  154.  
  155.     You can control the appearance of the Contents list. 
  156.  
  157.     To expand the Contents and show all levels for all topics, select Expand 
  158.     all from the Options menu. 
  159.  
  160.     For information on any of the other choices in the Options menu, highlight 
  161.     the choice and press the F1 key. 
  162.  
  163.  
  164. ΓòÉΓòÉΓòÉ 2. What's New... ΓòÉΓòÉΓòÉ
  165.  
  166. This release of the Multimedia Subsystem Programming Guide includes the 
  167. following addition: 
  168.  
  169.      Real-Time MIDI Subsystem 
  170.  
  171.  
  172. ΓòÉΓòÉΓòÉ 3. Multimedia Subsystems Overview ΓòÉΓòÉΓòÉ
  173.  
  174. OS/2 multimedia (referred to as Multimedia Presentation Manager/2 or MMPM/2 in 
  175. previous releases) has an extendable architecture that makes it possible to add 
  176. new functions, devices, and multimedia data formats as the technology of 
  177. multimedia advances.  This chapter provides a general overview of the subsystem 
  178. components provided with the OS/2 multimedia system.  Subsequent chapters 
  179. include detailed guidelines on how to develop and install your own OS/2 
  180. multimedia subsystem through the use of the sample programs illustrated in the 
  181. following figure. Each sample program serves as a template that can be modified 
  182. easily to meet your multimedia requirements. Use these sample programs to 
  183. develop and install media control drivers, stream handlers, and I/O procedures 
  184. for OS/2 multimedia. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 3.1. OS/2 Multimedia System Architecture ΓòÉΓòÉΓòÉ
  188.  
  189. The following figure illustrates the subsystem components provided by the OS/2 
  190. multimedia system.  These subsystems (media control drivers, stream handlers, 
  191. and I/O procedures) are controlled by managers that oversee a range of 
  192. activities in the OS/2 multimedia environment. 
  193.  
  194. At the Ring 3 level, OS/2 multimedia employs a Media Device Manager (MDM), 
  195. which manages logical media devices representing audio adapters, CD-ROM drives, 
  196. and other hardware devices.  Amongst its duties, MDM determines which process 
  197. gains access when two or more applications attempt to control a media device. 
  198.  
  199. The Sync/Stream Manager (SSM) is also available to manage streaming and 
  200. synchronization calls initiated by the media control drivers.  This eliminates 
  201. the need for each media driver to provide its own solution for these common 
  202. multimedia requirements.  Pairs of stream handlers implement the transport of 
  203. data from a source to a target device while the SSM provides coordination and 
  204. central management of data buffers and synchronization data. 
  205.  
  206. Lastly, the MMIO Manager enables subsystem components such as media control 
  207. drivers and applications to access and manipulate a variety of data objects, 
  208. including images, graphics, digital audio, and digital video.  These objects 
  209. can be stored in a variety of file formats on a variety of storage systems. 
  210. The MMIO Manager uses installable I/O procedures to direct the input and output 
  211. associated with reading from and writing to different types of storage systems 
  212. or file formats. 
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 3.2. Extendable Device Support ΓòÉΓòÉΓòÉ
  216.  
  217. The system architecture of OS/2 multimedia extensions is designed to be 
  218. extendable.  This level of modularity allows independent development of support 
  219. for new hardware devices, logical media devices, and file formats. 
  220.  
  221. Examples of media control interface devices are listed in the following table. 
  222. The purpose of the table is to show the logical device types that can be 
  223. supported and already have media control interface definitions. Devices 
  224. currently supported by OS/2 multimedia are indicated by (X) marks. 
  225.  
  226. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  227. ΓöéMedia Device  ΓöéOS/2      ΓöéString        ΓöéConstant                          Γöé
  228. ΓöéType          ΓöéMultimediaΓöé              Γöé                                  Γöé
  229. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  230. ΓöéAmplifier     ΓöéX         Γöéampmix        ΓöéMCI_DEVTYPE_AUDIO_AMPMIX          Γöé
  231. Γöémixer         Γöé          Γöé              Γöé                                  Γöé
  232. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  233. ΓöéAudio tape    Γöé          Γöéaudiotape     ΓöéMCI_DEVTYPE_AUDIO_TAPE            Γöé
  234. Γöéplayer        Γöé          Γöé              Γöé                                  Γöé
  235. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  236. ΓöéCD audio      ΓöéX         Γöécdaudio       ΓöéMCI_DEVTYPE_CD_AUDIO              Γöé
  237. Γöéplayer        Γöé          Γöé              Γöé                                  Γöé
  238. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  239. ΓöéCD-XA player  ΓöéX         Γöécdxa          ΓöéMCI_DEVTYPE_CDXA                  Γöé
  240. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  241. ΓöéDigital audio Γöé          Γöédat           ΓöéMCI_DEVTYPE_DAT                   Γöé
  242. Γöétape          Γöé          Γöé              Γöé                                  Γöé
  243. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  244. ΓöéDigital video ΓöéX         Γöédigitalvideo  ΓöéMCI_DEVTYPE_DIGITAL_VIDEO         Γöé
  245. Γöéplayer        Γöé          Γöé              Γöé                                  Γöé
  246. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  247. ΓöéHeadphone     Γöé          Γöéheadphone     ΓöéMCI_DEVTYPE_HEADPHONE             Γöé
  248. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  249. ΓöéMicrophone    Γöé          Γöémicrophone    ΓöéMCI_DEVTYPE_MICROPHONE            Γöé
  250. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  251. ΓöéMonitor       Γöé          Γöémonitor       ΓöéMCI_DEVTYPE_MONITOR               Γöé
  252. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  253. ΓöéOther         Γöé          Γöéother         ΓöéMCI_DEVTYPE_OTHER                 Γöé
  254. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  255. ΓöéVideo overlay Γöé          Γöévideooverlay  ΓöéMCI_DEVTYPE_OVERLAY               Γöé
  256. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  257. ΓöéSequencer     ΓöéX         Γöésequencer     ΓöéMCI_DEVTYPE_SEQUENCER             Γöé
  258. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  259. ΓöéSpeaker       Γöé          Γöéspeaker       ΓöéMCI_DEVTYPE_SPEAKER               Γöé
  260. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  261. ΓöéVideodisc     ΓöéX         Γöévideodisc     ΓöéMCI_DEVTYPE_VIDEODISC             Γöé
  262. Γöéplayer        Γöé          Γöé              Γöé                                  Γöé
  263. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  264. ΓöéVideo         Γöé          Γöévideotape     ΓöéMCI_DEVTYPE_VIDEOTAPE             Γöé
  265. Γöétape/cassette Γöé          Γöé              Γöé                                  Γöé
  266. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  267. ΓöéWaveform audioΓöéX         Γöéwaveaudio     ΓöéMCI_DEVTYPE_WAVEFORM_AUDIO        Γöé
  268. Γöéplayer        Γöé          Γöé              Γöé                                  Γöé
  269. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  270.  
  271. Note:  M-Control Program Version 2.01, which supports the M-Motion Video 
  272.        Adapter/A, provides overlay extensions for OS/2 multimedia. 
  273.  
  274.  
  275. ΓòÉΓòÉΓòÉ 3.3. Media Control Drivers ΓòÉΓòÉΓòÉ
  276.  
  277. The media control interface provides the primary mechanism for application 
  278. control of media devices.  The top layer consists of the Media Device Manager 
  279. (MDM), which provides resource management for media devices.  The bottom layer 
  280. consists of media control drivers (MCDs)-dynamic link libraries that implement 
  281. the function of a media device. 
  282.  
  283. Applications interact with the media control interface (and thus with media 
  284. devices) in two ways, through either a procedural interface (mciSendCommand) or 
  285. a string interface (mciSendString).  However, before an MCD can interpret a 
  286. string command, the MDM must use a command table to change the string into an 
  287. equivalent procedural command. 
  288.  
  289. MCDs do not directly control hardware devices.  Instead, they pass commands 
  290. through a subsystem or physical device driver interface.  This arrangement 
  291. frees MCDs from having to be knowledgeable about the hardware in order to 
  292. implement its function.  However, MCDs have to be knowledgeable about the means 
  293. of implementing that function.  For example, a CD-Audio player that is 
  294. implemented using a CD-ROM drive with a built-in Digital-to-Analog Converter 
  295. (DAC) can perform its function by simply issuing device IOCtl commands to the 
  296. drive's device driver.  However, a CD-Audio player that uses a separate Digital 
  297. Signal Processor (DSP) for playback of the digital audio data is implemented 
  298. quite differently, calling functions to manage a DSP coprocessor and data 
  299. transfer between the drive and the coprocessor. 
  300.  
  301. MCDs can also use the services of the other OS/2 multimedia subsystems such as 
  302. the Stream Programming Interface (SPI).  This subsystem provides data streaming 
  303. services that allow stream-handlers to control the flow of data from one device 
  304. to another in real time, maintaining a continuous flow of data between physical 
  305. devices. 
  306.  
  307.  
  308. ΓòÉΓòÉΓòÉ 3.4. I/O Procedures ΓòÉΓòÉΓòÉ
  309.  
  310. Multimedia input/output (MMIO) services provides both I/O and CODEC procedures. 
  311. I/O procedures are message-based handlers, which direct the input and output 
  312. associated with reading and writing to different types of storage systems or 
  313. file formats.  Applications and the MMIO subsystem communicate to I/O 
  314. procedures (DLL files) through the use of MMIO messages.  When MMIO receives a 
  315. request from an application through a function call, the MMIO Manager sends a 
  316. predefined message for that operation to the I/O procedure responsible for that 
  317. particular file format or storage system.  In turn, the I/O procedure performs 
  318. operations based on the messages it receives from the MMIO Manager or an 
  319. application. 
  320.  
  321. These messages are designed for efficient communications to all I/O procedures. 
  322. The I/O procedures, however, must be able to process the messages or pass them 
  323. on to a child I/O procedure.  For example, if an I/O procedure receives a 
  324. message requesting the compression of data object, the I/O procedure must be 
  325. able to process the message, or pass the message to a CODEC procedure. The 
  326. following figure illustrates the interaction of I/O and CODEC procedures in the 
  327. MMIO subsystem. 
  328.  
  329. The MMIO Manager calls the following types of procedures: 
  330.  
  331.  File Format 
  332.            A file format procedure is an I/O procedure that manipulates data at 
  333.            the element level, with each procedure handling a different element 
  334.            type such as audio, image, or MIDI.  It processes the data "within" 
  335.            the object and does not rely on any other file format I/O procedures 
  336.            to process the data.  However, a file format procedure might need to 
  337.            call a storage system I/O procedure to obtain data within a file 
  338.            containing multiple elements. 
  339.  
  340.  Storage System 
  341.            A storage system procedure is an I/O procedure that "unwraps" a data 
  342.            object for a file format procedure to access.  Storage system 
  343.            procedures are unaware of the format of the data object contained 
  344.            within the wrapper. 
  345.  
  346.  CODEC 
  347.            A CODEC procedure operates on data within a file or buffer.  Based 
  348.            on the data content, an I/O procedure can load a CODEC procedure to 
  349.            either compress or decompress data. 
  350.  
  351.  
  352. ΓòÉΓòÉΓòÉ 3.5. Stream Handlers ΓòÉΓòÉΓòÉ
  353.  
  354. The multimedia system provides stream handlers at both the system kernel level 
  355. (Ring 0) and the application level (Ring 3). Stream handlers are at Ring 0 and 
  356. Ring 3 because some streams are ideally controlled by a direct connection 
  357. between the stream handler and a device's physical device driver (PDD).  Other 
  358. streams are not associated with a data source or target, which maps physically 
  359. to a specific device.  For example, the file system stream handler is a DLL, 
  360. because all file system input/output (I/O) functions are available as Ring 3 
  361. OS/2 functions, and service all file system devices.  This eliminates the need 
  362. to build a specific stream handler device driver for every device the file 
  363. system can access. 
  364.  
  365. Stream handlers are responsible for controlling the flow of application data, 
  366. in a continuous, real-time manner.  Each handler can establish multiple data 
  367. stream instances, where each stream involves data of a specific type; for 
  368. example, MIDI (Musical Instrument Digital Interface) or ADPCM (Adaptive Delta 
  369. Pulse Code Modulation).  The application, through the use of a media control 
  370. driver, invokes an SPI function to create the stream and another SPI function 
  371. to activate the data stream.  The application does not have to continuously 
  372. invoke SPI functions to maintain data flow.  Instead, the stream handler keeps 
  373. the I/O continuous, simplifying the operations of the application. 
  374.  
  375.  
  376. ΓòÉΓòÉΓòÉ 4. Media Control Drivers ΓòÉΓòÉΓòÉ
  377.  
  378. This section shows you how to write a media control driver (MCD) by 
  379. illustrating the programming interfaces used by streaming and nonstreaming 
  380. MCDs.  The following discussion focuses on the MCDs depicted in the Duet Player 
  381. sample programs (see the OS/2 Multimedia Application Programming Guide for 
  382. details.) The waveform audio MCD uses SPI data streaming services to handle the 
  383. creation and management of source and target stream handlers.  However, the CD 
  384. audio MCD typically has no data flow associated with it as most CD audio 
  385. devices process data internally (internal to the device without any help from 
  386. the main CPU). 
  387.  
  388. Source code is provided for the following media control driver samples located 
  389. in the \TOOLKIT\SAMPLES\MM subdirectory: 
  390.  
  391.  Media Control Driver Template (MCDTEMP) 
  392.            Provides a basic template to write an MCD.  Refer to the ADMCT and 
  393.            CDMCIDRV subdirectories for specific streaming or MMIO samples. 
  394.  
  395.  Waveform Audio Media Control Driver (ADMCT) 
  396.            Provides an example of how to control a streaming device.  Streaming 
  397.            devices use the services of the Sync/Stream Manager (SSM) of OS/2 
  398.            multimedia to control the data stream from a source location to a 
  399.            target location.  For example, the audio adapter used in Duet Player 
  400.            I is a streaming device which plays back waveform audio files stored 
  401.            on the user's hard disk.  The PM application sends a request to the 
  402.            Media Device Manager (MDM) to play the file.  In turn, the MDM calls 
  403.            the waveform audio MCD, which uses stream handlers to buffer data 
  404.            from the waveform file on disk (source) to the audio adapter 
  405.            (target). 
  406.  
  407.  CD Media Control Driver (CDMCIDRV) 
  408.            Provides an example of how to control a nonstreaming device. 
  409.            Nonstreaming devices stream data within the device.  A device that 
  410.            streams data internally does not need to use buffered I/O because 
  411.            the source and destination of the data is within the device. 
  412.            Therefore, a nonstreaming device does not require the use of the SSM 
  413.            subsystem of OS/2 multimedia.  For example, the CD-ROM device used 
  414.            in Duet Player II is a nonstreaming device.  When the CD audio MCD 
  415.            receives a PLAY, PAUSE, or STOP command from the program, it issues 
  416.            the appropriate IOCtls to the CD-ROM device to perform the function. 
  417.            The hardware does all the work, relaying the digital information off 
  418.            the disc, translating it into an audio signal, and piping it to a 
  419.            port such as a headphone jack. 
  420.  
  421.  
  422. ΓòÉΓòÉΓòÉ 4.1. Media Control Driver Architecture ΓòÉΓòÉΓòÉ
  423.  
  424. The objects that receive the device control commands issued by multimedia 
  425. applications using mciSendCommand or mciSendString are called media control 
  426. drivers.  Media control drivers are OS/2 dynamic link libraries (DLLs) that 
  427. provide a level of hardware independence for applications.  The Media Device 
  428. Manager (MDM) provides the interface to these media objects.  The MDM also 
  429. provides a level of component management, making it possible for an application 
  430. to synchronize its use of MCDs as well as share MCDs with other applications. 
  431.  
  432. The following figure illustrates the MCDs provided with the OS/2 multimedia 
  433. system. 
  434.  
  435.  
  436. ΓòÉΓòÉΓòÉ 4.2. Media Control Driver Entry Point ΓòÉΓòÉΓòÉ
  437.  
  438. All MCDs have commands passed to them in the same way, regardless of whether 
  439. they support streaming or nonstreaming devices.  Applications call either the 
  440. mciSendCommand or mciSendString functions to pass commands to the entry point, 
  441. mciDriverEntry.  In addition, some commands are generated by the MDM itself. 
  442. These are the commands for saving and restoring an instance. 
  443.  
  444. The following table shows the parameters associated with mciDriverEntry. 
  445.  
  446. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  447. ΓöéParameters               ΓöéDescription                        Γöé
  448. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  449. ΓöéPVOID pInstance          ΓöéPointer to instance structure of   Γöé
  450. Γöé                         Γöédriver.                            Γöé
  451. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  452. ΓöéUSHORT usMessage         ΓöéThe requested action to be         Γöé
  453. Γöé                         Γöéperformed.                         Γöé
  454. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  455. ΓöéULONG ulParam1           ΓöéFlag for the message.  This flag isΓöé
  456. Γöé                         Γöédefined separately for each        Γöé
  457. Γöé                         Γöémessage.                           Γöé
  458. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  459. ΓöéPVOID pParam2            ΓöéSecond data parameter, whose       Γöé
  460. Γöé                         Γöéinterpretation is dependent on the Γöé
  461. Γöé                         Γöémessage.                           Γöé
  462. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  463. ΓöéUSHORT usUserParm        ΓöéUser parameter returned on         Γöé
  464. Γöé                         Γöénotification message.              Γöé
  465. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  466.  
  467. The function of mciDriverEntry is to switch, based on the message, and perform 
  468. the appropriate task.  An example of a message is MCI_OPEN. 
  469.  
  470. Your driver must be able to handle messages in the following fashion: 
  471.  
  472.    1. Your driver must handle all the required messages. 
  473.  
  474.    2. Your driver must handle device-type messages for its particular class of 
  475.       device. 
  476.  
  477.       For example, if you are writing an MCD for a videodisc player, you must 
  478.       parse the videodisc-specific messages. 
  479.  
  480.    3. Your driver must handle messages that are specific to the device your 
  481.       driver supports. Suppose your driver controls a device that is one of the 
  482.       following device types: 
  483.  
  484.            CD-ROM/XA 
  485.            CD Audio 
  486.            Wave Audio 
  487.            Sequencer 
  488.            Digital Video 
  489.            Amp Mixer 
  490.            Videodisc 
  491.  
  492.       MDM has already defined device-type messages for these devices, which 
  493.       means a command table exists for each of these device types. If you want 
  494.       to support device-specific messages, you must create a device-specific 
  495.       command table. 
  496.  
  497.  If your driver is for a device type other than the device types listed, you 
  498.  must create a command table that includes both the device-type messages and 
  499.  the device-specific messages. 
  500.  
  501.  
  502. ΓòÉΓòÉΓòÉ 4.3. Types of Command Messages ΓòÉΓòÉΓòÉ
  503.  
  504. The Media Device Interface is a set of defined and extendable media control 
  505. commands.  How the MCD communicates with the appropriate hardware device 
  506. drivers to perform the requested command message is completely up to the MCD. 
  507. Device commands used by MCDs are grouped into required, basic, and system 
  508. command messages. 
  509.  
  510. Note:  Refer to the OS/2 Multimedia Programming Reference for syntax and 
  511.        associated parameters. 
  512.  
  513.  
  514. ΓòÉΓòÉΓòÉ 4.3.1. Required Command Messages ΓòÉΓòÉΓòÉ
  515.  
  516. Required commands are recognized by all devices and have actions common to all 
  517. media devices. The following table lists the required commands that must be 
  518. supported by your MCD. 
  519.  
  520. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  521. ΓöéMessage             ΓöéDescription                             Γöé
  522. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  523. ΓöéMCI_CLOSE           ΓöéCloses the device.                      Γöé
  524. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  525. ΓöéMCI_GETDEVCAPS      ΓöéGets the capabilities of a device.      Γöé
  526. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  527. ΓöéMCI_INFO            ΓöéGets textual information from the       Γöé
  528. Γöé                    Γöédevice.                                 Γöé
  529. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  530. ΓöéMCI_OPEN            ΓöéInitializes an instance of the device.  Γöé
  531. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  532. ΓöéMCI_STATUS          ΓöéGets status information from the device.Γöé
  533. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  534. ΓöéMCIDRV_SAVE         ΓöéIs sent from MDM to MCDs to save the    Γöé
  535. Γöé                    Γöécontext.                                Γöé
  536. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  537. ΓöéMCIDRV_RESTORE      ΓöéIs sent from MDM to MCDs to restore the Γöé
  538. Γöé                    Γöéstate of an inactive device context.    Γöé
  539. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  540.  
  541. The required command messages use a ULONG for the ulParam1 parameter that 
  542. contains any flags for the command message.  They also use the pParam2 
  543. parameter for a pointer to a message-specific data structure.  Your MCD might 
  544. create extended commands by adding new flags and data structure fields to those 
  545. already defined.  When you extend a command message, your MCD must still 
  546. support the required flags and fields. 
  547.  
  548. The following table identifies the flags and data structures of the required 
  549. command messages.  For a complete reference of media control interface 
  550. commands, refer to the OS/2 Multimedia Programming Reference. 
  551.  
  552. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  553. ΓöéMessage         ΓöéParameters (ulParam1)     ΓöéData Structure (pParam2)      Γöé
  554. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  555. ΓöéMCI_CLOSE       ΓöéMCI_NOTIFY                ΓöéMCI_GENERIC_PARMS             Γöé
  556. Γöé                ΓöéMCI_WAIT                  Γöé                              Γöé
  557. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  558. ΓöéMCI_GETDEVCAPS  ΓöéMCI_NOTIFY                ΓöéMCI_GETDEVCAPS_PARMS          Γöé
  559. Γöé                ΓöéMCI_WAIT                  Γöé                              Γöé
  560. Γöé                ΓöéMCI_STATUS                Γöé                              Γöé
  561. Γöé                ΓöéMCI_GETDEVCAPS_EXTENDED   Γöé                              Γöé
  562. Γöé                ΓöéMCI_GETDEVCAPS_MESSAGE    Γöé                              Γöé
  563. Γöé                ΓöéMCI_GETDEVCAPS_ITEM       Γöé                              Γöé
  564. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  565. ΓöéMCI_INFO        ΓöéMCI_NOTIFY                ΓöéMCI_INFO_PARMS                Γöé
  566. Γöé                ΓöéMCI_WAIT                  Γöé                              Γöé
  567. Γöé                ΓöéMCI_INFO_PRODUCT          Γöé                              Γöé
  568. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  569. ΓöéMCI_OPEN        ΓöéMCI_WAIT                  ΓöéMMDRV_OPEN_PARMS              Γöé
  570. Γöé                ΓöéMCI_OPEN_SHARABLE         Γöé                              Γöé
  571. Γöé                ΓöéMCI_OPEN_ELEMENT          Γöé                              Γöé
  572. Γöé                ΓöéMCI_OPEN_MMIO             Γöé                              Γöé
  573. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  574. ΓöéMCI_STATUS      ΓöéMCI_NOTIFY                ΓöéMCI_STATUS_PARMS              Γöé
  575. Γöé                ΓöéMCI_WAIT                  Γöé                              Γöé
  576. Γöé                ΓöéMCI_STATUS_CLIPBOARD      Γöé                              Γöé
  577. Γöé                ΓöéMCI_TRACK                 Γöé                              Γöé
  578. Γöé                ΓöéMCI_STATUS_ITEM           Γöé                              Γöé
  579. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  580. ΓöéMCIDRV_RESTORE  ΓöéMCI_WAIT                  ΓöéMCI_GENERIC_PARMS             Γöé
  581. Γöé                ΓöéMCI_SHAREABLE             Γöé                              Γöé
  582. Γöé                ΓöéMCI_EXCLUSIVE             Γöé                              Γöé
  583. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  584. ΓöéMCIDRV_SAVE     ΓöéMCI_WAIT                  ΓöéMCI_GENERIC_PARMS             Γöé
  585. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  586.  
  587.  
  588. ΓòÉΓòÉΓòÉ 4.3.2. Opening an MCD ΓòÉΓòÉΓòÉ
  589.  
  590. MCI_OPEN is the first message received by the MCD. This message instructs the 
  591. driver to create and initialize an instance of a particular device.  The MCD 
  592. must allocate and initialize the instance structure.  Note that the MCI_OPEN 
  593. message does not make the instances active. 
  594.  
  595. Because the MDM needs to pass additional information to the drivers, the open 
  596. structure for MCDs is different from the MCI_OPEN_PARMS structure.  In 
  597. addition, the MCDs need to return information to the MDM.  If the application 
  598. requests a NOTIFY on the MCI_OPEN message, the MCD sends back the open NOTIFY 
  599. on the MCIDRV_RESTORE message.  This is transparent to the application. The MCD 
  600. does not receive any of the following flags on an MCI_OPEN: 
  601.  
  602.      MCI_OPEN_ALIAS 
  603.      MCI_NOTIFY 
  604.      MCI_OPEN_TYPE_ID 
  605.  
  606.  On the MCI_OPEN message, pParam2 points to the MMDRV_OPEN_PARM structure 
  607.  located in the MMDRVOS2.H file.  This structure contains information for the 
  608.  MCD. 
  609.  
  610.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  611.   ΓöéField                   ΓöéIn/Out  ΓöéDescription                               Γöé
  612.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  613.   ΓöéHWND hwndCallback       ΓöéIn      ΓöéWindow handle used for mciDriverNotify.   Γöé
  614.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  615.   ΓöéUSHORT  usDeviceID      ΓöéIn      ΓöéDevice ID assigned to this instance.  ThisΓöé
  616.   Γöé                        Γöé        Γöéfield is filled in by MDM.                Γöé
  617.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  618.   ΓöéUSHORT  usDeviceType    ΓöéIn      ΓöéDevice type number for this instance.     Γöé
  619.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  620.   ΓöéUSHORT  usDeviceOrd     ΓöéIn      ΓöéDevice ordinal number for this instance.  Γöé
  621.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  622.   ΓöéPVOID  pInstance        ΓöéInOut   ΓöéPointer to instance structure initialized Γöé
  623.   Γöé                        Γöé        Γöéby driver.  The driver fills in this      Γöé
  624.   Γöé                        Γöé        Γöéparameter.                                Γöé
  625.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  626.   ΓöéCHAR   szDevDLLName[260]ΓöéIn      ΓöéCharacter string containing               Γöé
  627.   Γöé                        Γöé        Γöédevice-specific DLL name to call for the  Γöé
  628.   Γöé                        Γöé        Γöéopen.                                     Γöé
  629.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  630.   ΓöéPSZ  pszElementName     ΓöéIn      ΓöéTypically a file name.  If OPEN_PLAYLIST  Γöé
  631.   Γöé                        Γöé        Γöéis specified, this is a pointer to a      Γöé
  632.   Γöé                        Γöé        Γöémemory playlist.  If OPEN_MMIO is         Γöé
  633.   Γöé                        Γöé        Γöéspecified, this is a MMIO handle.         Γöé
  634.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  635.   ΓöéUSHORT usDevParmLen     ΓöéIn      ΓöéDevice parameters data block length.      Γöé
  636.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  637.   ΓöéPVOID  pDevParm         ΓöéIn      ΓöéDevice parameters data block. This data isΓöé
  638.   Γöé                        Γöé        Γöéunique to each type of device and is      Γöé
  639.   Γöé                        Γöé        Γöéretrieved from the MMPM2.INI file. (for   Γöé
  640.   Γöé                        Γöé        Γöéexample, LVD  "PORT=COM1 SPEED=9600N71"). Γöé
  641.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  642.   ΓöéUSHORT                  ΓöéInOut   ΓöéNumber of resource units this instance    Γöé
  643.   ΓöéusResourceUnitsRequired Γöé        Γöérequires. See Resource Units and Classes. Γöé
  644.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  645.   ΓöéUSHORT  usResourceClass ΓöéInOut   ΓöéResource class this instance belongs to.  Γöé
  646.   Γöé                        Γöé        ΓöéSee Resource Units and Classes.           Γöé
  647.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  648.   ΓöéUSHORT                  ΓöéInOut   ΓöéResource priority for this instance.      Γöé
  649.   ΓöéusResourcePriority      Γöé        Γöé                                          Γöé
  650.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  651.   ΓöéULONG ulParam2          ΓöéIn      ΓöéPointer to MCI_OPEN structure.            Γöé
  652.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  653.  
  654.  
  655. ΓòÉΓòÉΓòÉ 4.3.3. Subsystem Messages ΓòÉΓòÉΓòÉ
  656.  
  657. MDM provides resource management to MCDs using the following messages: 
  658.  
  659.      MCIDRV_SAVE 
  660.      MCIDRV_RESTORE 
  661.  
  662.  MCIDRV_RESTORE and MCIDRV_SAVE allow the MDM to tell the MCD when to make a 
  663.  device context active and inactive. These commands are always sent with the 
  664.  MCI_WAIT flag on. Not all MCDs need to support these messages completely, but 
  665.  they are provided. The MCIDRV_SAVE and MCIDRV_RESTORE messages are not sent by 
  666.  applications. 
  667.  
  668.  After sending an MCI_OPEN message, the MDM sends an MCIDRV_RESTORE message to 
  669.  the MCD to make the device context active. The MCD should not expect to always 
  670.  receive an MCIDRV_RESTORE message right after an MCI_OPEN. Certain conditions 
  671.  require a device context to be opened but not made active. One such condition 
  672.  is if a device context is opened as non-shareable, and then a second device 
  673.  context is opened as shareable. The second device context is opened and put in 
  674.  the inactive stack by the MDM. Therefore, MCDs should not make a device 
  675.  context active on an open, but only on an MCIDRV_RESTORE. 
  676.  
  677.  MDM sends an MCIDRV_SAVE message to the MCD to make an instance inactive. When 
  678.  the MCD receives the save message, it should query the state of the device 
  679.  (its file location, track, volume level, and so on) and save this data in the 
  680.  instance structure. The instance should also be placed in a paused state. Upon 
  681.  receiving the restore command, the driver should restore the device based on 
  682.  the state information in the instance.  If the device was playing or recording 
  683.  when it was saved, then it should be put back into that state on the restore. 
  684.  
  685.  The following commands can be sent to inactive instances: 
  686.  
  687.      MCI_CLOSE 
  688.      MCI_INFO 
  689.      MCI_STATUS 
  690.      MCI_GETDEVCAPS 
  691.  
  692.  MCDs should be able to handle these commands at any time for any device 
  693.  context. Once the first RESTORE is complete, other commands can be processed. 
  694.  
  695.  Note:  For detailed descriptions of MCIDRV_RESTORE and MCIDRV_SAVE, refer to 
  696.         "Subsystem Messages" in the OS/2 Multimedia Programming Reference. 
  697.  
  698.  
  699. ΓòÉΓòÉΓòÉ 4.3.4. Wait and Notify Flags ΓòÉΓòÉΓòÉ
  700.  
  701. MCI_WAIT specifies that the application should not send a notification message. 
  702. It also specifies that the driver should not return to the caller until the 
  703. entire command has been completed. 
  704.  
  705. MCI_NOTIFY specifies that upon completion of the command a notify message is to 
  706. be sent to the application using the mdmDriverNotify function. If the notify 
  707. flag is specified, the MCD should perform error checking and minimal processing 
  708. on the command before returning to the caller.  Error checking should ensure 
  709. that the command can begin the main processing. 
  710.  
  711. If neither MCI_WAIT or MCI_NOTIFY is specified, the processing is the same as 
  712. if MCI_NOTIFY were specified, except that notification is not provided when the 
  713. command completes. 
  714.  
  715. Error and parameter checking should minimize the possibility that an error 
  716. occurs after control is returned to the calling thread, requiring a notify 
  717. error message to be sent to the calling application.  The list of error 
  718. conditions that are checked before returning to the caller will vary from 
  719. driver to driver. 
  720.  
  721. The main processing of the command should be done using a separate thread or a 
  722. mechanism that allows control to be returned to the calling thread. If the MCD 
  723. is using the SSM subsystem, the event procedure should be used for handling 
  724. notify commands. 
  725.  
  726. If an error is returned on an mciDriverEntry call, the error should not be sent 
  727. using mdmDriverNotify. After an error is returned on mciDriverEntry, the MCD 
  728. has finished processing that command. 
  729.  
  730. On notify commands, it is the responsibility of the MCD to ensure that the data 
  731. structure associated with the command message is copied into driver memory 
  732. before returning to the caller. If this is not done, the driver might find that 
  733. the memory was changed before it could process the command. For example, the 
  734. hwndCallback, ulFrom, and ulTo fields on the MCI_PLAY message should be copied 
  735. when the MCI_NOTIFY flag is specified. 
  736.  
  737. Media control messages that can require a lot of time to complete are MCI_PLAY, 
  738. MCI_RECORD, MCI_SEEK, and MCI_STEP.  These commands are action commands. 
  739. Messages such as MCI_PAUSE, MCI_GETDEVCAPS, MCI_STATUS, and MCI_SET are 
  740. non-action commands and do not require much processing time.  The non-action 
  741. commands need not be processed on a separate thread if the notify flag is 
  742. specified.  For these commands, the call to mdmDriverNotify should be made at 
  743. the completion of the command. 
  744.  
  745. If the MCD is using the Stream Programming Interface (SPI) functions to perform 
  746. data streaming, the SPI events should be used instead of separate threads. SPI 
  747. requires an event routine to handle SPI events such as End-of-Stream, an error, 
  748. and so on.  SPI will call this event routine on one of its threads.  Therefore, 
  749. the mdmDriverNotify call could be made as part of the event routine. 
  750.  
  751. An MM_MCINOTIFY message can have the notification codes shown in the following 
  752. table associated with it. 
  753.  
  754. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  755. ΓöéNotification Code        ΓöéCondition That Caused the Notification       Γöé
  756. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  757. ΓöéMCI_NOTIFY_SUCCESSFUL    ΓöéThe command completed successfully with no   Γöé
  758. Γöé                         Γöéerrors.                                      Γöé
  759. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  760. ΓöéMCI_NOTIFY_SUPERSEDED    ΓöéA second command of the same type is receivedΓöé
  761. Γöé                         Γöéwith the notify flag set.                    Γöé
  762. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  763. ΓöéMCI_NOTIFY_ABORTED       ΓöéA second command is received that prevents   Γöé
  764. Γöé                         Γöéthe first command from completing            Γöé
  765. Γöé                         Γöésuccessfully. If the driver finds an error   Γöé
  766. Γöé                         Γöéearly in the parameter-checking or command   Γöé
  767. Γöé                         Γöéprocessing that requires an error to be      Γöé
  768. Γöé                         Γöéreturned to the caller, no notification is   Γöé
  769. Γöé                         Γöésent back to the application.                Γöé
  770. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  771. If the notification code field of MM_MCINOTIFY contains a value other than 
  772. those shown in the previous table, the value is the error code for a specific 
  773. OS/2 multimedia error condition.  Only one MM_MCINOTIFY message per command 
  774. should be sent. 
  775.  
  776.  
  777. ΓòÉΓòÉΓòÉ 4.3.5. Basic Command Messages ΓòÉΓòÉΓòÉ
  778.  
  779. Basic commands are commands all device types should understand but can modify 
  780. the parameters.  For example, when issuing a PLAY command to a Videodisc 
  781. Player, it might be desirable to indicate the speed of playback in frames per 
  782. second.  However, a device such as a CD Player might not have the capability to 
  783. play back at different speeds. 
  784.  
  785. The list of basic commands is shown in the following table. If a device does 
  786. not use a device-type command, it can return MCIERR_UNSUPPORTED_FUNCTION.  If a 
  787. device supports the command, but not all of the options, it can return the 
  788. MCIERR_UNSUPPORTED_FLAG for options that are not applicable. 
  789.  
  790. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  791. ΓöéMessage                 ΓöéDescription                             Γöé
  792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  793. ΓöéMCI_CONNECTOR           ΓöéEnables, disables, counts the number of,Γöé
  794. Γöé                        Γöéor queries the status of connectors.    Γöé
  795. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  796. ΓöéMCI_LOAD                ΓöéLoads a new device element (file name)  Γöé
  797. Γöé                        Γöéinto an open device context.            Γöé
  798. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  799. ΓöéMCI_MASTERAUDIO         ΓöéSets the system master audio setting forΓöé
  800. Γöé                        Γöéall audio devices in the system.        Γöé
  801. Γöé                        ΓöéMCI_MASTERAUDIO is also used as a systemΓöé
  802. Γöé                        Γöécommand to query the current audio      Γöé
  803. Γöé                        Γöésettings when the driver is first       Γöé
  804. Γöé                        Γöéopened.                                 Γöé
  805. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  806. ΓöéMCI_PAUSE               ΓöéSuspends device playback.               Γöé
  807. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  808. ΓöéMCI_PLAY                ΓöéStarts playing the device.              Γöé
  809. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  810. ΓöéMCI_RECORD              ΓöéStarts recording data.                  Γöé
  811. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  812. ΓöéMCI_RESUME              ΓöéResumes playing or recording from a     Γöé
  813. Γöé                        Γöépaused state.                           Γöé
  814. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  815. ΓöéMCI_SAVE                ΓöéSaves data for the device.              Γöé
  816. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  817. ΓöéMCI_SEEK                ΓöéMoves to the specified position and     Γöé
  818. Γöé                        Γöéstops.                                  Γöé
  819. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  820. ΓöéMCI_SET                 ΓöéSets the operating state of the device. Γöé
  821. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  822. ΓöéMCI_SETCUEPOINT         ΓöéSets a cuepoint.                        Γöé
  823. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  824. ΓöéMCI_SETPOSITIONADVISE   ΓöéSets a position change notification for Γöé
  825. Γöé                        Γöéthe device.                             Γöé
  826. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  827. ΓöéMCI_STATUS              ΓöéObtains information about the status of Γöé
  828. Γöé                        Γöéa media device.                         Γöé
  829. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  830. ΓöéMCI_STOP                ΓöéStops the device.                       Γöé
  831. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  832.  
  833. The basic command messages use the ulParam1 parameter for the flags applicable 
  834. to the command message.  They also use the pParam2 parameter for a pointer to a 
  835. message-specific data structure.  Your MCD might add flags and parameters to 
  836. create extended commands.  When you extend a command message, your MCD must 
  837. still respond to the basic flags and parameters. 
  838.  
  839. The following table identifies the flags and data structures of the basic 
  840. command messages.  For a complete reference of media control interface 
  841. commands, refer to the OS/2 Multimedia Programming Reference. 
  842.  
  843. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  844. ΓöéMessage                 ΓöéParameters (ulParam1)       ΓöéData Structure (pParam2)    Γöé
  845. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  846. ΓöéMCI_CONNECTOR           ΓöéMCI_NOTIFY                  ΓöéMCI_CONNECTOR_PARMS         Γöé
  847. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  848. Γöé                        ΓöéMCI_ENABLE_CONNECTOR        Γöé                            Γöé
  849. Γöé                        ΓöéMCI_DISABLE_CONNECTOR       Γöé                            Γöé
  850. Γöé                        ΓöéMCI_QUERY_CONNECTOR_STATUS  Γöé                            Γöé
  851. Γöé                        ΓöéMCI_CONNECTOR_TYPE          Γöé                            Γöé
  852. Γöé                        ΓöéMCI_CONNECTOR_INDEX         Γöé                            Γöé
  853. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  854. ΓöéMCI_LOAD                ΓöéMCI_OPEN_ELEMENT            ΓöéMCI_LOAD_PARMS              Γöé
  855. Γöé                        ΓöéMCI_OPEN_MMIO               Γöé                            Γöé
  856. Γöé                        ΓöéMCI_NOTIFY                  Γöé                            Γöé
  857. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  858. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  859. ΓöéMCI_MASTERAUDIO         ΓöéMCI_WAIT                    ΓöéMCI_MASTERAUDIO_PARMS       Γöé
  860. Γöé                        ΓöéMCI_QUERYCURRENTSETTING     Γöé                            Γöé
  861. Γöé                        ΓöéMCI_QUERYSAVEDSETTING       Γöé                            Γöé
  862. Γöé                        ΓöéMCI_SAVESETTING             Γöé                            Γöé
  863. Γöé                        ΓöéMCI_MASTERVOL               Γöé                            Γöé
  864. Γöé                        ΓöéMCI_SPEAKERS                Γöé                            Γöé
  865. Γöé                        ΓöéMCI_HEADPHONES              Γöé                            Γöé
  866. Γöé                        ΓöéMCI_ON                      Γöé                            Γöé
  867. Γöé                        ΓöéMCI_OFF                     Γöé                            Γöé
  868. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  869. ΓöéMCI_PAUSE               ΓöéMCI_NOTIFY                  ΓöéMCI_GENERIC_PARMS           Γöé
  870. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  871. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  872. ΓöéMCI_PLAY                ΓöéMCI_NOTIFY                  ΓöéMCI_PLAY_PARMS              Γöé
  873. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  874. Γöé                        ΓöéMCI_FROM                    Γöé                            Γöé
  875. Γöé                        ΓöéMCI_TO                      Γöé                            Γöé
  876. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  877. ΓöéMCI_RECORD              ΓöéMCI_NOTIFY                  ΓöéMCI_RECORD_PARMS            Γöé
  878. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  879. Γöé                        ΓöéMCI_FROM                    Γöé                            Γöé
  880. Γöé                        ΓöéMCI_TO                      Γöé                            Γöé
  881. Γöé                        ΓöéMCI_RECORD_INSERT           Γöé                            Γöé
  882. Γöé                        ΓöéMCI_RECORD_OVERWRITE        Γöé                            Γöé
  883. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  884. ΓöéMCI_RESUME              ΓöéMCI_NOTIFY                  ΓöéMCI_GENERIC_PARMS           Γöé
  885. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  886. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  887. ΓöéMCI_SAVE                ΓöéMCI_NOTIFY                  ΓöéMCI_SAVE_PARMS              Γöé
  888. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  889. Γöé                        ΓöéMCI_SAVE_FILE               Γöé                            Γöé
  890. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  891. ΓöéMCI_SEEK                ΓöéMCI_NOTIFY                  ΓöéMCI_SEEK_PARMS              Γöé
  892. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  893. Γöé                        ΓöéMCI_TO                      Γöé                            Γöé
  894. Γöé                        ΓöéMCI_TO_START                Γöé                            Γöé
  895. Γöé                        ΓöéMCI_TO_END                  Γöé                            Γöé
  896. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  897. ΓöéMCI_SET                 ΓöéMCI_NOTIFY                  ΓöéMCI_SET_PARMS               Γöé
  898. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  899. Γöé                        ΓöéMCI_SET_AUDIO               Γöé                            Γöé
  900. Γöé                        ΓöéMCI_SET_DOOR_OPEN           Γöé                            Γöé
  901. Γöé                        ΓöéMCI_SET_DOOR_CLOSED         Γöé                            Γöé
  902. Γöé                        ΓöéMCI_SET_DOOR_LOCK           Γöé                            Γöé
  903. Γöé                        ΓöéMCI_SET_DOOR_UNLOCK         Γöé                            Γöé
  904. Γöé                        ΓöéMCI_SET_VOLUME              Γöé                            Γöé
  905. Γöé                        ΓöéMCI_OVER                    Γöé                            Γöé
  906. Γöé                        ΓöéMCI_SET_VIDEO               Γöé                            Γöé
  907. Γöé                        ΓöéMCI_SET_ON                  Γöé                            Γöé
  908. Γöé                        ΓöéMCI_SET_OFF                 Γöé                            Γöé
  909. Γöé                        ΓöéMCI_SET_SPEED_FORMAT        Γöé                            Γöé
  910. Γöé                        ΓöéMCI_SET_TIME_FORMAT         Γöé                            Γöé
  911. Γöé                        ΓöéMCI_SET_ITEM                Γöé                            Γöé
  912. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  913. ΓöéMCI_SETCUEPOINT         ΓöéMCI_NOTIFY                  ΓöéMCI_CUEPOINT_PARMS          Γöé
  914. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  915. Γöé                        ΓöéMCI_SET_CUEPOINT_ON         Γöé                            Γöé
  916. Γöé                        ΓöéMCI_SET_CUEPOINT_OFF        Γöé                            Γöé
  917. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  918. ΓöéMCI_SETPOSITIONADVISE   ΓöéMCI_NOTIFY                  ΓöéMCI_POSITION_PARMS          Γöé
  919. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  920. Γöé                        ΓöéMCI_SET_POSITION_ADVISE_ON  Γöé                            Γöé
  921. Γöé                        ΓöéMCI_SET_POSITION_ADVISE_OFF Γöé                            Γöé
  922. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  923. ΓöéMCI_STATUS              ΓöéMCI_NOTIFY                  ΓöéMCI_STATUS_PARMS            Γöé
  924. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  925. Γöé                        ΓöéMCI_STATUS_START            Γöé                            Γöé
  926. Γöé                        ΓöéMCI_TRACK                   Γöé                            Γöé
  927. Γöé                        ΓöéMCI_STATUS_ITEM             Γöé                            Γöé
  928. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  929. ΓöéMCI_STOP                ΓöéMCI_NOTIFY                  ΓöéMCI_GENERIC_PARMS           Γöé
  930. Γöé                        ΓöéMCI_WAIT                    Γöé                            Γöé
  931. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  932.  
  933.  
  934. ΓòÉΓòÉΓòÉ 4.3.6. System Command Messages ΓòÉΓòÉΓòÉ
  935.  
  936. System commands are interpreted directly by the Media Device Manager (MDM), and 
  937. are not passed to the MCDs. The following table lists the system commands that 
  938. are supported by MDM. 
  939.  
  940. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  941. ΓöéCommand                  ΓöéDescription                        Γöé
  942. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  943. ΓöéMCI_ACQUIREDEVICE        ΓöéAcquires use of the physical       Γöé
  944. Γöé                         Γöéresources for the device.          Γöé
  945. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  946. ΓöéMCI_CONNECTION           ΓöéReturns information about the      Γöé
  947. Γöé                         Γöédevice context connections.        Γöé
  948. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  949. ΓöéMCI_CONNECTORINFO        ΓöéReturns information about the      Γöé
  950. Γöé                         Γöéconnectors on a device.            Γöé
  951. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  952. ΓöéMCI_DEFAULTCONNECTION    ΓöéMakes, breaks, or queries a defaultΓöé
  953. Γöé                         Γöéconnection.                        Γöé
  954. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  955. ΓöéMCI_GROUP                ΓöéProvides control over multiple     Γöé
  956. Γöé                         Γöédevices with a single command.     Γöé
  957. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  958. ΓöéMCI_MASTERAUDIO          ΓöéQueries the current audio settings Γöé
  959. Γöé                         Γöéwhen the driver is first opened.   Γöé
  960. Γöé                         ΓöéThis command is also used as a     Γöé
  961. Γöé                         Γöébasic command to later adjust the  Γöé
  962. Γöé                         Γöémaster audio.                      Γöé
  963. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  964. ΓöéMCI_SYSINFO              ΓöéObtains information about devices  Γöé
  965. Γöé                         Γöéinstalled in the system.           Γöé
  966. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  967. ΓöéMCI_RELEASEDEVICE        ΓöéReleases exclusive use of the      Γöé
  968. Γöé                         Γöéphysical resources for the devices.Γöé
  969. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  970.  
  971.  
  972. ΓòÉΓòÉΓòÉ 4.3.7. Command Processing ΓòÉΓòÉΓòÉ
  973.  
  974. All MCDs have commands passed to them in the same way, regardless of whether 
  975. they support streaming or nonstreaming devices.  Applications call either the 
  976. mciSendCommand or mciSendString functions to pass commands to the MCD entry 
  977. point, mciDriverEntry.  In addition, some commands are generated by the MDM 
  978. itself.  These are the commands for saving and restoring an instance and 
  979. synchronization messages-messages periodically generated by the master device 
  980. for routing to the slave devices in the group. 
  981.  
  982. Although streaming and nonstreaming devices have commands passed to them in the 
  983. same way, they process the commands they receive from the MDM differently. 
  984. These differences are described in the sections that follow and are summarized 
  985. in the following table. 
  986.  
  987. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  988. ΓöéWhen the MDM sends: ΓöéThe waveform audio  ΓöéThe CD audio MCD:   Γöé
  989. Γöé                    ΓöéMCD:                Γöé                    Γöé
  990. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  991. ΓöéMCI_SET messages    ΓöéRoutes the messages ΓöéUses IOCtls to      Γöé
  992. Γöéthat set audio      Γöéto the amp mixer.   Γöéprocess the         Γöé
  993. Γöéattributes          Γöé                    Γöémessages.           Γöé
  994. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  995. ΓöéMessages that       ΓöéRoutes the messages ΓöéUses IOCtls to      Γöé
  996. Γöécontrol playback    Γöéto the SSM.         Γöéprocess the         Γöé
  997. Γöé(for example, SEEK, Γöé                    Γöémessages.           Γöé
  998. ΓöéPLAY, PAUSE, STOP)  Γöé                    Γöé                    Γöé
  999. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1000.  
  1001.  
  1002. ΓòÉΓòÉΓòÉ 4.3.8. Error Return Codes ΓòÉΓòÉΓòÉ
  1003.  
  1004. For MCDs to look consistent to applications, error codes should be consistent 
  1005. across MCDs.  Following are some guidelines for using common error codes. 
  1006.  
  1007. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1008. ΓöéUse this error message:                 ΓöéWhen this error condition     Γöé
  1009. Γöé                                        Γöéoccurs:                       Γöé
  1010. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1011. ΓöéMCIERR_OUTOFRANGE                       ΓöéThe value given is out of     Γöé
  1012. Γöé                                        Γöérange.                        Γöé
  1013. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1014. ΓöéMCIERR_UNRECOGNIZED_COMMAND             ΓöéUnknown usMessage value.      Γöé
  1015. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1016. ΓöéMCIERR_INVALID_FLAG                     ΓöéUnknown ulParam1 value.       Γöé
  1017. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1018. ΓöéMCIERR_INVALID_ITEM_FLAG                ΓöéUnknown flag in ulItem field. Γöé
  1019. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1020. ΓöéMCIERR_INVALID_TIME_FORMAT_FLAG         ΓöéUnknown flag in ulTimeFormat  Γöé
  1021. Γöé                                        Γöéfield.                        Γöé
  1022. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1023. ΓöéMCIERR_SPEED_FORMAT_FLAG                ΓöéUnknown flag in ulSpeedFormat Γöé
  1024. Γöé                                        Γöéfield.                        Γöé
  1025. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1026. ΓöéMCIERR_MISSING_PARAMETER                ΓöéInvalid or NULL pParam2 field.Γöé
  1027. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1028. ΓöéMCIERR_INVALID_BUFFER                   ΓöéInvalid address to output     Γöé
  1029. Γöé                                        Γöébuffer in pParam2.            Γöé
  1030. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1031. ΓöéMCIERR_MISSING_FLAG                     ΓöéMissing flags in ulParam1 whenΓöé
  1032. Γöé                                        Γöéone or more flags are         Γöé
  1033. Γöé                                        Γöérequired.                     Γöé
  1034. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1035. ΓöéMCIERR_UNSUPPORTED_FLAG                 ΓöéFlag in ulParam1 is valid for Γöé
  1036. Γöé                                        Γöéthe message, but driver cannotΓöé
  1037. Γöé                                        Γöéperform the task.             Γöé
  1038. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1039. ΓöéMCIERR_UNSUPPORTED_FUNCTION             ΓöéFunction in usMessage is      Γöé
  1040. Γöé                                        Γöéunderstood by the device but  Γöé
  1041. Γöé                                        Γöéis not supported by the       Γöé
  1042. Γöé                                        Γöédriver.                       Γöé
  1043. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1044. ΓöéMCIERR_FLAGS_NOT_COMPATIBLE             ΓöéMore than one mutually        Γöé
  1045. Γöé                                        Γöéexclusive flag is set.        Γöé
  1046. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1047.  
  1048. The following error conditions are always handled by MDM: 
  1049.  
  1050.      An invalid callback handle is specified for a message with the MCI_NOTIFY 
  1051.       flag set. 
  1052.  
  1053.      MCI_WAIT and MCI_NOTIFY flags are used together. 
  1054.  
  1055.      A command is sent to an inactive instance. 
  1056.  
  1057.  
  1058. ΓòÉΓòÉΓòÉ 4.3.9. Return Values and Return Types ΓòÉΓòÉΓòÉ
  1059.  
  1060. MCDs should attempt to use the MCIERR return codes wherever possible.  These 
  1061. return codes are provided in the C header file MEERROR.H. Error codes from SPI, 
  1062. MMIO or the operating system should be mapped into MCIERR return codes when it 
  1063. makes sense.  If the driver has unique return codes for certain conditions, it 
  1064. can use error numbers MCIERR_CUSTOM_DRIVER_BASE through MEBASE-1.  If custom 
  1065. driver return codes are used, a custom driver error table should be created. 
  1066.  
  1067. MCDs should use the following return types in the high-order word of the return 
  1068. code when the media message has a return field. 
  1069.  
  1070.  Return Type                                     Meaning 
  1071.  
  1072.  MCI_INTEGER_RETURNED                            Convert the given binary 
  1073.                                                  integer to its unsigned ASCII 
  1074.                                                  string representation. 
  1075.  
  1076.  MCI_COLONIZED2_RETURN                           Convert the binary integer to 
  1077.                                                  the following form: 
  1078.  
  1079.                                                                                                   byte0:byte2
  1080.  
  1081.  MCI_COLONIZED3_RETURN                           Convert the binary integer to 
  1082.                                                  the following form: 
  1083.  
  1084.                                                                                                   byte0:byte1:byte2
  1085.  
  1086.  MCI_COLONIZED4_RETURN                           Convert the binary integer to 
  1087.                                                  the following form: 
  1088.  
  1089.                                                                                                   byte0:byte1:byte2:byte4
  1090.  
  1091.  MCI_TRUE_FALSE_RETURN                           Convert the TRUE/FALSE value 
  1092.                                                  to the string representation. 
  1093.  
  1094.  MCI_ON_OFF_RETURN                               Convert the ON/OFF value to 
  1095.                                                  the string representation. 
  1096.  
  1097.  MCI_DEVICENAME_RETURN                           Convert the device type 
  1098.                                                  integer to its device name 
  1099.                                                  string. 
  1100.  
  1101.  MCI_TIME_FORMAT_RETURN                          Convert the time format 
  1102.                                                  integer to its appropriate 
  1103.                                                  string. 
  1104.  
  1105.  MCI_SPEED_FORMAT_RETURN                         Convert the speed format 
  1106.                                                  integer to its appropriate 
  1107.                                                  string. 
  1108.  
  1109.  MCI_MEDIA_TYPE_RETURN                           Convert the disc type integer 
  1110.                                                  for a videodisc to "CLV," 
  1111.                                                  "CAV," "OTHER". 
  1112.  
  1113.  MCI_TRACK_TYPE_RETURN                           Convert the track type integer 
  1114.                                                  to "AUDIO," "DATA," "OTHER". 
  1115.  
  1116.  MCI_CONNECTOR_TYPE_RETURN                       Convert the connector type 
  1117.                                                  integer to its appropriate 
  1118.                                                  string. 
  1119.  
  1120.  MCI_CDXA_CHANNEL_ DESTINATION_RETURN            Convert the CDXA channel 
  1121.                                                  destination type integer to 
  1122.                                                  its appropriate string. 
  1123.  
  1124.  MCI_PREROLL_TYPE_RETURN                         Convert the preroll type 
  1125.                                                  integer to its appropriate 
  1126.                                                  string. 
  1127.  
  1128.  MCI_FORMAT_TAG_RETURN                           Convert the format tag type 
  1129.                                                  integer to its appropriate 
  1130.                                                  string. 
  1131.  
  1132.  MCI_SIGNED_INTEGER_RETURN                       Convert the given binary 
  1133.                                                  integer to its signed ASCII 
  1134.                                                  string representation. 
  1135.  
  1136.  The return types described in the previous list allow the string parser to 
  1137.  convert binary return values into strings.  This conversion takes place only 
  1138.  when the application calls mciSendString and only if no error occurs on the 
  1139.  call.  For example: "capability cdaudio has video" returns FALSE in the return 
  1140.  string field of mciSendString.  The media driver for the CD audio MCD puts a 
  1141.  zero in the ulReturn field of the MCI_GETDEVCAPS_PARMS structure and 
  1142.  MCI_TRUE_FALSE_RETURN in the high-order word of the return code. 
  1143.  
  1144.  
  1145. ΓòÉΓòÉΓòÉ 4.4. Adding New Command Messages ΓòÉΓòÉΓòÉ
  1146.  
  1147. Following are four steps a media driver author needs to follow to add support 
  1148. for a device-specific message to a driver: 
  1149.  
  1150.    1. Define the new or modified media control message your driver plans to 
  1151.       support.  (See Defining New Messages.) 
  1152.  
  1153.    2. Define the new data structure and flags for this message. (See Defining 
  1154.       New Data Structures and Flags.) 
  1155.  
  1156.    3. Create a custom command table that MDM can use to parse the command 
  1157.       string in mciSendString, so it can create the appropriate data structure 
  1158.       to pass to your driver.  (See Parsing a Command List). 
  1159.  
  1160.    4. Support the new message in your MCD's entry point (mciDriverEntry). 
  1161.  
  1162.  
  1163. ΓòÉΓòÉΓòÉ 4.4.1. Defining New Messages ΓòÉΓòÉΓòÉ
  1164.  
  1165. Suppose you want to define a new reset command for an MCD supporting a 
  1166. videodisc player.  You can call this command by sending a reset program_number 
  1167. string.  The command sets all player parameters to their default settings or 
  1168. one of several predefined states indicated by the program_number. 
  1169.  
  1170. You would add the following message to the list of messages you must support in 
  1171. mciDriverEntry: 
  1172.  
  1173. #define MCI_VD_RESET MCI_USER_MESSAGES
  1174.  
  1175. MCI_USER_MESSAGES is the first integer you can use for custom messages.  Since 
  1176. the resource compiler does not accept mathematical expressions in the RCDATA 
  1177. resource type, you must indicate the specific value you want to use. 
  1178.  
  1179. Now that you have defined the message ID, you must define the data structure 
  1180. and the command table, and create the code to handle this message in 
  1181. mciDriverEntry. 
  1182.  
  1183.  
  1184. ΓòÉΓòÉΓòÉ 4.4.2. Defining New Data Structures and Flags ΓòÉΓòÉΓòÉ
  1185.  
  1186. Most new messages require additional parameters to specify their exact 
  1187. function.  The media control interface messages use pParam2 as a pointer to a 
  1188. data structure, and use ulParam1 as a bit-field for the flags associated with 
  1189. the message.  A flag will exist for each field in the data structure that 
  1190. accepts data from the calling application.  The application uses the flag to 
  1191. set the bit-field of ulParam1 to indicate a value is assigned to a particular 
  1192. field.  Flags also specify options without parameters.  Thus these flags do not 
  1193. correspond to a field in the data structure. 
  1194.  
  1195.  
  1196. ΓòÉΓòÉΓòÉ 4.4.2.1. Defining a New Data Structure ΓòÉΓòÉΓòÉ
  1197.  
  1198. The fields of the data structure for a media control interface message are 
  1199. always the size of ULONGs.  The number of fields in the structure depends on 
  1200. the particular message.  The first field must be reserved for a handle to a 
  1201. window function used with the MCI_NOTIFY flag.  The next fields in the data 
  1202. structure depend on the type of data returned for the message. 
  1203.  
  1204.      If no data is returned, no return fields are reserved in the data 
  1205.       structure.  Any data fields for passing information to the MCD 
  1206.       immediately follow the hwndCallback field.  For example, the 
  1207.       MCI_SAVE_PARMS structure shown in the following figure does not have a 
  1208.       return field. 
  1209.  
  1210.             typedef struct _MCI_SAVE_PARMS {
  1211.                 HWND    hwndCallback;    /* PM window handle for MCI notify message */
  1212.                 PSZ     pszFileName;     /* File name to save data to               */
  1213.              } MCI_SAVE_PARMS;
  1214.             typedef MCI_SAVE_PARMS   *PMCI_SAVE_PARMS;
  1215.  
  1216.      If integer data is returned, the second field of the data structure is 
  1217.       reserved for the return data.  Any data fields for passing information to 
  1218.       the MCD start in the third field.  For example, the MCI_GETDEVCAPS_PARMS 
  1219.       structure shown in the following example uses ulReturn as the integer 
  1220.       return field. 
  1221.  
  1222.             typedef struct _MCI_GETDEVCAPS_PARMS {
  1223.                 HWND    hwndCallback;    /* PM window handle for MCI notify message */
  1224.                 ULONG   ulReturn;        /* Return field                            */
  1225.                 ULONG   ulItem;          /* Item field for GETDEVCAPS item to query */
  1226.                 USHORT  usMessage;       /* Field to hold MCI message to query      */
  1227.                 USHORT  usReserved0;     /* Reserved field                          */
  1228.             } MCI_GETDEVCAPS_PARMS;
  1229.             typedef MCI_GETDEVCAPS_PARMS   * PMCI_GETDEVCAPS_PARMS;
  1230.  
  1231.      If string data is returned, the second and third fields of the data 
  1232.       structure are reserved for the return data.  The second ULONG is assigned 
  1233.       to a field reserved for a pointer to the null-terminated return string. 
  1234.       The third ULONG is assigned to a field reserved for the size of return 
  1235.       buffer.  The application is responsible for creating the buffer for 
  1236.       return string.  Any data fields for passing information to the MCD start 
  1237.       in the fourth field.  For example, the MCI_INFO_PARMS structure shown in 
  1238.       the following example uses pszReturn and ulRetSize for the return fields. 
  1239.  
  1240.             typedef struct _MCI_INFO_PARMS {
  1241.                 HWND      hwndCallback;  /* PM window handle for MCI notify message */
  1242.                 PSZ       pszReturn;     /* Pointer to return buffer                */
  1243.                 ULONG     ulRetSize;     /* Return buffer size                      */
  1244.             } MCI_INFO_PARMS;
  1245.             typedef MCI_INFO_PARMS   *PMCI_INFO_PARMS;
  1246.  
  1247.      If RECTL data is returned, the second through fifth fields of the data 
  1248.       structure are reserved for the return data.  The first ULONG position is 
  1249.       reserved for the left values of the RECTL data.  The second ULONG 
  1250.       position is reserved for the bottom values of the RECTL data.  Any data 
  1251.       fields for passing information to the device driver start in the sixth 
  1252.       ULONG position.  Rather than specifying two ULONGs for the RECTL data, 
  1253.       most data structure definitions use one RECTL data field to obtain an 
  1254.       equivalent data structure.  For example, the MCI_VID_RECT_PARMS structure 
  1255.       shown in the following example uses rc for the return field. 
  1256.  
  1257.             typedef  struct _MCI_VID_RECT_PARMS {
  1258.                 HWND    hwndCallback;    /* PM window handle for MCI notify message */
  1259.                 RECTL   rc;              /* rectangle array specifying the offset   */
  1260.                                          /* and size of a rectangle                 */
  1261.             } MCI_VID_RECT_PARMS;
  1262.  
  1263.  
  1264. ΓòÉΓòÉΓòÉ 4.4.2.2. Assigning Flag Values ΓòÉΓòÉΓòÉ
  1265.  
  1266. In addition to indicating the fields used in a data structure, flags can 
  1267. indicate an option that does not use any parameters.  For example, the MCI_WAIT 
  1268. flag does not use any parameters. 
  1269.  
  1270. When you add new flags, you must make sure that they do not conflict with the 
  1271. flags already in use.  Bits 0 through 15 of the 32-bit ULONG are reserved for 
  1272. MDM.  Bit 16 (0x00010000) is the first fit that a driver can use for its flags. 
  1273. If your command message is a new command message, you must choose bit positions 
  1274. that do not conflict with the flags already defined for that command.  Any 
  1275. unused bits in the new flag must be set to zero.  For example, if a new command 
  1276. for videodisc players uses flags 16 through 20, a custom extension to the new 
  1277. command could use flags 21 through 31. 
  1278.  
  1279. To continue the example for adding a RESET command to a videodisc driver, the 
  1280. code sample shown in the following example defines a data structure, a 
  1281. corresponding pointer for it, and the flag corresponding to the program field 
  1282. of the data structure. 
  1283.  
  1284. typedef struct {
  1285.   HWND   hwndCallback;
  1286.   ULONG  ulProgram;
  1287. } MCI_VD_RESET_PARMS;
  1288.  
  1289. typedef MCI_VD_RESET_PARMS FAR * PMCI_VD_RESET_PARMS;
  1290.  
  1291. #define MCI_VD_RESET_PROGRAM     0x00010000L
  1292.  
  1293. When the application sets the MCI_VD_RESET_PROGRAM flag in ulParam1, it 
  1294. indicates that a value is assigned in the ulProgram field. 
  1295.  
  1296. Now that you have created the message command, data structure, and flags, you 
  1297. need to create the command table that tells MDM how to translate the equivalent 
  1298. string command into the message command format.  See Parsing a Command List. 
  1299.  
  1300.  
  1301. ΓòÉΓòÉΓòÉ 4.5. Command Tables ΓòÉΓòÉΓòÉ
  1302.  
  1303. Command tables are structures that allow the MDM string parser to interpret 
  1304. command strings for MCDs.  This provides string command interface support for 
  1305. your MCD. Represented as resources to the driver, command tables are created 
  1306. using the RCDATA type of resource.  The resource number of the RCDATA block is 
  1307. the device type number. 
  1308.  
  1309. The following figure illustrates how the Media Device Manager (MDM) uses 
  1310. commands tables.  A program or mciRxInit command uses the mciSendString 
  1311. function to pass a string command to the MDM.  In turn, MDM calls its string 
  1312. parser to interpret the string command and change it into the equivalent 
  1313. procedural command.  MDM scans the command tables from the most specific to the 
  1314. least specific.  It first scans any custom device-specific tables (if present 
  1315. in the MCD).  Next, MDM looks for the string in the device-type table and 
  1316. finally the system default table. 
  1317.  
  1318. MDM provides device-type tables to support OS/2 multimedia logical devices as 
  1319. shown in the above figure. These built-in tables will meet your MCD 
  1320. requirements unless you have to add or modify commands.  If your MCD has new 
  1321. requirements (such as a new flag or a different data structure for a command), 
  1322. you must create a custom table to define commands specific to your device. 
  1323.  
  1324. A custom table allows you to create your own versions of basic media control 
  1325. interface commands by adding new or changed command entries.  For example, the 
  1326. device-type table for digital video supports the SEEK flags shown in the 
  1327. following example. 
  1328.  
  1329. "seek",                  MCI_SEEK, 0,           MCI_COMMAND_HEAD,
  1330.    "notify",             MCI_NOTIFY,            MCI_FLAG,
  1331.    "wait",               MCI_WAIT,              MCI_FLAG,
  1332.    "to start",           MCI_TO_START,          MCI_FLAG,
  1333.    "to end",             MCI_TO_END,            MCI_FLAG,
  1334.    "to",                 MCI_TO,                MCI_INTEGER,
  1335. "",                      0L,                    MCI_END_COMMAND,
  1336.  
  1337. You, however, want your MCD to seek to the nearest position.  To accomplish 
  1338. this, you can create a custom table in your MCD to parse commands for the 
  1339. digital video player (as shown in the following example. Note that the custom 
  1340. table must include all parameters associated with the changed command (not just 
  1341. new and changed parameters). 
  1342.  
  1343. "seek",                  MCI_SEEK, 0,           MCI_COMMAND_HEAD,
  1344.    "notify",             MCI_NOTIFY,            MCI_FLAG,
  1345.    "wait",               MCI_WAIT,              MCI_FLAG,
  1346.    "to start",           MCI_TO_START,          MCI_FLAG,
  1347.    "to nearest",         MCI_TO_NEAREST,        MCI_FLAG,
  1348.    "to end",             MCI_TO_END,            MCI_FLAG,
  1349.    "to",                 MCI_TO,                MCI_INTEGER,
  1350. "",                      0L,                    MCI_END_COMMAND,
  1351.  
  1352. When writing an MCD, the DLL file names (which include the command table 
  1353. resources) must be referenced in the MMPM2.INI file.  MDM updates the INI file 
  1354. with MCD command table information you provide when installing your MCD.  See 
  1355. Installing a Media Control Driver for details. 
  1356.  
  1357. The following shows an example of how command table entries appear in the 
  1358. MMPM2.INI file.  The MCDTABLE entry includes the MDM.DLL file, which includes 
  1359. the device-type command tables and the default system table.  The VSDTABLE 
  1360. entry indicates that a custom command table resource is located in the SVMC.DLL 
  1361. file. 
  1362.  
  1363. MDM scans the command tables from the most specific to the least specific.  In 
  1364. the example below MDM first searches the custom table resources in the SVMC.DLL 
  1365. file.  MDM next searches the internal digitalvideo device-type table 
  1366. (SMVCMD.RC) and then the system default table (MDMCMD.RC) located in the 
  1367. MDM.DLL file. 
  1368.  
  1369. [ibmdigvid01]
  1370.   VERSIONNUMBER=1
  1371.   PRODUCTINFO=SOFTWARE MOTION VIDEO
  1372.   MCDDRIVER=SVMC
  1373.   VSDDRIVER=AUDIOIF
  1374.   PDDNAME=AUDIO1$
  1375.   MCDTABLE=MDM
  1376.   VSDTABLE=SVMC
  1377.   RESOURCENAME=DIGITALVIDEO
  1378.   DEVICEFLAG=1
  1379.   DEVICETYPE=12
  1380.   SHARETYPE=3
  1381.   RESOURCEUNITS=1
  1382.   RESOURCECLASSES=1,1
  1383.   VALIDCOMBINATIONS=
  1384.   EXTNAMES=3,UMB,MMM,V
  1385.   ALIASNAME=DV
  1386.  
  1387.  
  1388. ΓòÉΓòÉΓòÉ 4.5.1. Command Table Syntax ΓòÉΓòÉΓòÉ
  1389.  
  1390. A command table consists of command lists.  Each command list in the table 
  1391. defines the parsing of a particular command. For example, the following example 
  1392. shows the command lists for MCI_OPEN and MCI_INFO, which are part of the system 
  1393. default table contained in the MDMCMD.RC file. 
  1394.  
  1395. "open",                     MCI_OPEN, 0,                 MCI_COMMAND_HEAD,
  1396.    "",                      MCI_INTEGER,                 MCI_RETURN,
  1397.    "notify",                MCI_NOTIFY,                  MCI_FLAG,
  1398.    "wait",                  MCI_WAIT,                    MCI_FLAG,
  1399.    "readonly",              MCI_READONLY,                MCI_FLAG,
  1400.    "shareable",             MCI_OPEN_SHAREABLE,          MCI_FLAG,
  1401.    "type",                  0L,                          MCI_STRING,
  1402.    "",                      MCI_OPEN_ELEMENT,            MCI_STRING,
  1403.    "alias",                 MCI_OPEN_ALIAS,              MCI_STRING,
  1404. "",                         0L,                          MCI_END_COMMAND,
  1405.  
  1406. "info",                     MCI_INFO, 0,                 MCI_COMMAND_HEAD,
  1407.    "",                      MCI_STRING,                  MCI_RETURN,
  1408.    "notify",                MCI_NOTIFY,                  MCI_FLAG,
  1409.    "wait",                  MCI_WAIT,                    MCI_FLAG,
  1410.    "product",               MCI_INFO_PRODUCT,            MCI_FLAG,
  1411.    "file",                  MCI_INFO_FILE,               MCI_FLAG,
  1412. "",                         0L,                          MCI_END_COMMAND,
  1413.  
  1414. Command lists have a sequence of lines that are organized into three columns: 
  1415.  
  1416.      Column 1 contains the command and its flags in command string format. 
  1417.      Column 2 contains the command and its flags in command message format. 
  1418.      Column 3 contains the Line_types for each line in the command list. 
  1419.  
  1420.  
  1421. ΓòÉΓòÉΓòÉ 4.5.1.1. Line Types ΓòÉΓòÉΓòÉ
  1422.  
  1423. The MDM string parser uses the Line_type to determine how to interpret each 
  1424. line. A command list begins with the MCI_COMMAND_HEAD Line_type and ends with 
  1425. the MCI_END_COMMAND Line_type. 
  1426.  
  1427.  MCI_RETURN 
  1428.            This Line_type indicates that the command provides return 
  1429.            information. If used, MCI_RETURN must be the second entry in the 
  1430.            command list. 
  1431.  
  1432.                Column 1 contains "". 
  1433.                Column 2 contains the type of return: integer or string. 
  1434.                Column 3 contains MCI_RETURN. 
  1435.  
  1436.            A command returning an integer requires a ULONG for that return 
  1437.            value. A command returning a string requires two ULONGs: the first 
  1438.            ULONG is for a pointer to the return buffer, and the second ULONG is 
  1439.            for the return buffer size. 
  1440.  
  1441.            The parser sends back return information in the pszReturnString and 
  1442.            usReturnLength parameters of the mciSendString function. The above 
  1443.            example shows how both types of returns are used. 
  1444.  
  1445.            The MCI_OPEN returns a ULONG value, and MCI_INFO returns data that 
  1446.            is filled into the buffer pointed to by the pointer in the second 
  1447.            ULONG of the command structure. (Remember that the first ULONG is 
  1448.            always hwndCallback.) 
  1449.  
  1450.  MCI_RETURN_TYPE 
  1451.            This Line_type is used to convert return values into strings by the 
  1452.            string parser. 
  1453.  
  1454.                          "",              MCI_TRUE_FALSE_RETURN, 0,    MCI_RETURN_TYPE,
  1455.                             "TRUE",       1L,                          MCI_RETURN_TYPE_STRING,
  1456.                             "FALSE",      0L,                          MCI_RETURN_TYPE_STRING,
  1457.                          "",              0L,                          MCI_END_RETURN_TYPE,
  1458.  
  1459.            The flag_define field for the return line is compared against the 
  1460.            high-order word of the return code. If a match is found, then the 
  1461.            parser tries to find a match for the flag_define field and the 
  1462.            return value.  If a match is found for the return value, then the 
  1463.            keyword string is returned to the application in the pszReturnString 
  1464.            field of the mciSendString call. 
  1465.  
  1466.  MCI_FLAG 
  1467.            This Line_type is used to convert keywords to flag values for 
  1468.            ulParam1. When more than one MCI_FLAG Line_type is encountered 
  1469.            during the parsing of a command string, the ulParam1 parameter is 
  1470.            ORed with the flag_define field of the Keyword_list. 
  1471.  
  1472.  MCI_STRING 
  1473.            This Line_type is used for string values for a message. The string 
  1474.            following the MCI_STRING keyword is copied into the command 
  1475.            structure. MDM allocates memory to hold the string and put the 
  1476.            address into the command structure. 
  1477.  
  1478.  MCI_INTEGER 
  1479.            This Line_type is used for integer values for a message. The integer 
  1480.            following the MCI_INTEGER keyword is copied into the command 
  1481.            structure. The integer value is converted from a string 
  1482.            representation to a ULONG. 
  1483.  
  1484.  MCI_CONSTANT 
  1485.            This Line_type and the MCI_END_CONSTANT Line_type allow a set of 
  1486.            possible keywords to represent a flag or integer. In the following 
  1487.            example, any one of the time format values can be used as the value 
  1488.            for the time format constant. 
  1489.  
  1490.                         "",                            MCI_SET_TIME_FORMAT,     MCI_CONSTANT,
  1491.                            "time format milliseconds", MCI_FORMAT_MILLISECONDS, MCI_INTEGER,
  1492.                            "time format ms",           MCI_FORMAT_MILLISECONDS, MCI_INTEGER,
  1493.                            "time format mmtime",       MCI_FORMAT_MMTIME,       MCI_INTEGER,
  1494.                         "",                            0L,                      MCI_END_CONSTANT,
  1495.  
  1496.            The value on the MCI_CONSTANT line_type is ORed with the ulParam1 
  1497.            field.  The values on the MCI_INTEGER line_types within this 
  1498.            constant block are copied into the command structure.  The constant 
  1499.            block represents just one ULONG in the command structure. 
  1500.  
  1501.  MCI_DEFAULT_STRING 
  1502.            This Line_type and the MCI_DEFAULT_INTEGER Line_type provide the 
  1503.            means for an unknown value to be used as a string or integer. For 
  1504.            example the LOAD command (shown in the following example) uses a 
  1505.            default string for the filename string. 
  1506.  
  1507.                       "load",                          MCI_LOAD, 0,           MCI_COMMAND_HEAD,
  1508.                          "notify",                     MCI_NOTIFY,            MCI_FLAG,
  1509.                          "wait",                       MCI_WAIT,              MCI_FLAG,
  1510.                          "new",                        0L,                    MCI_FLAG,
  1511.                          "readonly",                   MCI_READONLY,          MCI_FLAG,
  1512.                          "",                           MCI_OPEN_ELEMENT,      MCI_DEFAULT_STRING,
  1513.                       "",                              0L,                    MCI_END_COMMAND,
  1514.  
  1515.  MCI_RECTL 
  1516.            This Line_type specifies that RECTL data modifies the media control 
  1517.            interface flag represented by the command list entry.  The second 
  1518.            column of this entry contains the flag to set.  The data structure 
  1519.            for the message command must reserve a ULONG to hold the integer 
  1520.            value. 
  1521.  
  1522.  MCI_OR 
  1523.            This Line_type allows you to combine different line types within the 
  1524.            same construct. The following shows an example of an MCI_OR entry 
  1525.            used in the MCI_STATUS command list in the MDMCMD.RC file. Notice 
  1526.            that the %d symbol can be used in a command list as an indicator to 
  1527.            print the decimal value. 
  1528.  
  1529.                          "",              0L,                         MCI_OR,
  1530.                          "track",         MCI_TRACK,                  MCI_INTEGER,
  1531.                          "channel",       0L,                         MCI_CONSTANT,
  1532.                             "all",        MCI_STATUS_AUDIO_ALL,       MCI_INTEGER,
  1533.                             "left",       MCI_STATUS_AUDIO_LEFT,      MCI_INTEGER,
  1534.                             "right",      MCI_STATUS_AUDIO_RIGHT,     MCI_INTEGER,
  1535.                             "%d",         0L,                         MCI_INTEGER,
  1536.                          "",              0L,                         MCI_END_CONSTANT,
  1537.                          "",              0L,                         MCI_END_OR,
  1538.  
  1539.  MCI_STRING_LIST 
  1540.            Pointer to an array of pointers to strings in the list. For example, 
  1541.            the following example code uses MCI_STRING_LIST to point to an array 
  1542.            of pointers to device identifiers. 
  1543.  
  1544.                       "group",            MCI_GROUP, 0,               MCI_COMMAND_HEAD,
  1545.                          "delete",        MCI_GROUP_DELETE,           MCI_FLAG,
  1546.                          "nopiecemeal",   MCI_NOPIECEMEAL,            MCI_FLAG,
  1547.                          "synchronize",   MCI_SYNCHRONIZE,            MCI_FLAG,
  1548.                          "wait",          MCI_WAIT,                   MCI_FLAG,
  1549.                          "notify",        MCI_NOTIFY,                 MCI_FLAG,
  1550.                          "",              0L,                         MCI_INTEGER,
  1551.                          "",              0L,                         MCI_INTEGER,
  1552.                          "master",        MCI_GROUP_MASTER,           MCI_STRING,
  1553.                          "",              0L,                         MCI_STRING,
  1554.                          "",              0L,                         MCI_INTEGER,
  1555.                          "make",          MCI_GROUP_MAKE,             MCI_STRING_LIST,
  1556.                       "",                 0L,                         MCI_END_COMMAND,
  1557.  
  1558.  
  1559. ΓòÉΓòÉΓòÉ 4.5.2. Parsing a Command List ΓòÉΓòÉΓòÉ
  1560.  
  1561. A command table consists of command lists, which define to the MDM parser how 
  1562. to parse certain commands. For example, illustrates a command list for 
  1563. MCI_SEEK: 
  1564.  
  1565. "seek",                  MCI_SEEK, 0,           MCI_COMMAND_HEAD,
  1566.    "notify",             MCI_NOTIFY,            MCI_FLAG,
  1567.    "wait",               MCI_WAIT,              MCI_FLAG,
  1568.    "to start",           MCI_TO_START,          MCI_FLAG,
  1569.    "to end",             MCI_TO_END,            MCI_FLAG,
  1570.    "to",                 MCI_TO,                MCI_INTEGER,
  1571. "",                      0L,                    MCI_END_COMMAND,
  1572.  
  1573. The SEEK command list tells the parser how to create the associated data 
  1574. structure for the pParam2 parameter of mciSendCommand to  point to, when it 
  1575. finds "seek" in the pszCommand parameter of mciSendString. 
  1576.  
  1577. Notice that each line is broken into a null-terminated string and two ULONGs. 
  1578. The ULONG following "seek" is composed of two parts; MCI_SEEK and 0. The 
  1579. command message (in this case, MCI_SEEK) is a USHORT, and therefore we need 
  1580. another USHORT as a filler. The MCI_COMMAND_HEAD Line_type tells MDM that the 
  1581. first ULONG (actually, the first USHORT) contains the usMessage parameter for 
  1582. mciDriverEntry. 
  1583.  
  1584. If the line type of a line is MCI_FLAG, then the first ULONG for that line is 
  1585. ORed together with all the other ULONGs for MCI_FLAG lines, to form the 
  1586. ulParam1 parameter. 
  1587.  
  1588. The string parser makes two passes through the command list. The first pass is 
  1589. to determine the size of the structure to allocate for the command.  The second 
  1590. pass parses the command string, fills in the command structure, and creates a 
  1591. ulParam1 flag. 
  1592.  
  1593. Each command is composed of a number of ULONGs.  All commands have a minimum of 
  1594. one ULONG for the hwndCallback field.  The parser provides this ULONG 
  1595. automatically. The remaining size of the command structure is based on the 
  1596. Line_types used for the command. 
  1597.  
  1598. If the line type of a line is MCI_INTEGER, then the text following string S, 
  1599. where S is the null-terminated string in the command line, in pszCommand is an 
  1600. integer and should be put in the corresponding ULONG in the structure of ULONGs 
  1601. that pParam2 points to. 
  1602.  
  1603. If the line type is MCI_STRING, then the text following string S in pszCommand 
  1604. is a string, and a pointer to this string will be put in the corresponding 
  1605. ULONG in the structure of ULONGs that pParam2 points to. 
  1606.  
  1607. Finally, if the line type is MCI_RETURN, then the first ULONG of that line 
  1608. specifies the value that is to be returned through the data structure pointed 
  1609. to by pParam2. 
  1610.  
  1611. The pParam2 data structure is laid out based on the command list. The first 
  1612. ULONG is always hwndCallback. The next one or two ULONGs represent MCI_RETURN: 
  1613.  
  1614.      If MCI_RETURN is specified, and MCI_INTEGER is the first ULONG of that 
  1615.       line, then the second ULONG of pParam2 is ulReturn. 
  1616.  
  1617.      If MCI_RETURN is specified and MCI_STRING is the first ULONG of that 
  1618.       line, then the second ULONG of pParam2 is ulReturn, and the third ULONG 
  1619.       is ulRetSize. The ulRetSize specifies the length of the string. 
  1620.  The other fields of pParam2 are filled in based on the MCI_INTEGER and 
  1621.  MCI_STRING appearing in the second ULONG of the command lines.  In addition, 
  1622.  MCI_CONSTANT and MCI_END_CONSTANT form a range of possible values for one of 
  1623.  the fields in the structure. This block represents a single ULONG in the 
  1624.  structure. These fields are filled in, in the order they appear in the command 
  1625.  list. For example, suppose the string parser parses the MCI_STATUS command 
  1626.  list shown in the following example code. 
  1627.  
  1628.       "status\0",            MCI_STATUS, 0,                 MCI_COMMAND_HEAD,
  1629.       "\0",                  MCI_INTEGER,                   MCI_RETURN,
  1630.       "notify\0",            MCI_NOTIFY,                    MCI_FLAG,
  1631.       "wait\0",              MCI_WAIT,                      MCI_FLAG,
  1632.       "\0",                  MCI_STATUS_ITEM,               MCI_CONSTANT,
  1633.       "mode\0",              MCI_STATUS_MODE,               MCI_INTEGER,
  1634.       "ready\0",             MCI_STATUS_READY,              MCI_INTEGER,
  1635.       "current track\0",     MCI_STATUS_CURRENT_TRACK,      MCI_INTEGER,
  1636.       "length\0",            MCI_STATUS_LENGTH,             MCI_INTEGER,
  1637.       "number of tracks\0",  MCI_STATUS_NUMBER_OF_TRACKS,   MCI_INTEGER,
  1638.       "position\0",          MCI_STATUS_POSITION,           MCI_INTEGER,
  1639.       "position in track\0", MCI_STATUS_POSITION_IN_TRACK,  MCI_INTEGER,
  1640.       "time format\0",       MCI_STATUS_TIME_FORMAT,        MCI_INTEGER,
  1641.       "speed format\0",      MCI_STATUS_SPEED_FORMAT,       MCI_INTEGER,
  1642.       "\0",                  0L,                            MCI_END_CONSTANT,
  1643.       "track\0",             MCI_TRACK,                     MCI_INTEGER,
  1644.       "\0",                  0L,                            MCI_END_COMMAND,
  1645.  
  1646.  The string parser produces the pParam2 parameter shown in the following 
  1647.  figure. 
  1648.  
  1649.          {
  1650.          HWND       hwndCallback;
  1651.          ULONG      ulReturn;
  1652.          ULONG      ulItem;
  1653.          ULONG      ulTrack;
  1654.          }
  1655.  
  1656.  Notice that the MCI_CONSTANT block is defined in order to fill in the ulItem 
  1657.  field of the status structure. If the keyword field on the MCI_CONSTANT line 
  1658.  is "\0" or NULL, then the parser is looking for any keyword defined in the 
  1659.  block, and the first ULONG of the matching keyword is put in the ulItem field. 
  1660.  If the keyword on the MCI_CONSTANT line is not "\0" then the parser looks for 
  1661.  that keyword and ORs the first ULONG of the MCI_CONSTANT line with ulParam1. 
  1662.  The parser continues to look for a keyword match in the constant block. For 
  1663.  example: 
  1664.  
  1665.   "capability",              MCI_GETDEVCAPS, 0,                   MCI_COMMAND_HEAD,
  1666.    "",                       MCI_PREROLL_TYPE_RETURN, 0,          MCI_RETURN_TYPE,
  1667.       "deterministic",       MCI_PREROLL_DETERMINISTIC,           MCI_RETURN_TYPE_STRING,
  1668.       "notified"             MCI_PREROLL_NOTIFIED,                MCI_RETURN_TYPE_STRING,
  1669.       "none",                MCI_PREROLL_NONE,                    MCI_RETURN_TYPE_STRING,
  1670.    "none",                   0L,                                  MCI_END_RETURN_TYPE,
  1671.    "",                       MCI_TRUE_FALSE_RETURN, 0,            MCI_RETURN_TYPE,
  1672.       "TRUE",                1L,                                  MCI_RETURN_TYPE_STRING,
  1673.       "FALSE",               0L,                                  MCI_RETURN_TYPE_STRING,
  1674.    "",                       0L,                                  MCI_END_RETURN_TYPE,
  1675.    "",                       MCI_DEVICENAME_RETURN, 0,            MCI_RETURN_TYPE,
  1676.       "Videotape",           MCI_DEVTYPE_VIDEOTAPE, 0,            MCI_RETURN_TYPE_STRING,
  1677.       "Videodisc",           MCI_DEVTYPE_VIDEODISC, 0,            MCI_RETURN_TYPE_STRING,
  1678.       "CDaudio",             MCI_DEVTYPE_CD_AUDIO,  0,            MCI_RETURN_TYPE_STRING,
  1679.       "DAT",                 MCI_DEVTYPE_DAT,       0,            MCI_RETURN_TYPE_STRING,
  1680.       "Audiotape",           MCI_DEVTYPE_AUDIO_TAPE,        0,    MCI_RETURN_TYPE_STRING,
  1681.       "Other",               MCI_DEVTYPE_OTHER,             0,    MCI_RETURN_TYPE_STRING,
  1682.       "Waveaudio",           MCI_DEVTYPE_WAVEFORM_AUDIO,    0,    MCI_RETURN_TYPE_STRING,
  1683.       "Sequencer",           MCI_DEVTYPE_SEQUENCER,         0,    MCI_RETURN_TYPE_STRING,
  1684.       "Ampmix",              MCI_DEVTYPE_AUDIO_AMPMIX,      0,    MCI_RETURN_TYPE_STRING,
  1685.       "Overlay",             MCI_DEVTYPE_OVERLAY,           0,    MCI_RETURN_TYPE_STRING,
  1686.       "Digitalvideo",        MCI_DEVTYPE_DIGITAL_VIDEO,     0,    MCI_RETURN_TYPE_STRING,
  1687.       "Speaker",             MCI_DEVTYPE_SPEAKER,           0,    MCI_RETURN_TYPE_STRING,
  1688.       "Headphone",           MCI_DEVTYPE_HEADPHONE,         0,    MCI_RETURN_TYPE_STRING,
  1689.       "Microphone",          MCI_DEVTYPE_MICROPHONE,        0,    MCI_RETURN_TYPE_STRING,
  1690.       "Monitor",             MCI_DEVTYPE_MONITOR,           0,    MCI_RETURN_TYPE_STRING,
  1691.       "CDXA",                MCI_DEVTYPE_CDXA,              0,    MCI_RETURN_TYPE_STRING,
  1692.    "",                       0L,                                  MCI_END_RETURN_TYPE,
  1693.    "",                       MCI_INTEGER,                         MCI_RETURN,
  1694.    "notify",                 MCI_NOTIFY,                          MCI_FLAG,
  1695.    "wait",                   MCI_WAIT,                            MCI_FLAG,
  1696.    "",                       MCI_GETDEVCAPS_ITEM,                 MCI_CONSTANT,
  1697.       "can record",          MCI_GETDEVCAPS_CAN_RECORD,           MCI_INTEGER,
  1698.       "can insert",          MCI_GETDEVCAPS_CAN_RECORD_INSERT,    MCI_INTEGER,
  1699.       "has audio",           MCI_GETDEVCAPS_HAS_AUDIO,            MCI_INTEGER,
  1700.       "has video",           MCI_GETDEVCAPS_HAS_VIDEO,            MCI_INTEGER,
  1701.       "can eject",           MCI_GETDEVCAPS_CAN_EJECT,            MCI_INTEGER,
  1702.       "can play",            MCI_GETDEVCAPS_CAN_PLAY,             MCI_INTEGER,
  1703.       "can save",            MCI_GETDEVCAPS_CAN_SAVE,             MCI_INTEGER,
  1704.       "uses files",          MCI_GETDEVCAPS_USES_FILES,           MCI_INTEGER,
  1705.       "compound device",     MCI_GETDEVCAPS_USES_FILES,           MCI_INTEGER,
  1706.       "can lockeject",       MCI_GETDEVCAPS_CAN_LOCKEJECT,        MCI_INTEGER,
  1707.       "can setvolume",       MCI_GETDEVCAPS_CAN_SETVOLUME,        MCI_INTEGER,
  1708.       "preroll type",        MCI_GETDEVCAPS_PREROLL_TYPE,         MCI_INTEGER,
  1709.       "preroll time",        MCI_GETDEVCAPS_PREROLL_TIME,         MCI_INTEGER,
  1710.       "device type",         MCI_GETDEVCAPS_DEVICE_TYPE,          MCI_INTEGER,
  1711.       "can stream",          MCI_GETDEVCAPS_CAN_STREAM,           MCI_INTEGER,
  1712.       "can process internal",MCI_GETDEVCAPS_CAN_PROCESS_INTERNAL, MCI_INTEGER,
  1713.    "",                       0L,                                  MCI_END_CONSTANT,
  1714.    "message",                MCI_GETDEVCAPS_MESSAGE,              MCI_CONSTANT,
  1715.       "acquire",             MCI_ACQUIREDEVICE, 0,                MCI_INTEGER,
  1716.       "release",             MCI_RELEASEDEVICE, 0,                MCI_INTEGER,
  1717.       "open",                MCI_OPEN, 0,                         MCI_INTEGER,
  1718.       "close",               MCI_CLOSE, 0,                        MCI_INTEGER,
  1719.       "escape",              MCI_ESCAPE, 0,                       MCI_INTEGER,
  1720.       "play",                MCI_PLAY, 0,                         MCI_INTEGER,
  1721.       "seek",                MCI_SEEK, 0,                         MCI_INTEGER,
  1722.       "stop",                MCI_STOP, 0,                         MCI_INTEGER,
  1723.       "pause",               MCI_PAUSE, 0,                        MCI_INTEGER,
  1724.       "info",                MCI_INFO, 0,                         MCI_INTEGER,
  1725.       "capability",          MCI_GETDEVCAPS, 0,                   MCI_INTEGER,
  1726.       "status",              MCI_STATUS, 0,                       MCI_INTEGER,
  1727.       "spin",                MCI_SPIN, 0,                         MCI_INTEGER,
  1728.       "set",                 MCI_SET, 0,                          MCI_INTEGER,
  1729.       "step",                MCI_STEP, 0,                         MCI_INTEGER,
  1730.       "record",              MCI_RECORD, 0,                       MCI_INTEGER,
  1731.       "sysinfo",             MCI_SYSINFO, 0,                      MCI_INTEGER,
  1732.       "save",                MCI_SAVE, 0,                         MCI_INTEGER,
  1733.       "cue",                 MCI_CUE, 0,                          MCI_INTEGER,
  1734.       "update",              MCI_UPDATE, 0,                       MCI_INTEGER,
  1735.       "setcuepoint",         MCI_SET_CUEPOINT, 0,                 MCI_INTEGER,
  1736.       "setpositionadvise",   MCI_SET_POSITION_ADVISE, 0,          MCI_INTEGER,
  1737.       "setsyncoffset",       MCI_SET_SYNC_OFFSET, 0,              MCI_INTEGER,
  1738.       "load",                MCI_LOAD, 0,                         MCI_INTEGER,
  1739.       "masteraudio",         MCI_MASTERAUDIO, 0,                  MCI_INTEGER,
  1740.       "gettoc",              MCI_GETTOC, 0,                       MCI_INTEGER,
  1741.       "connector",           MCI_CONNECTOR, 0,                    MCI_INTEGER,
  1742.       "resume",              MCI_RESUME, 0,                       MCI_INTEGER,
  1743.    "",                       0L,                                  MCI_END_CONSTANT,
  1744.   "",                        0L,                                  MCI_END_COMMAND,
  1745.  
  1746.  The pParam2 parameter would look like: 
  1747.  
  1748.          {
  1749.          ULONG      hwndCallback;
  1750.          ULONG      ulReturn;
  1751.          ULONG      ulltem;
  1752.          ULONG      ulMessage;
  1753.          }
  1754.  
  1755.  Notice the second constant block with the keyword "message".  The parser would 
  1756.  be looking for something like "message open".  This constant block would OR 
  1757.  the MCI_GETDEVCAPS_MESSAGE with the ulParam1 parameter and put the value 
  1758.  MCI_OPEN in the ulMessage field. 
  1759.  
  1760.  The multimedia string parser also supports one default INTEGER and STRING 
  1761.  value.  The constants MCI_DEFAULT_INTEGER and MCI_DEFAULT_STRING are used by 
  1762.  the string parser to locate unknown keywords.  For example, if a command 
  1763.  needed a file name as its only parameter, then the following line could be 
  1764.  used in the command table. 
  1765.  
  1766.      "\0",            MCI_FILENAME,                 MCI_DEFAULT_STRING,
  1767.  
  1768.  This item takes up a ULONG in the structure, just as in MCI_STRING. 
  1769.  
  1770.  Support for device-specific command tables is provided by the multimedia 
  1771.  installation application. When a device is installed, one of the parameters to 
  1772.  the install process is the command table (resource DLL).  The required and 
  1773.  device-type command tables are provided by the system. 
  1774.  
  1775.  
  1776. ΓòÉΓòÉΓòÉ 4.5.3. Error Tables ΓòÉΓòÉΓòÉ
  1777.  
  1778. In addition to custom command tables, MCDs can have custom error tables.  Error 
  1779. tables are represented as resources to the driver.  They are created using the 
  1780. RCDATA type of resource.  By default, custom driver error tables are associated 
  1781. with the MCDTABLE and VSDTABLE DLLs specified in the MMPM2.INI file.  The 
  1782. resource number is the device type number + MMERROR_TABLE_BASE.  For example, 
  1783. the following example shows an RCDATA value of 506.  This consists of: 
  1784.  
  1785.      A value of 500 from MMERROR_TABLE_BASE located in the MCIDRV.H file 
  1786.  
  1787.      A value of 6 from the device type you are supporting (for example, 
  1788.       MCI_DEVTYPE_OTHER located in the MCIOS2.H file). 
  1789.  
  1790.  As an alternate, you can add a #define statement in your header file to define 
  1791.  the RCDATA value.  For example: 
  1792.  
  1793.   #define MMERR_TABLE_MY_DEVICE  MMERROR_TABLE_BASE + MCI_DEVTYPE_OTHER
  1794.  
  1795.  MDM attempts to use these tables whenever mciGetErrorString is called with an 
  1796.  error generated by that driver.  If the custom error table resource does not 
  1797.  exist, then MDM uses its default error table.  The error table is a resource. 
  1798.  
  1799.  Error tables are composed of a set of ULONG strings with a special 
  1800.  end-of-table identifier as shown in the following example. 
  1801.  
  1802.   RCDATA        506
  1803.   BEGIN
  1804.  
  1805.   MCIERR_INVALID_DEVICE_NAME,        "Invalid Device Name given"
  1806.   MCIERR_SUCCESS,                    "MMPM Command completed successfully"
  1807.   MCIERR_INVALID_DEVICE_ID,          "Invalid device ID given"
  1808.   MCIERR_UNRECOGNIZED_KEYWORD,       "Unrecognized keyword"
  1809.   MCIERR_UNRECOGNIZED_COMMAND,       "Unrecognized command"
  1810.   MCIERR_HARDWARE,                   "Hardware error"
  1811.   MCIERR_OUT_OF_MEMORY,              "System out of memory"
  1812.        .
  1813.        .
  1814.        .
  1815.   MCIERR_MSG_TABLE_END               ""
  1816.   END
  1817.  
  1818.  Note:  If a device does not use a basic command, the MCD can return 
  1819.         MCIERR_UNSUPPORTED_FUNCTION.  If a device supports the command, but not 
  1820.         all of the options, it can return MCIERR_UNSUPPORTED_FLAG. 
  1821.  
  1822.  
  1823. ΓòÉΓòÉΓòÉ 4.6. Device States ΓòÉΓòÉΓòÉ
  1824.  
  1825. Media devices that transport data are considered to be in one of the following 
  1826. nine states at any given time: 
  1827.  
  1828.      Playing 
  1829.      Recording 
  1830.      Seeking 
  1831.      Stopped 
  1832.      Paused during a playback operation 
  1833.      Paused during a recording operation 
  1834.      Cued for a playback operation 
  1835.      Cued for a recording operation 
  1836.      Closed. 
  1837.  
  1838.  When a device is opened, the device context is assumed to be in the stopped 
  1839.  state.  The closed state can be viewed as both the initial state and the 
  1840.  termination state.  Or this state can be thought of as not a state at all, 
  1841.  because a device context does not exist before it is opened, and ceases to 
  1842.  exist when it is closed. 
  1843.  
  1844.  The following figure lists the allowable device states in the first column of 
  1845.  the table and indicates the changes in state that occur when the command 
  1846.  messages shown at the top of the table are issued. This table assumes all 
  1847.  error conditions keep the device in its current state. For example, a waveform 
  1848.  player that is opened without an element remains in the stopped state when a 
  1849.  play is issued, and the MCD receives an error code. 
  1850.  
  1851.  Note that a device is in the seek state only during the SEEK operation. Upon 
  1852.  completion of the seek, the device enters the stop state. The following figure 
  1853.  is provided as a guide to application developers and MCD writers.  There can 
  1854.  be no guarantee that every media device will conform to this table, but every 
  1855.  effort should be made to hide the complexity of the device from the 
  1856.  application. 
  1857.  
  1858.  Legend 
  1859.  
  1860.  E    Error condition. 
  1861.  -    Not applicable. 
  1862.  
  1863.  
  1864. ΓòÉΓòÉΓòÉ 4.7. Controlling a Streaming Device: Waveform Audio MCD ΓòÉΓòÉΓòÉ
  1865.  
  1866. To play back a waveform file stored on a user's hard disk, the Duet Player I 
  1867. sample program sends command messages to the Media Device Manager (MDM) by 
  1868. means of the mciSendCommand function.  The application is shielded from having 
  1869. to know specific information about the hardware.  In other words, the 
  1870. application does not need to know which audio adapter is being used to play 
  1871. back the waveform file.  The MDM sends the commands to a generic mciDriverEntry 
  1872. interface for audio devices, located in the AUDIOMCD DLL.  The 
  1873. device-independent AUDIOMCD and its device-specific counterpart AUDIOIF are two 
  1874. of the modules that comprise the waveform audio MCD as shown in the following 
  1875. figure. Also depicted are the MMIO and SSM interfaces used by the MCD. 
  1876.  
  1877.  
  1878. ΓòÉΓòÉΓòÉ 4.7.1. The Waveform Audio to Amp-Mixer Connection ΓòÉΓòÉΓòÉ
  1879.  
  1880. Because its primary purpose is to play and record waveform data, the waveform 
  1881. audio MCD routes an MCI_SET application request to set audio attributes.  The 
  1882. waveform audio MCD can route requests to the amp mixer because a default 
  1883. logical connection exists from the waveform audio MCD to the ampmixer MCD. 
  1884.  
  1885. A default connection is the name of a connected device, while a device-context 
  1886. connection is the actual handle to a particular instance of an opened device. 
  1887. The waveaudio device has a default connection to an ampmixer device.  When the 
  1888. waveaudio device is opened, it automatically opens the ampmix device creating 
  1889. an instance of each device.  Since devices may be shared in OS/2 multimedia, 
  1890. the waveaudio device can be opened again by another application and two new 
  1891. instances are created.  While the default connection is the same in both cases, 
  1892. the device context connections are different. 
  1893.  
  1894. The code fragment in the following example illustrates how the waveaudio device 
  1895. gets a default connection and opens an associated amp mixer.  The waveform 
  1896. audio MCD uses the device handle of the amp mixer to route any requests to 
  1897. change the volume. 
  1898.  
  1899. An application can retrieve the amp mixer handle by issuing the MCI_CONNECTION 
  1900. message.  This is necessary if the application needs to use any advanced audio 
  1901. shaping functions such as treble, bass, balance, and so on. 
  1902.  
  1903.   ulpInstance->usWaveDeviceID = pDrvOpenParams->usDeviceID;
  1904.  
  1905.   ulDeviceTypeID = MAKEULONG ( MCI_DEVTYPE_WAVEFORM_AUDIO,
  1906.                                pDrvOpenParams->usDeviceOrd);
  1907.   /******************************************************
  1908.   * Ensure that the INI file contains the right device id
  1909.   ******************************************************/
  1910.  
  1911.   if ( pDrvOpenParams->usDeviceType != MCI_DEVTYPE_WAVEFORM_AUDIO )
  1912.      {
  1913.      return ( MCIERR_INI_FILE );
  1914.      }
  1915.  
  1916.   usConnLength = sizeof(DEFAULTCONNECTIONS2);
  1917.  
  1918.   ulrc =  mciQueryDefaultConnections ( ulDeviceTypeID,
  1919.                                        &DefCon,
  1920.                                        &usConnLength);
  1921.   /******************************************************
  1922.   * Ensure that the INI file says that we are connected
  1923.   * to an amp mixer.  If it says that we are connected
  1924.   * to ourselves, return an error.
  1925.   ******************************************************/
  1926.   if ( ULONG_LOWD( DefCon.dwDeviceTypeID2 ) == MCI_DEVTYPE_WAVEFORM_AUDIO )
  1927.      {
  1928.      return ( MCIERR_INI_FILE );
  1929.      }
  1930.  
  1931.  
  1932. ΓòÉΓòÉΓòÉ 4.7.2. MMIO Operations ΓòÉΓòÉΓòÉ
  1933.  
  1934. The waveform audio MCD uses MMIO functions to: 
  1935.  
  1936.      Open the waveform data file 
  1937.  
  1938.      Initialize the audio device with information obtained from the file's 
  1939.       header 
  1940.  
  1941.      Support multiple file formats 
  1942.  
  1943.      Support networking functions 
  1944.  
  1945.      Support editing functions. 
  1946.  
  1947.  
  1948. ΓòÉΓòÉΓòÉ 4.7.2.1. Initializing the Audio Device ΓòÉΓòÉΓòÉ
  1949.  
  1950. To initialize the audio device, the waveform audio MCD needs information about 
  1951. the data element to be played.  The driver makes a call to mmioGetHeader, which 
  1952. returns information contained in the header of the waveform element (for 
  1953. example, whether the data was recorded in stereo or mono, what its sampling 
  1954. rate and bits-per-sample are, and so on.).  AUDIOMCD parses this information 
  1955. and puts it into the instance structure.  Next, the instance structure is 
  1956. passed to AUDIOIF, which uses the information to initialize the device by means 
  1957. of the IOCtl interface. 
  1958.  
  1959.   /*******************************************************
  1960.   * A streaming MCD should utilize MMIO to perform all
  1961.   * file manipulations.  If we use MMIO, then the MCD
  1962.   * will be free from file dependencies (that is, if a RIFF
  1963.   * IOProc or a VOC IOProc is loaded will be irrelevant.
  1964.   ********************************************************/
  1965.  
  1966.   ulrc = mmioGetHeader ( ulpInstance->hmmio,
  1967.                          (PVOID) &ulpInstance->mmAudioHeader ,
  1968.                          sizeof( ulpInstance->mmAudioHeader ),
  1969.                          (PLONG) &BytesRead,
  1970.                          (ULONG) NULL,
  1971.                          (ULONG) NULL);
  1972.  
  1973.   if ( ulrc == MMIO_SUCCESS )
  1974.       {
  1975.  
  1976.       /******************************************
  1977.       * Copy the data from the call into the instance
  1978.       * so that we can set the amp/mixer up with the
  1979.       * values that the file specifies.
  1980.       ******************************************/
  1981.  
  1982.       AMPMIX.sMode            = WAVEHDR.usFormatTag;
  1983.       AMPMIX.sChannels        = WAVEHDR.usChannels;
  1984.       AMPMIX.lSRate           = WAVEHDR.ulSamplesPerSec;
  1985.       AMPMIX.lBitsPerSRate    = WAVEHDR.usBitsPerSample;
  1986.       ulpInstance->ulDataSize = XWAVHDR.ulAudioLengthInBytes;
  1987.       AMPMIX.ulBlockAlignment = ( ULONG )WAVEHDR.usBlockAlign;
  1988.       ulpInstance->ulAverageBytesPerSec = WAVEHDR.usChannels *
  1989.          WAVEHDR.ulSamplesPerSec * ( WAVEHDR.usBitsPerSample / 8 );
  1990.  
  1991.       } /* SuccesFul GetHeader */
  1992.  
  1993.     else
  1994.       {
  1995.       ulrc = mmioGetLastError( ulpInstance->hmmio );
  1996.  
  1997.       }
  1998.       return (ulrc);
  1999.  
  2000. }  /* GetAudioHeader */
  2001.  
  2002. The handle hmmio that is passed to mmioGetHeader was returned by the call to 
  2003. mmioOpen to open the data element.  The buffer pointed to by mmAudioHeader is 
  2004. filled in by the MMIO Manager on return from mmioGetHeader.  It is an 
  2005. MMAUDIODATA structure. When the MMAUDIODATA structure is returned by 
  2006. mmioGetHeader, it contains all the information the waveform audio MCD needs to 
  2007. initialize the audio device.  The information includes: 
  2008.  
  2009.      The type of waveform data in the file (usFormatTag) 
  2010.  
  2011.      Whether the file was recorded in mono or stereo (usChannels) 
  2012.  
  2013.      The sample rate and size set when the file was recorded (usSamplesPerSec 
  2014.       and usBitsPerSample) 
  2015.  
  2016.      The length of the audio data (ulAudioLengthInBytes). 
  2017.  
  2018.  
  2019. ΓòÉΓòÉΓòÉ 4.7.2.2. Supporting Multiple File Formats ΓòÉΓòÉΓòÉ
  2020.  
  2021. The following example shows how the waveform audio MCD searches audio I/O 
  2022. procedures by defining MMIO_MEDIATYPE_AUDIO in the ulMedType field of the 
  2023. MMCTOCENTRY data structure.  To search and identify other types of IOProcs, you 
  2024. can include one of the following media type flags: 
  2025.  
  2026.      MMIO_MEDIATYPE_IMAGE 
  2027.      MMIO_MEDIATYPE_AUDIO 
  2028.      MMIO_MEDIATYPE_MIDI 
  2029.      MMIO_MEDIATYPE_COMPOUND 
  2030.      MMIO_MEDIATYPE_OTHER 
  2031.      MMIO_MEDIATYPE_UNKNOWN 
  2032.      MMIO_MEDIATYPE_DIGITALVIDEO 
  2033.      MMIO_MEDIATYPE_ANIMATION 
  2034.      MMIO_MEDIATYPE_MOVIE 
  2035.  
  2036.  Refer to the OS/2 Multimedia Programming Reference for further information. 
  2037.  
  2038.              mmioinfo.aulInfo[ 3 ] = MMIO_MEDIATYPE_AUDIO;
  2039.  
  2040.  
  2041.              /* Open the file */
  2042.  
  2043.  
  2044.              pInstance->hmmio = mmioOpen ( pFileName,
  2045.                                            &mmioinfo,
  2046.                                            ulFlags);
  2047.  
  2048.              /* Check for errors--see comments from above */
  2049.  
  2050.              if (pInstance->hmmio == (ULONG) NULL)
  2051.                {
  2052.                if ( mmioinfo.ulErrorRet == MMIOERR_MEDIA_NOT_FOUND )
  2053.                  {
  2054.                  return  ( MCIERR_INVALID_MEDIA_TYPE );
  2055.                  }
  2056.  
  2057.                return  ( mmioinfo.ulErrorRet );
  2058.                }
  2059.  
  2060.              pInstance->ulCapabilities = 0;
  2061.  
  2062.       else
  2063.           {
  2064.           /************************************************
  2065.           * Since the wave IOProc opened the file, we know
  2066.           * that it has the following capabilities.
  2067.           *************************************************/
  2068.           pInstance->ulCapabilities =  ( CAN_INSERT | CAN_DELETE | CAN_UNDOREDO +
  2069.                                          CAN_SAVE   | CAN_INSERT | CAN_RECORD  );
  2070.           }
  2071.  
  2072.     /******************************************
  2073.     * Get The Header Information
  2074.     *******************************************/
  2075.  
  2076.     if ( !(ulFlags & MMIO_CREATE) )
  2077.        {
  2078.  
  2079.         ulrc = GetAudioHeader (pInstance);
  2080.  
  2081.        } /* Not Create Flag */
  2082.  
  2083.     else
  2084.        {
  2085.        pInstance->ulDataSize = 0;
  2086.        }
  2087.  
  2088.     pInstance->fFileExists = TRUE;
  2089.  
  2090.  
  2091.     /*******************************************************************
  2092.     * You cannot do the set header immediately after file creation
  2093.     * because future sets on samples, bitpersample, channels may follow
  2094.    ********************************************************************/
  2095.  
  2096.     return (ulrc);
  2097.  
  2098.   } /* OpenFile */
  2099.  
  2100.  
  2101. ΓòÉΓòÉΓòÉ 4.7.2.3. Networking Functions ΓòÉΓòÉΓòÉ
  2102.  
  2103. Some OS/2 networks have specific IOProcs that can manage network traffic.  The 
  2104. MMPM2.INI file contains information that describes the streaming quality when 
  2105. files are played or recorded over the network. The following example shows how 
  2106. to retrieve Quality of Service (QOS) values from the INI file. 
  2107.  
  2108. If you are writing a streaming MCD, it is advantageous to use the 
  2109. MMIOM_BEGINSTREAM and MMIOM_ENDSTREAM messages to improve performance across a 
  2110. LAN. The following example uses the MMIOM_BEGINSTREAM message to inform the 
  2111. IOProcs that we want to stream across the network. 
  2112.  
  2113. /* ---------------------------------------------
  2114. * The MMPM2.INI file contains two variables that
  2115. * a streaming MCD should retrieve.  The first one
  2116. * QOS_VALUE (Quality of Service) contains settings
  2117. * which describe the quality of service that the
  2118. * network the user is streaming from will try to
  2119. * support (for example, GUARANTEED or DONTCARE).
  2120. * If this quality of service is not available, then another
  2121. * variable (QOSERRORFLAG) describes whether or not
  2122. * to notify the caller.
  2123. *--------------------------------------------------*/
  2124.  
  2125.  
  2126. ulrc = mciQuerySysValue( MSV_SYSQOSVALUE, &ulpInstance->lQosValue );
  2127.  
  2128. if ( !ulrc )
  2129.    {
  2130.    ulpInstance->lQosValue = DONTRESERVE;
  2131.    }
  2132.  
  2133. ulrc = mciQuerySysValue( MSV_SYSQOSERRORFLAG, &ulpInstance->lQOSReporting );
  2134.  
  2135. if ( !ulrc )
  2136.    {
  2137.    ulpInstance->lQOSReporting = ERROR_DEFAULT;
  2138.    }
  2139.  
  2140. The following example illustrates the EndQualityofService subroutine.  Some 
  2141. OS/2 networks have specific IOProcs which can manage network traffic.  This 
  2142. example uses the MMIOM_BEGINSTREAM and MMIOM_ENDSTREAM messages to inform these 
  2143. IOProcs that the waveaudio MCD wants to stream across the network. 
  2144.  
  2145. ULONG   EndQualityofService ( INSTANCE      *pInstance )
  2146.  
  2147. {
  2148. LONG         rc;
  2149.  
  2150.   rc = mmioSendMessage( pInstance->hmmio,
  2151.                         MMIOM_ENDSTREAM,
  2152.                         0,
  2153.                         0 );
  2154.  
  2155.   return ( rc );
  2156.  
  2157. } /* EndQualityofService */
  2158.  
  2159.  
  2160. ΓòÉΓòÉΓòÉ 4.7.2.4. Using MMIO Editing Functions ΓòÉΓòÉΓòÉ
  2161.  
  2162. This section shows the MMIO editing functions used by an MCD to implement media 
  2163. control interface editing functions. The MMIO functions and their media control 
  2164. interface equivalents are shown in the following table: 
  2165.  
  2166. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2167. ΓöéMMIO Functions                ΓöéMCI Equivalents               Γöé
  2168. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2169. ΓöéMMIOM_DELETE                  ΓöéMCI_CUT                       Γöé
  2170. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2171. ΓöéMMIOM_READ                    ΓöéMCI_COPY                      Γöé
  2172. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2173. ΓöéMMIOM_DELETE                  ΓöéMCI_DELETE                    Γöé
  2174. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2175. ΓöéMMIOM_UNDO                    ΓöéMCI_UNDO                      Γöé
  2176. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2177. ΓöéMMIOM_REDO                    ΓöéMCI_REDO                      Γöé
  2178. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2179. ΓöéMMIOM_DELETE,                 ΓöéMCI_PASTE                     Γöé
  2180. ΓöéMMIOM_BEGININSERT, and        Γöé                              Γöé
  2181. ΓöéMMIOM_ENDINSERT               Γöé                              Γöé
  2182. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2183.  
  2184. The following example shows how to use MMIO functions to paste data into a 
  2185. file. 
  2186.  
  2187. /*******************************************
  2188. * Remove the information in the file if
  2189. * from/to are specified.
  2190. ********************************************/
  2191.  
  2192. if ( ulParam1 & MCI_FROM || ulParam1 & MCI_TO )
  2193.    {
  2194.    lReturnCode = mmioSendMessage( pInstance->hmmio,
  2195.                                   MMIOM_DELETE,
  2196.                                   pEditParms->ulFrom,
  2197.                                   ulPasteLen );
  2198.  
  2199.    if ( lReturnCode != MMIO_SUCCESS )
  2200.       {
  2201.       ulrc = mmioGetLastError( pInstance->hmmio );
  2202.       PasteNotify( &FuncBlock, ulParam1, ulrc );
  2203.       return ( ulrc );
  2204.       }
  2205.    }
  2206.  
  2207.  
  2208.  
  2209. if ( !( ulParam1 & MCI_TO_BUFFER ) )
  2210.    {
  2211.    /*******************************************
  2212.    * Let the IOProc know that the information is
  2213.    * about to be inserted into the file
  2214.    ********************************************/
  2215.  
  2216.    lReturnCode = mmioSendMessage( pInstance->hmmio,
  2217.                                   MMIOM_BEGININSERT,
  2218.                                   0,
  2219.                                   0 );
  2220.  
  2221.    if ( lReturnCode != MMIO_SUCCESS )
  2222.       {
  2223.       ulrc = mmioGetLastError( pInstance->hmmio );
  2224.       PasteNotify( &FuncBlock, ulParam1, ulrc );
  2225.       return ( ulrc );
  2226.       }
  2227.  
  2228.    /*******************************************
  2229.    * Write the information that we received from
  2230.    * the clipboard
  2231.    *******************************************/
  2232.  
  2233.  
  2234.    lReturnCode = mmioWrite( pInstance->hmmio,
  2235.                             ( PSZ ) pBuffer,
  2236.                             ulBuffLen );
  2237.  
  2238.    if ( lReturnCode == MMIO_ERROR )
  2239.       {
  2240.       ulrc = mmioGetLastError( pInstance->hmmio );
  2241.       PasteNotify( &FuncBlock, ulParam1, ulrc );
  2242.       return ( ulrc );
  2243.       }
  2244.  
  2245.    /*******************************************
  2246.    * We have finished inserting the information
  2247.    * the paste is complete
  2248.    ********************************************/
  2249.  
  2250.  
  2251.   lReturnCode = mmioSendMessage( pInstance->hmmio,
  2252.                                  MMIOM_ENDINSERT,
  2253.                                  0,
  2254.                                  0 );
  2255.  
  2256.   if ( lReturnCode != MMIO_SUCCESS )
  2257.      {
  2258.      ulrc = mmioGetLastError( pInstance->hmmio );
  2259.      PasteNotify( &FuncBlock, ulParam1, ulrc );
  2260.      return ( ulrc );
  2261.      }
  2262.  
  2263.  
  2264. ΓòÉΓòÉΓòÉ 4.7.3. Sync/Stream Operations ΓòÉΓòÉΓòÉ
  2265.  
  2266. The waveform audio MCD uses SPI functions to communicate with the Sync/Stream 
  2267. Manager (SSM) to prepare for data streaming, and to stream the data from the 
  2268. source location (the buffer) to the target location (the adapter). 
  2269.  
  2270.  
  2271. ΓòÉΓòÉΓòÉ 4.7.3.1. Preparing to Stream the Waveform Data ΓòÉΓòÉΓòÉ
  2272.  
  2273. When the waveform audio MCD receives a request to open a device, it issues 
  2274. SpiGetHandler and passes the names of the source and target stream handlers to 
  2275. the Sync/Stream Manager (SSM), so that it knows which stream handlers are going 
  2276. to stream the data.  Data streaming cannot begin until the SSM has this 
  2277. information. 
  2278.  
  2279.   /*********************************************************
  2280.   * Get 'A' stream Handler Handles for Source & target operations
  2281.   * The file system stream handler is the default 'A' handler
  2282.   * but the memory stream handler will be used for playlists.
  2283.   **********************************************************/
  2284.  
  2285.  
  2286.      if (ulrc = SpiGetHandler((PSZ)DEFAULT_SOURCE_HANDLER_NAME,
  2287.                                &hidASource,
  2288.                                &hidATarget))
  2289.         {
  2290.         return ( ulrc );
  2291.         }
  2292.  
  2293.  
  2294.   /***********************************************************
  2295.   * Get 'B' stream Handler Handles for Source & target operations
  2296.   * The audio stream handler is considered the B stream handler
  2297.   * since it will usually be the target.
  2298.   *************************************************************/
  2299.  
  2300.   ulrc = SpiGetHandler( (PSZ)DEFAULT_TARGET_HANDLER_NAME,
  2301.                         &hidBSource,
  2302.                         &hidBTarget);
  2303.  
  2304.   return ( ulrc );
  2305.  
  2306. After the waveform audio MCD gets its handler IDs, it must fill in the SPCBKEY 
  2307. data structure to tell the SSM what kind of data it is going to stream. 
  2308. SPCBKEY consists of three fields; the data type and two subdata types.  For 
  2309. example, it might tell the SSM, "I'm going to stream PCM data at 8 bits, 22 
  2310. kHz." 
  2311.  
  2312. Next, the waveform audio MCD must fill in the device control block (DCB) to 
  2313. tell the SSM which device is being streamed to (as shown in the following 
  2314. example. The DCB contains two essential items of information: 
  2315.  
  2316.      ASCII string device name 
  2317.      Device handle 
  2318.  
  2319.  The ASCII string device name is obtained from the INI file and passed down by 
  2320.  MDM.  The device handle is the system file number returned by the IOCtl when 
  2321.  the open to the device was done from AUDIOIF. 
  2322.  
  2323.      SysInfo.ulItem       = MCI_SYSINFO_QUERY_NAMES;
  2324.      SysInfo.usDeviceType  = LOUSHORT(ulDeviceType);
  2325.      SysInfo.pSysInfoParm = &QueryNameParm;
  2326.  
  2327.      itoa (HIUSHORT(ulDeviceType), szIndex, 10);
  2328.  
  2329.      szIndex[1] = '\0';
  2330.  
  2331.      strncat (szAmpMix, szIndex, 2);
  2332.      strcpy (QueryNameParm.szLogicalName, szAmpMix);
  2333.  
  2334.      if (rc = mciSendCommand (0,
  2335.                               MCI_SYSINFO,
  2336.                               MCI_SYSINFO_ITEM | MCI_WAIT,
  2337.                               (PVOID) &SysInfo,
  2338.                               0))
  2339.              return (rc);
  2340.  
  2341.  
  2342.  
  2343.  
  2344.      /*******************************************
  2345.      * Get PDD associated with our AmpMixer
  2346.      * Device name is in pSysInfoParm->szPDDName
  2347.      ********************************************/
  2348.  
  2349.      SysInfo.ulItem       = MCI_SYSINFO_QUERY_DRIVER;
  2350.      SysInfo.usDeviceType  = (USHORT) ulDeviceType;
  2351.      SysInfo.pSysInfoParm = &SysInfoParm;
  2352.  
  2353.      strcpy (SysInfoParm.szInstallName, QueryNameParm.szInstallName);
  2354.  
  2355.      if (rc = mciSendCommand (0,
  2356.                               MCI_SYSINFO,
  2357.                               MCI_SYSINFO_ITEM | MCI_WAIT,
  2358.                               (PVOID) &SysInfo,
  2359.                               0))
  2360.          return (rc);
  2361.  
  2362.      strcpy (szPDDName, SysInfoParm.szPDDName);
  2363.  
  2364.      return ( MCIERR_SUCCESS );
  2365.  
  2366.   } /* GetPDDName */
  2367.  
  2368.  
  2369. ΓòÉΓòÉΓòÉ 4.7.3.2. Creating the Stream ΓòÉΓòÉΓòÉ
  2370.  
  2371. After handler IDs are obtained and the SPCBKEY and DCB information is filled 
  2372. in, the MCD makes the call to SpiCreateStream.  At this point the two handlers 
  2373. are initiated to create their stream, buffers are allocated, and the stage is 
  2374. set for streaming. 
  2375.  
  2376. The following example code illustrates how to create the stream.  The caller 
  2377. supplies the source and target stream handlers and the audio device control 
  2378. block should have been filled in previously (see MCIOPEN.C). The caller also 
  2379. supplies the EventProc(edure) where all of the stream events will be reported. 
  2380.  
  2381.   ulrc = SpiCreateStream ( hidSrc,
  2382.                            hidTgt,
  2383.                            &pInstance->StreamInfo.SpcbKey,
  2384.                            (PDCB) &pInstance->StreamInfo.AudioDCB,
  2385.                            (PDCB) &pInstance->StreamInfo.AudioDCB,
  2386.                            (PIMPL_EVCB) &pInstance->StreamInfo.Evcb,
  2387.                            (PEVFN) EventProc,
  2388.                            (ULONG) NULL,
  2389.                            hStream,
  2390.                            &pInstance->StreamInfo.hEvent);
  2391.  
  2392. When the MCD creates a stream, it must register a callback handle with SSM. 
  2393. The callback handle is an entry point or function within the MCD code that 
  2394. processes events coming back from SSM during the streaming process.  The 
  2395. callback handle is a powerful mechanism because it frees the driver to do other 
  2396. work during the streaming process.  When an event occurs, SSM detects it and 
  2397. reports it to the callback address. 
  2398.  
  2399. The waveform audio MCD sample includes the following event routines: 
  2400.  
  2401.      RecordEventRoutine (ADMCRECD.C) as shown in the following example. 
  2402.  
  2403.      PlayEventRoutine (ADMCPLAY.C) as shown in the next example. 
  2404.  
  2405.   RC APIENTRY RecordEventRoutine ( MEVCB  *pevcb)
  2406.   {
  2407.     MTIME_EVCB        *pMTimeEVCB;    // Modified EVCB
  2408.     INSTANCE          *ulpInstance;   // Instance Ptr
  2409.  
  2410.     /***********************************************************
  2411.     * EventProc receives asynchronous SSM event notifications
  2412.     * When the event is received, the event semaphore is posted
  2413.     * which will wake up the MCD thread(s) blocked on this
  2414.     * semaphore.
  2415.     * The semaphore is not posted for time events like
  2416.     * cuepoint (TIME) and media position changes since they do
  2417.     * not alter the state of the stream.
  2418.     ************************************************************/
  2419.  
  2420.  
  2421.     switch (pevcb->evcb.ulType)
  2422.     {
  2423.     case EVENT_IMPLICIT_TYPE:
  2424.  
  2425.          /* Retrieve our instance from the EVCB */
  2426.  
  2427.          ulpInstance = (INSTANCE *)pevcb->ulpInstance;
  2428.  
  2429.          switch (pevcb->evcb.ulSubType)
  2430.          {
  2431.          case EVENT_ERROR:
  2432.               ulpInstance->StreamEvent = EVENT_ERROR;
  2433.  
  2434.               /****************************************
  2435.               * Check for playlist specific error first
  2436.               *****************************************/
  2437.  
  2438.               /**************************************
  2439.               * End of PlayList event is received
  2440.               * as an implicit error event. It
  2441.               * is treated as a normal EOS
  2442.               ***************************************/
  2443.               if (ulpInstance->usPlayLstStrm == TRUE)
  2444.                   if (pevcb->evcb.ulStatus == ERROR_END_OF_PLAYLIST)
  2445.                       ulpInstance->StreamInfo.Evcb.evcb.ulStatus =
  2446.                           MMIOERR_CANNOTWRITE;
  2447.  
  2448.               DosPostEventSem (ulpInstance->hEventSem);
  2449.              break;
  2450.  
  2451.          case EVENT_STREAM_STOPPED:
  2452.               /****************************************
  2453.               * Event Stream Stopped. Release the
  2454.               * Blocked thread
  2455.               *****************************************/
  2456.               ulpInstance->StreamEvent = EVENT_STREAM_STOPPED;
  2457.               DosPostEventSem (ulpInstance->hEventSem);
  2458.              break;
  2459.  
  2460.          case EVENT_SYNC_PREROLLED:
  2461.               /******************************************
  2462.               * This event is received in response to a
  2463.               * preroll start. A Preroll start is done
  2464.               * on an MCI_CUE message.
  2465.               *******************************************/
  2466.               ulpInstance->StreamEvent = EVENT_SYNC_PREROLLED;
  2467.               DosPostEventSem (ulpInstance->hEventSem);
  2468.              break;
  2469.   .
  2470.   .
  2471.   .
  2472.  
  2473.  The MEVCB structure in the RecordEventRoutine is a modified IMPL_EVCB which 
  2474.  SSM uses to report events (see the OS/2 Multimedia Programming Reference). 
  2475.  You can add additional fields to extend the EVCB structure.  For example, 
  2476.  MEVCB shown in the following example adds an instance pointer containing local 
  2477.  instance data.  When the Sync/Stream Manager calls the waveform audio MCD, it 
  2478.  allows the MCD to have access to the local instance data, which is tied to 
  2479.  that event. 
  2480.  
  2481.  The PlayEventRoutine shown in the following example is presumed to receive all 
  2482.  types of event notifications from SSM.  The types include implicit events and 
  2483.  cue point notifications in terms of both time and data.  In response to cue 
  2484.  point notifications a MCI_CUEPOINT message is returned to MDM by way of 
  2485.  mdmDriverNotify. 
  2486.  
  2487.   RC APIENTRY PlayEventRoutine ( MEVCB     *pevcb)
  2488.   {
  2489.     MTIME_EVCB        *pMTimeEVCB;      /* Modified Time EVCB*/
  2490.     INSTANCE          * ulpInstance;    /* Current Instance*/
  2491.     HWND              hWnd;             /* Callback Handle */
  2492.     BOOL              fPlayListDone = FALSE;
  2493.  
  2494.     /***********************************************************
  2495.     * EventProc receives asynchronous SSM event notifications
  2496.     * When the event is received, the event semaphore is posted
  2497.     * which will wake up the MCD thread(s) blocked on this
  2498.     * semaphore.
  2499.     * The semaphore is not posted for time events like
  2500.     * cuepoint (TIME) and media position changes since they do
  2501.     * not alter the state of the stream.
  2502.     ************************************************************/
  2503.  
  2504.     switch (pevcb->evcb.ulType)
  2505.     {
  2506.     case EVENT_IMPLICIT_TYPE:
  2507.  
  2508.          /* Retrieve our instance from the EVCB */
  2509.  
  2510.          ulpInstance = (INSTANCE *)pevcb->ulpInstance;
  2511.  
  2512.          /* Retrieve the callback handle to post messages on */
  2513.  
  2514.          hWnd = ulpInstance->hwndCallBack;
  2515.  
  2516.          switch (pevcb->evcb.ulSubType)
  2517.          {
  2518.          case EVENT_EOS:
  2519.               ulpInstance->StreamEvent = EVENT_EOS;
  2520.               DosPostEventSem (ulpInstance->hEventSem);
  2521.              break;
  2522.  
  2523.          case EVENT_STREAM_STOPPED:
  2524.               /* Self explanatory--someone stopped the stream */
  2525.  
  2526.               ulpInstance->StreamEvent = EVENT_STREAM_STOPPED;
  2527.               DosPostEventSem (ulpInstance->hEventSem);
  2528.              break;
  2529.  
  2530.          case EVENT_SYNC_PREROLLED:
  2531.               /******************************************
  2532.               * This event is received in response to a
  2533.               * preroll start. A Preroll start is done
  2534.               * on an MCI_CUE message.
  2535.               *******************************************/
  2536.  
  2537.               ulpInstance->StreamEvent = EVENT_SYNC_PREROLLED;
  2538.               DosPostEventSem (ulpInstance->hEventSem);
  2539.              break;
  2540.  
  2541.          case EVENT_PLAYLISTMESSAGE:
  2542.  
  2543.               /******************************************
  2544.               * We can receive this event if a playlist
  2545.               * parser hits the MESSAGE COMMAND.
  2546.               * NOTE: The MCD should return this message
  2547.               * with the callback handle specified on the
  2548.               * open.  This could be the source of much
  2549.               * grief if you return on the wrong handle.
  2550.               ******************************************/
  2551.  
  2552.               mdmDriverNotify ( ulpInstance->usWaveDeviceID,
  2553.                               ulpInstance->hwndOpenCallBack,
  2554.                               MM_MCIPLAYLISTMESSAGE,
  2555.                               (USHORT) MAKEULONG(pevcb->evcb.ulStatus,
  2556.                                   ulpInstance->usWaveDeviceID),
  2557.                               (ULONG) pevcb->evcb.unused1);
  2558.              break;
  2559.  
  2560.          case EVENT_PLAYLISTCUEPOINT:
  2561.  
  2562.               /************************************************
  2563.               * We can receive this event if a playlist
  2564.               * parser hits the CUEPOINT COMMAND opcode
  2565.               * in the playlist.  This differs from a "normal"
  2566.               * cuepoint because it is detected by the source,
  2567.               * rather than the target stream handler.
  2568.               ************************************************/
  2569.  
  2570.  
  2571.               mdmDriverNotify ( ulpInstance->usWaveDeviceID,
  2572.                                 ulpInstance->hwndOpenCallBack,
  2573.                                 MM_MCICUEPOINT,
  2574.                                 (USHORT) MAKEULONG(pevcb->evcb.ulStatus,
  2575.                                     ulpInstance->usWaveDeviceID),
  2576.                                 (ULONG) pevcb->evcb.unused1);
  2577.              break;
  2578.  
  2579.  
  2580.          } /* SubType case of Implicit Events */
  2581.         break;
  2582.  
  2583.     case EVENT_CUE_TIME_PAUSE:
  2584.          {
  2585.          /***************************************************
  2586.          * This event will arrive if we played to a certain
  2587.          * position in the stream.  Let the play thread know
  2588.          * that we have reached the desired point.
  2589.          ****************************************************/
  2590.  
  2591.          pMTimeEVCB = (MTIME_EVCB *)pevcb;
  2592.          ulpInstance = (INSTANCE *)pMTimeEVCB->ulpInstance;
  2593.          ulpInstance->StreamEvent = EVENT_CUE_TIME_PAUSE;
  2594.  
  2595.          DosPostEventSem (ulpInstance->hEventSem);
  2596.          }
  2597.          break;
  2598.  
  2599.     case EVENT_CUE_TIME:
  2600.  
  2601.          break;
  2602.  
  2603.     } /* All Events case */
  2604.  
  2605.     return (MCIERR_SUCCESS);
  2606.  
  2607.   } /* PlayEventProc */
  2608.  
  2609.  Events reported by SSM can be normal occurrences, such as an end-of-stream 
  2610.  because playback is complete, or the events can be abnormal occurrences, such 
  2611.  as an error returned during the streaming process.  The driver needs to know 
  2612.  about these events. 
  2613.  
  2614.  SSM reports two types of events: implicit and explicit.  Implicit events are 
  2615.  always reported.  When one occurs, the driver must receive the notification of 
  2616.  its occurrence from SSM, however, it does not have to take any action. 
  2617.  
  2618.  An explicit event is reported to the driver only when the driver requests to 
  2619.  be notified of the event's occurrence.  For example, the driver requests 
  2620.  cuepoint notifications. 
  2621.  
  2622.  
  2623. ΓòÉΓòÉΓòÉ 4.7.3.3. Event Processing ΓòÉΓòÉΓòÉ
  2624.  
  2625. Before the stream is created, you can enable event notification for implicit 
  2626. and explicit events using the SpiEnableEvent function. The following example 
  2627. specifies the EVENT_CUE_TIME_PAUSE flag, which will cause the stream to be 
  2628. paused when the cuepoint is reached.  When the stream reaches the event during 
  2629. a play or record, the audio stream handler signals the MCD.  Note that the 
  2630. stream is only paused (not stopped). 
  2631.  
  2632. RC CreateToEvent (INSTANCE *ulpInstance, ULONG ulTo)
  2633. {
  2634. /* rename this function CreateToEvent */
  2635.  
  2636.  
  2637.   ULONG ulrc;
  2638.  
  2639.   /*********************************************************
  2640.   * Set up a cue time pause event at the place in
  2641.   * the stream where the caller wants us to play/record
  2642.   * to.  Note: this event will pause the stream and
  2643.   * will be considerably more accurate than just
  2644.   * setting a cue point, receiving the event and stopping
  2645.   * the stream (since a normal cue point will force
  2646.   * bleed over).
  2647.   *********************************************************/
  2648.  
  2649.   ulpInstance->StreamInfo.TimeEvcb.hwndCallback
  2650.        = ulpInstance->hwndCallBack;
  2651.   ulpInstance->StreamInfo.TimeEvcb.usDeviceID
  2652.        = ulpInstance->usWaveDeviceID;
  2653.   ulpInstance->StreamInfo.TimeEvcb.evcb.ulType
  2654.       = EVENT_CUE_TIME_PAUSE;
  2655.   ulpInstance->StreamInfo.TimeEvcb.evcb.ulFlags
  2656.       = EVENT_SINGLE;
  2657.   ulpInstance->StreamInfo.TimeEvcb.evcb.hstream
  2658.       = ulpInstance->StreamInfo.hStream;
  2659.   ulpInstance->StreamInfo.TimeEvcb.ulpInstance
  2660.       = (ULONG) ulpInstance;
  2661.   ulpInstance->StreamInfo.TimeEvcb.evcb.mmtimeStream = ulTo;
  2662.  
  2663.   /* Enable the cue time pause event. */
  2664.  
  2665.   ulrc = SpiEnableEvent((PEVCB) &ulpInstance->StreamInfo.TimeEvcb.evcb,
  2666.                         (PHEVENT) &ulpInstance->StreamInfo.hPlayToEvent);
  2667.  
  2668.   return ( ulrc );
  2669.  
  2670. } /* CreateToEvent */
  2671.  
  2672. If you enable event notification for a particular event, it is equally 
  2673. important to remove the event handle for the event so it is not used by 
  2674. subsequent commands.  When any given event is reported, it must be removed 
  2675. explicitly using the SpiDisableEvent function.  Once an event is removed from 
  2676. the system, the event no longer is detected or reported to the application or 
  2677. MCD. 
  2678.  
  2679.      SpiDisableEvent(ulpInstance->StreamInfo.hPlayToEvent);
  2680.  
  2681.  
  2682. ΓòÉΓòÉΓòÉ 4.7.3.4. Associating a Stream ΓòÉΓòÉΓòÉ
  2683.  
  2684. After a stream is created, and before it is possible to start the stream, it is 
  2685. necessary to make sure that a data resource (or stream object) is identified 
  2686. for use with the stream. The following example shows an example of a stream 
  2687. being associated with an MMIO file handle.  The file system stream handler 
  2688. (FSSH) will always be the stream handler that we want to associate the data 
  2689. object with, therefore, if we have created a playback stream then FSSH is the 
  2690. source, so associate with the source.  On a record stream, FSSH is the target, 
  2691. so associate with the target. 
  2692.  
  2693.   if (Operation == PLAY_STREAM)
  2694.       {
  2695.  
  2696.       ulrc = SpiAssociate ( (HSTREAM)*hStream,
  2697.                             hidSrc,
  2698.                             (PVOID) &pInstance->StreamInfo.acbmmio);
  2699.  
  2700.       }  /* Associating play stream */
  2701.  
  2702.  
  2703. ΓòÉΓòÉΓòÉ 4.7.3.5. Reassociating the Stream on MCI_LOAD ΓòÉΓòÉΓòÉ
  2704.  
  2705. Typically, a stream is destroyed, recreated, and then associated with a new 
  2706. file.  However, you can bypass these steps and reassociate a new file with an 
  2707. existing stream as long as the file is of the same data type as the stream was 
  2708. created to handle.  For example, in the case of waveaudio, if you had a 16-bit 
  2709. 11KB WAVE stream, the file you want to associate with the stream must be of the 
  2710. same data type and sub type. 
  2711.  
  2712. Note that only one data object may be associated with a stream once the stream 
  2713. is created, and it is specific to a particular stream handler (source or 
  2714. target).  Associations may be changed, but the stream cannot be active; it must 
  2715. be stopped first (discard stop, flush stop, or EOS). 
  2716.  
  2717. /*************************************************
  2718. * Reassociate The Stream Handlers with the new
  2719. * stream object if the stream has been created
  2720. * in the correct direction already.
  2721. *************************************************/
  2722. if (ulpInstance->ulCreateFlag == PREROLL_STATE)
  2723.     {
  2724.     /*********************************************
  2725.     * Fill in Associate Control Block Info for
  2726.     * file system stream handler (FSSH).  FSSH will
  2727.     * use the mmio handle we are associating to
  2728.     * stream information.
  2729.     *********************************************/
  2730.     ulpInstance->StreamInfo.acbmmio.ulObjType = ACBTYPE_MMIO;
  2731.     ulpInstance->StreamInfo.acbmmio.ulACBLen = sizeof (ACB_MMIO);
  2732.     ulpInstance->StreamInfo.acbmmio.hmmio = ulpInstance->hmmio;
  2733.  
  2734.     /***********************************************
  2735.     * Associate FileSystem as source if Playing. Note
  2736.     * the association is always done with the file
  2737.     * system stream handler since it is involved with
  2738.     * mmio operations.  If you try this with the
  2739.     * audio stream handler, you will get invalid
  2740.     * handle back.
  2741.     ***********************************************/
  2742.  
  2743.     if (AMPMIX.ulOperation == OPERATION_PLAY)
  2744.        {
  2745.        ulrc = SpiAssociate ( ulpInstance->StreamInfo.hStream,
  2746.                              ulpInstance->StreamInfo.hidASource,
  2747.                              (PVOID) &ulpInstance->StreamInfo.acbmmio );
  2748.        }
  2749.     /***********************************************
  2750.     * Associate FileSystem as target if recording
  2751.     ***********************************************/
  2752.  
  2753.     else
  2754.        {
  2755.        ulrc = SpiAssociate ( ulpInstance->StreamInfo.hStream,
  2756.                              ulpInstance->StreamInfo.hidATarget,
  2757.                              (PVOID) &ulpInstance->StreamInfo.acbmmio );
  2758.  
  2759.        } /* else we are in record mode */
  2760.  
  2761.  
  2762. ΓòÉΓòÉΓòÉ 4.7.3.6. Prerolling the Stream - Performance Considerations ΓòÉΓòÉΓòÉ
  2763.  
  2764. Prerolling a stream allows the source stream handlers to start and fill the 
  2765. buffers.  An application can then start the streams for better real-time 
  2766. response and initial synchronization of streams.  This is accomplished by the 
  2767. SpiStartStream function with the SPI_START_PREROLL flag. 
  2768.  
  2769. However, if a stream is already paused (STOP_PAUSED), the stream is already 
  2770. cued so there is no need to call SpiStartStream to refill the buffers. The 
  2771. following example illustrates how to check to see if a stream is in a paused 
  2772. state. 
  2773.  
  2774.   /************************************
  2775.   * If the stream is paused, there is no
  2776.   * sense in cueing it since the buffers
  2777.   * are full anyway
  2778.   **************************************/
  2779.  
  2780.   if ( STRMSTATE == MCI_PAUSE  ||
  2781.        STRMSTATE == STOP_PAUSED )
  2782.  
  2783.       {
  2784.       /***********************************************
  2785.       ** If the stream is going the right way
  2786.       ** then we have the ability to avoid the cue
  2787.       ** since the buffers have been filled up before
  2788.       ** we did the pause
  2789.       **********************************************/
  2790.  
  2791.       if ( AMPMIX.ulOperation == OPERATION_RECORD &&
  2792.            fCueInput )
  2793.          {
  2794.          ulpInstance->ulCreateFlag = PREROLL_STATE;
  2795.          STRMSTATE = CUERECD_STATE;
  2796.          return ( MCIERR_SUCCESS );
  2797.          }
  2798.  
  2799.       /*************************************************
  2800.       * If the current stream is cued for playback and
  2801.       * we have a cue_output request, our work is done
  2802.       **************************************************/
  2803.  
  2804.       else if ( AMPMIX.ulOperation == OPERATION_PLAY &&
  2805.                 fCueOutput )
  2806.          {
  2807.  
  2808.          ulpInstance->ulCreateFlag = PREROLL_STATE;
  2809.          STRMSTATE = CUEPLAY_STATE;
  2810.          return ( MCIERR_SUCCESS );
  2811.          }
  2812.  
  2813.       }   /* If the stream may be in cue state */
  2814.  
  2815.  
  2816. ΓòÉΓòÉΓòÉ 4.7.4. Waveform Audio MCD Modules ΓòÉΓòÉΓòÉ
  2817.  
  2818. The following figure illustrates the outline of the waveform audio media 
  2819. control driver (AUDIOMCT.DLL). 
  2820.  
  2821.  
  2822. ΓòÉΓòÉΓòÉ 4.7.4.1. Waveform Audio Media Control Driver DLL (AUDIOMCT.DLL) ΓòÉΓòÉΓòÉ
  2823.  
  2824. Following describes the files and messages that are processed in in the 
  2825. AUDIOMCT.DLL. 
  2826.  
  2827.  File             Description 
  2828.  
  2829.  ADMCOPEN.C       Processes the MCI_OPEN message.  On an MCI_OPEN, a streaming 
  2830.                   MCD should perform the following actions: 
  2831.  
  2832.                                     1. Check flags and validate pointers.
  2833.                                     2. Get default values from the INI files (if necessary).
  2834.                                     3. Process MCI_OPEN_PLAYLIST (if supported).
  2835.                                     4. Process MCI_OPEN_MMIO (if supported).
  2836.                                     5. Process MCI_OPEN_ELEMENT (if supported).
  2837.                                     6. Connect to the amp/mixer.
  2838.                                     7. Get the stream protocol key (if necessary).
  2839.  
  2840.  LOADSUBS.C       Provides various utility functions used by MCI_OPEN and 
  2841.                   MCI_LOAD including: 
  2842.  
  2843.                                     1. Creating temporary filenames (CheckForValidElement)
  2844.                                     2. Aborting in process commands (LoadAbortNotify)
  2845.                                     3. Processing the OPEN_MMIO flag (OpenHandle)
  2846.                                     4. Rational as to when to open the card in record or playback mode (OpenHandle) (ProcessElement).
  2847.                                     5. Processing temp files (ProcessElement).
  2848.                                     6. Opening a file with MMIO (ProcessElement).
  2849.                                     7. Processing the MCI_READ_ONLY flag (ProcessElement).
  2850.                                     8. Creating a temporary file ( SetupTempFiles).
  2851.                                     9. Using mmioSendMessage API to talk to an IOProc (SetupTempFiles).
  2852.                                     10.Retrieving a connection and opening the connected device.
  2853.                                     11.Stream Handler Setup (StreamSetup)
  2854.                                     12.Processing MCI_NOTIFY or MCI_WAIT and callback handles (NotifyWaitSet up).
  2855.  
  2856.  AUDIOMCD.C       Processes the MCIDRV_RESTORE message.  A streaming MCD will 
  2857.                   receive a restore message when it regains control of the 
  2858.                   device they are attached to (for example, someone quit 
  2859.                   another application causing us to gain use of the device). 
  2860.                   On a restore, the MCD should check to see if it is in a 
  2861.                   paused state.  If so, resume the stream. 
  2862.  
  2863.                   Processes the MCIDRV_SAVE message.  A streaming MCD will 
  2864.                   receive a save message when it loses control of the device it 
  2865.                   is attached to (for example, someone started another 
  2866.                   application which takes over the waveaudio device).  On a 
  2867.                   save, the MCD should check to see if the MCD is currently 
  2868.                   streaming (either record or playback).  If so, pause the 
  2869.                   stream, and set a flag stating that the MCD was saved. 
  2870.  
  2871.  ADMCLOAD.C       Processes the MCI_LOAD message.  This file illustrates the 
  2872.                   following concepts: 
  2873.  
  2874.                                     1. How to check flags on a load.
  2875.                                     2. How to stop any commands which are in process.
  2876.                                     3. Why cuepoints/positionadvises need to be turned off on a MCI_LOAD.
  2877.                                     4. Handling OPEN_MMIO on an MCI_LOAD.
  2878.                                     5. Why reassociation of a stream on MCI_LOAD is desirable and
  2879.                                       when it is appropriate.
  2880.  
  2881.  ADMCCAP.C        Processes the MCI_GETDEVCAPS message.  This file illustrates 
  2882.                   several concepts used to handle MCI_GETDEVCAPS including: 
  2883.  
  2884.                                     1. How to process the capability message commands.
  2885.                                       These are messages which this MCD supports (such as play, close etc.)
  2886.                                       Messages (or commands to the caller) such as sysinfo are
  2887.                                       not supported by this MCD.
  2888.                                     2. How to process the capability item flag.
  2889.                                       Items describe particular features (such as the ability to record)
  2890.                                       which the MCD either does or does not support.
  2891.  
  2892.  ADMCSTAT.C       Processes the MCI_STATUS message.  This file illustrates 
  2893.                   several concepts used to handle MCI_STATUS including: 
  2894.  
  2895.                                     1. When/If to report media position within a stream.
  2896.                                     2. How to determine the length of an existing file.
  2897.                                     3. How to determine the length of a file which is currently
  2898.                                       being recorded.
  2899.                                     4. Communicating with the amp/mixer to determine volume,
  2900.                                       and other amplifier specific commands.
  2901.                                     5. Reporting our current mode.
  2902.                                     6. Reporting the current time format.
  2903.  
  2904.  ADMCCUE.C        Processes the MCI_CUE message.  Applications will typically 
  2905.                   call MCI_CUE in order to reduce the time required to begin 
  2906.                   the initial record or play.  To a streaming MCD, MCI_CUE 
  2907.                   translates to an SPI_START_PREROLL.  The start preroll will 
  2908.                   fill up all of the initial streaming buffers but will not 
  2909.                   start the stream. Then, when MCI_PLAY or MCI_RECORD are 
  2910.                   called, when they do an SpiStartStream then stream can start 
  2911.                   immediately. 
  2912.  
  2913.                   On an MCI_CUE, a streaming MCD should perform the following 
  2914.                   actions: 
  2915.  
  2916.                                     1. Check flags and validate pointers.
  2917.                                     2. Check to see if the stream is already in cue state.  If it is, then
  2918.                                       just return success.
  2919.                                     3. If the caller wants to cue for output, execute the following:
  2920.                                       a. stop any in process commands.
  2921.                                       b. If the stream is going in the wrong direction (that is, record),
  2922.                                        destroy it.
  2923.                                       c. Create the stream if necessary.
  2924.                                       d. Preroll start the stream.
  2925.  
  2926.                                     4. If the caller wants to cue for input, execute the following:
  2927.                                       a. Stop any in process commands.
  2928.                                       b. If the stream is going in the wrong direction, destroy it.
  2929.                                       c. Create the stream if necessary.
  2930.                                       d. Preroll start the stream.
  2931.  
  2932.                   Processes the MCI_SET_CUEPOINT message.  On a 
  2933.                   MCI_SET_CUEPOINT, a streaming MCD should perform the 
  2934.                   following actions: 
  2935.  
  2936.                                     1. Check flags and validate pointers.
  2937.                                     2. Turn the cuepoint on or off depending on what flags are passed in.
  2938.  
  2939.  ADMCSEEK.C       Processes the MCI_SEEK message.  On a seek, a streaming MCD 
  2940.                   should perform the following actions: 
  2941.  
  2942.                                     1. Verify that the flags passed are valid.
  2943.                                     2. Verify the MCI_FROM, MCI_TO parameter if they were passed in.
  2944.                                     3. Ensure that any pointers passed are valid.
  2945.                                     4. Stop any commands which are active on another thread.
  2946.                                     5. If no stream has been created, then create one.
  2947.                                     6. If a stream had previously been created, ensure that it is in
  2948.                                       stopped state.
  2949.  
  2950.  ADMCPLAY.C       Processes the MCI_PLAY message.  On a MCI_PLAY, a streaming 
  2951.                   MCD should perform the following actions: 
  2952.  
  2953.                                     1. Always check flags and validate memory first.  This way,
  2954.                                       if the flags are invalid, the previous command will not be interrupted.
  2955.                                     2. If there is a command active on another thread (that is, a play,
  2956.                                       record or save), then either abort (record or save) or supersede
  2957.                                       (play) by stopping the stream and sending a message to the caller.
  2958.                                     3. If the stream is going the wrong way (for example,
  2959.                                       it is set up for recording) then destroy the stream.
  2960.                                     4. If no stream has been created, then create one.  If the stream handler
  2961.                                       needs to associate a data object, do it here.
  2962.                                     5. If we destroyed a recording stream before creating the play back stream,
  2963.                                       ensure that playback stream has the same position as the previous
  2964.                                       record stream.
  2965.                                     6. Enable any events (such as cuepoints or position advises).
  2966.                                     7. Start stream.
  2967.                                     8. Wait for a streaming event.
  2968.                                     9. Stop the stream if necessary.
  2969.                                     10.If MCI_NOTIFY was sent used, inform the caller of command completion.
  2970.  
  2971.  ADMCRECD.C       Processes the MCI_RECORD message.  On a MCI_RECORD, a 
  2972.                   streaming MCD should perform the following actions: 
  2973.  
  2974.                                     1. Always check flags and validate memory first.  This way, if the flags
  2975.                                       are invalid, the previous command will not be interrupted.
  2976.                                     2. If there is a command active on another thread (that is,
  2977.                                       a play, record or save), then either abort (play or save)
  2978.                                       or supersede (record) by stopping the stream and sending
  2979.                                       a message to the caller.
  2980.                                     3. If the stream is going the wrong way (for example,
  2981.                                       it is setup for playback) then destroy the stream.
  2982.                                     4. If no stream has been created, then create one.  If the stream handler
  2983.                                       needs to associate a data object, do it here.
  2984.                                     5. If we destroyed a play back stream before creating the record stream,
  2985.                                       seek to the same position in the record stream where the play back
  2986.                                       stream was.
  2987.                                     6. Enable any events (such as cuepoints or position advises).
  2988.                                     7. Start stream.
  2989.                                     8. Wait for a streaming event.
  2990.                                     9. Stop the stream if necessary.
  2991.                                     10.If MCI_NOTIFY was sent used, inform the caller of command completion.
  2992.  
  2993.  ADMCCLOS.C       Processes the MCI_CLOSE message.  On a close, a streaming MCD 
  2994.                   must perform the following actions: 
  2995.  
  2996.                                     1. Stop all commands which are active on another thread(s).
  2997.                                     2. Destroy all active streams.
  2998.                                     3. Close all open files.
  2999.                                     4. Delete any temporary files.
  3000.                                     5. Close any connected devices (such as an amp-mixer).
  3001.                                     6. If MCI_NOTIFY was used, notify the caller of completion.
  3002.  
  3003.  ADMCCONN.C       Processes the MCI_CONNECTOR message.  This source file 
  3004.                   illustrates how to enable, disable and query connectors.  It 
  3005.                   also illustrates how to pass messages on to a connected MCD. 
  3006.  
  3007.  ADMCREST.C       Processes the MCI_STOP message.  On a stop, a streaming MCD 
  3008.                   should perform the following actions: 
  3009.  
  3010.                                     1. Verify that the flags passed are valid.
  3011.                                     2. Stop any commands which are active on another thread.
  3012.                                     3. If a stream had previously been created, ensure that it is in
  3013.                                       stopped state.
  3014.                                     4. If it is a paused stream, then do a STOP_PAUSE to ensure that
  3015.                                       no data will be lost.
  3016.  
  3017.                   Processes the MCI_RESUME message.  On a MCI_RESUME, a 
  3018.                   streaming MCD should perform the following actions: 
  3019.  
  3020.                                     1. Ensure that no flags are passed in.
  3021.                                     2. If we are paused, resume the stream.
  3022.  
  3023.                   Processes the MCI_SETPOSITIONADVISE message.  To a streaming 
  3024.                   MCD, a position advise simply is a cuepoint which reoccurs 
  3025.                   every x time units.  To enable position advise, the following 
  3026.                   steps should be followed: 
  3027.  
  3028.                                     1. Check flags and validate and pointers.
  3029.                                     2. If the caller has asked for position advise to be turned on then
  3030.                                       a. If a stream has been created, then enable the recurring cuepoint
  3031.                                        event.
  3032.                                       b. Else, set a flag and enable the event later.
  3033.                                     3. If position advise is to be turned off, then disable the recurring
  3034.                                       cuepoint event.
  3035.  
  3036.                   Processes the MCI_PAUSE message.  On a MCI_PAUSE, a streaming 
  3037.                   MCD should perform the following actions: 
  3038.  
  3039.                                     1. Ensure that no flags are passed in.
  3040.                                     2. If we are currently streaming, pause the stream.
  3041.                                     3. Set flag indicating that we are in paused state.
  3042.  
  3043.  ADMCSAVE.C       Processes the MCI_SAVE message.  MCI_SAVE is not a required 
  3044.                   command, however, if a streaming MCD takes advantage of 
  3045.                   temporary files, then it should use MCI_SAVE. 
  3046.  
  3047.                                     1. Ensure that the flags are valid.
  3048.                                     2. Then ensure that all pointers point to valid memory.
  3049.                                     3. If any operations are currently active, they are then
  3050.                                       aborted.
  3051.                                     4. Finally, the save operation itself is then done.
  3052.  
  3053.  AUDIOSUB.C       Contains various utility functions including: 
  3054.  
  3055.                                     1. Correct processing of notifications.
  3056.                                     2. Handling calls the are neither MCI_WAIT or MCI_NOTIFY (PostMDMMessage).
  3057.                                     3. Using mmioGetHeader to obtain audio settings from a file (GetHeader).
  3058.                                     4. Creating a playlist stream (AssociatePlaylist).
  3059.                                     5. Installing an IOProc (InstallIOProc).
  3060.                                     6. Communicating with IOProcs with different capabilities (OpenFile).
  3061.                                     7. Processing audio files with various file formats (OpenFile).
  3062.                                     8. Time format conversion (ConvertToMM + ConvertTimeFormat).
  3063.                                     9. Creating an SPI stream (CreateNAssociateStream)
  3064.                                     10.Associating an SPI stream (CreateNAssociateStream)
  3065.                                     11.Setting an event for use in play to/record to (DoTillEvent).
  3066.  
  3067.  ADMCPST.C        Processes the MCI_PASTE message.  This file illustrates using 
  3068.                   MMIO functions and clipboard functions to: 
  3069.  
  3070.                                     1. Process the MCI_FROM_BUFFER flag or MCI_TO_BUFFER.
  3071.                                     2. Handle default positioning if no MCI_FROM/MCI_TO flags are
  3072.                                       passed
  3073.                                     3. Use MMIO to insert information into a file.
  3074.  
  3075.  ADMCCOPY.C       Processes the MCI_COPY, MCI_DELETE, MCI_CUT, MCI_UNDO and 
  3076.                   MCI_REDO messages.  It is a generic routine which handles 
  3077.                   placing information into the clipboard: 
  3078.  
  3079.                                     1. Default positioning for cut/copy/delete messages.
  3080.                                     2. Using MMIOM_DELETE to remove information from a file.
  3081.                                     3. Positioning after a cut/copy/delete
  3082.                                     4. Using MMIOM_UNDO and MMIOM_REDO messages.
  3083.  
  3084.  ADMCEDIT.C       Contains utilities used by clipboard functions (such as cut 
  3085.                   and copy).  The file illustrates: 
  3086.  
  3087.                                     1. How to Process MCI_FROM / MCI_TO for edit operations (CheckEditFlags) .
  3088.                                     2. Determine default from/to positions.
  3089.                                     3. Generic stream abort routine
  3090.                                     4. Retrieving information from the clipboard.
  3091.                                     5. Placing information into the clipboard.
  3092.                                     6. Using MMIO memory files to manipulate clipboard data.
  3093.  
  3094.  ADMCINI.C        Illustrates how to parse device specific parms from the INI 
  3095.                   file. 
  3096.  
  3097.  STRMSUBS.C       Contains streaming subroutines used by play, record and cue. 
  3098.  
  3099.                                     1. How to close mmio files, and temp files (CloseFile).
  3100.                                     2. How to stop a record/playback stream (StopStream).
  3101.                                     3. How to use a semaphore to protect in progress commands
  3102.                                       from being aborted in sensitive areas.
  3103.                                     4. Why a stream must be destroyed after an MCI_SET (DestroySetStream).
  3104.                                     5. How to handle superseding and aborting of notifies.
  3105.                                     6. How and why to set a cue time pause event for
  3106.                                       MCI_TO (ProcessFromToFlags).
  3107.                                     7. How to enable cuepoints and positionchanges (EnableEvents).
  3108.                                     8. Networking functions (BeginQualityOfService, EndQualityOfService)
  3109.  
  3110.  
  3111. ΓòÉΓòÉΓòÉ 4.8. Controlling a Nonstreaming Device: CD Audio MCD ΓòÉΓòÉΓòÉ
  3112.  
  3113. The CD audio MCD controls a nonstreaming device: the CD-ROM drive.  Because it 
  3114. is a nonstreaming device, the CD-ROM drive does not require buffered I/O for 
  3115. streaming by the sync/stream manager.  Instead, it plays audio out through its 
  3116. internal Digital-to-Analog Converter (DAC), which is the nonstreaming device 
  3117. equivalent of an audio adapter. Thus, the CD audio MCD must use the IOCtl 
  3118. interface to process its own commands to manipulate the data stream within the 
  3119. device. 
  3120.  
  3121. The modules of the CD audio MCD are shown in the following figure. 
  3122.  
  3123.  
  3124. ΓòÉΓòÉΓòÉ 4.8.1. Setting Audio Attributes ΓòÉΓòÉΓòÉ
  3125.  
  3126. Because the CD-ROM drive is a nonstreaming device, the CD audio MCD is not 
  3127. linked to the amp mixer.  This means the driver must do its own processing of 
  3128. MCI_SET commands that set audio attributes such as volume changes, using the 
  3129. IOCtl interface. 
  3130.  
  3131.  
  3132. ΓòÉΓòÉΓòÉ 4.8.2. Processing an MCI_PLAY Command ΓòÉΓòÉΓòÉ
  3133.  
  3134. The CD audio MCD receives commands by means of the mciDriverEntry point, same 
  3135. as the waveform audio MCD.  The command is passed to the vendor-specific driver 
  3136. (VSD) module. 
  3137.  
  3138. To see how the CD audio MCD processes these commands, let's trace the 
  3139. processing of an MCI_PLAY command.  To begin with, the vsdDriverEntry function 
  3140. makes a call to process_msg, passing the message and message parameters as 
  3141. shown in the following example. 
  3142.  
  3143. ULONG APIENTRY vsdDriverEntry(PVOID pInstance, USHORT usMessage,
  3144.                               ULONG *pulParam1, PVOID pParam2,
  3145.                               USHORT usUserParm)
  3146. {
  3147.    ULONG  rc, ulP1Temp = MCI_WAIT;
  3148.    USHORT try = 1;
  3149.  
  3150.    if (pulParam1 == 0L)
  3151.       pulParam1 = &ulP1Temp;
  3152.  
  3153.    /* check to see if the drive is open, unless it is an Open message */
  3154.    if (usMessage == MCI_OPEN)
  3155.       rc = CDAudOpen(*pulParam1, (MMDRV_OPEN_PARMS *)pParam2);
  3156.    else
  3157.    {
  3158.       /* if the device is closed try reopening it unless you are closing */
  3159.       if (((PINST) lpInstance)->hDrive == 0 && usMessage != MCI_CLOSE)
  3160.       {
  3161.          rc = CD01_Open((PINST) lpInstance);
  3162.          /* Clear commands not needing an open hardware device */
  3163.          if (rc == MCIERR_DEVICE_NOT_READY)
  3164.             if ((usMessage == MCI_DEVICESETTINGS) ||
  3165.                 (usMessage == MCI_GETDEVCAPS) ||
  3166.                 (usMessage == MCI_INFO) ||
  3167.                 (usMessage == MCIDRV_REGISTER_DRIVE) ||
  3168.                 (usMessage == MCI_SET_CUEPOINT) ||
  3169.                 (usMessage == MCI_SET_POSITION_ADVISE) ||
  3170.                 (usMessage == MCIDRV_CD_STATUS_CVOL) ||
  3171.                 (usMessage == MCIDRV_SYNC &&
  3172.                    !(*pulParam1 & MCIDRV_SYNC_REC_PULSE)))
  3173.                rc = MCIERR_SUCCESS;
  3174.  
  3175.       }  /* of if drive needs to be open */
  3176.       else      /* drive was opened */
  3177.          rc = MCIERR_SUCCESS;
  3178.  
  3179.       if (!rc)
  3180.          do
  3181.          {
  3182.             /* process message */
  3183.             rc = process_msg((PINST) lpInstance, usMessage,
  3184.                              pulParam1, pParam2, usUserParm);
  3185.             if (rc == MCIERR_DEVICE_NOT_READY ||       /* ERROR RECOVERY */
  3186.                 rc == MCIERR_MEDIA_CHANGED)
  3187.             {
  3188.                if (((PINST)lpInstance)->Drive == '0') /* drive is closed */
  3189.                {                               /* do not reissue commands */
  3190.                   rc = MCIERR_SUCCESS;
  3191.                   break;
  3192.                }
  3193.                else
  3194.                   if (try == 2)
  3195.                      break;                    /* quit after 2 tries. */
  3196.                   else
  3197.                   {
  3198.                      rc = CDAudErrRecov((PINST) lpInstance);
  3199.                      if (rc)               /* error is still there, exit */
  3200.                         break;
  3201.                      else
  3202.                         try++;
  3203.                   }  /* of else only tried the command once (try == 1) */
  3204.  
  3205.             }  /* of if the drive was not ready */
  3206.             else
  3207.                break;                          /* clear flag to exit */
  3208.  
  3209.          } while (try);  /* end of do loop and if no open error */
  3210.  
  3211.    } /* of else command was not MCI_OPEN */
  3212.  
  3213.    return(rc);
  3214.  
  3215. }  /* of vsdDriverEntry() */
  3216.  
  3217. The process_msg routine has a long case statement.  The case in which we are 
  3218. interested is for MCI_PLAY.  When process_msg calls CD01_Play, it passes the 
  3219. following information: 
  3220.  
  3221.      Instance 
  3222.      msgParam1 
  3223.      FROM value received from msgParam2 
  3224.      TO value received from msgParam2 
  3225.      MCI_PLAY command. 
  3226.  
  3227.   static ULONG process_msg(PINST pInst, USHORT usMessage,
  3228.                           ULONG *pulParam1, PVOID pParam2, USHORT usUserParm)
  3229.   {
  3230.      ULONG rc;
  3231.  
  3232.      DosRequestMutexSem(pInst->hInstSem, WAIT_FOREVER);
  3233.      if (usMessage != MCI_PLAY)
  3234.         DosReleaseMutexSem(pInst->hInstSem);       // No protection needed
  3235.  
  3236.      /* process message */
  3237.      switch(usMessage)
  3238.      {
  3239.         case MCI_CLOSE :
  3240.            rc = CDAudClose(pInst, *pulParam1);
  3241.            break;
  3242.         case MCI_CUE :                         /* Pre-roll */
  3243.            rc = CD01_Cue(pInst);
  3244.            break;
  3245.         case MCI_GETDEVCAPS :                  /* Get Device Capabilities */
  3246.            rc = CD01_GetCaps(*pulParam1, (MCI_GETDEVCAPS_PARMS *)pParam2);
  3247.            break;
  3248.         case MCI_GETTOC :                        /* Get Table of Contents */
  3249.            if (*pulParam1 & WAIT_NOTIFY_MASK)
  3250.               rc = MCIERR_INVALID_FLAG;
  3251.            else
  3252.               rc = CD01_GetTOC(pInst, (MCI_TOC_PARMS *)pParam2);
  3253.            break;
  3254.         case MCI_INFO :
  3255.            rc = CDAudInfo(pInst, *pulParam1, (MCI_INFO_PARMS *)pParam2);
  3256.            break;
  3257.         /* case MCI_OPEN :     open was already done in vsdDriverEntry() */
  3258.  
  3259.         case MCI_PAUSE :
  3260.            rc = CD01_Stop(pInst, TIMER_PLAY_SUSPEND);
  3261.            break;
  3262.         case MCI_PLAY :
  3263.            rc = CD01_Play(pInst, pulParam1,
  3264.                           ((MCI_PLAY_PARMS *)pParam2)->ulFrom,
  3265.                           ((MCI_PLAY_PARMS *)pParam2)->ulTo, usUserParm,
  3266.                           ((MCI_PLAY_PARMS *)pParam2)->hwndCallback);
  3267.            break;
  3268.         case MCIDRV_REGISTER_DISC :                  /* Register Disc */
  3269.            rc = CDAudRegDisc(pInst, REG_BOTH, (MCI_CD_REGDISC_PARMS *)
  3270.              pParam2);
  3271.            break;
  3272.         case MCIDRV_REGISTER_DRIVE :                 /* Register Drive */
  3273.            rc = CDAudRegDrive(pInst, (MCI_CD_REGDRIVE_PARMS *)pParam2);
  3274.            break;
  3275.         case MCIDRV_REGISTER_TRACKS :                /* Register Tracks */
  3276.            rc = CD01_RegTracks(pInst, (MCI_CD_REGTRACKS_PARMS *)pParam2);
  3277.            break;
  3278.         case MCIDRV_RESTORE :
  3279.            rc = CD01_Restore(pInst, (MCIDRV_CD_SAVE_PARMS *)pParam2);
  3280.            break;
  3281.         case MCI_RESUME :                            /* Unpause */
  3282.            rc = CD01_Resume(pInst);
  3283.            break;
  3284.         case MCIDRV_SAVE :
  3285.            rc = CD01_Save(pInst, (MCIDRV_CD_SAVE_PARMS *)pParam2);
  3286.            break;
  3287.         case MCI_SEEK :
  3288.            rc = CD01_Seek(pInst, ((MCI_SEEK_PARMS *)pParam2)->ulTo);
  3289.            break;
  3290.         case MCI_SET :
  3291.            rc = CDAudSet(pInst, pulParam1, (MCI_SET_PARMS *)pParam2);
  3292.            break;
  3293.         case MCI_SET_CUEPOINT :
  3294.            rc = CD01_CuePoint(pInst, *pulParam1, (MCI_CUEPOINT_PARMS *)
  3295.               pParam2);
  3296.            break;
  3297.         case MCI_SET_POSITION_ADVISE :
  3298.            rc = CD01_PosAdvise(pInst, *pulParam1, (MCI_POSITION_PARMS *)
  3299.               pParam2);
  3300.            break;
  3301.         case MCIDRV_CD_SET_VERIFY :
  3302.            rc = CDAudSetVerify(*pulParam1);
  3303.            break;
  3304.         case MCI_STATUS :
  3305.            rc = CDAudStatus(pInst, *pulParam1, (MCI_STATUS_PARMS *)pParam2);
  3306.            break;
  3307.         case MCIDRV_CD_STATUS_CVOL :
  3308.            rc = CDAudStatCVol(&((MCI_STATUS_PARMS *)pParam2)->ulReturn);
  3309.            break;
  3310.         case MCI_STOP :
  3311.            rc = CD01_Stop(pInst, TIMER_EXIT_ABORTED);
  3312.            break;
  3313.         case MCIDRV_SYNC :
  3314.            rc = CD01_Sync(pInst, *pulParam1, (MCIDRV_SYNC_PARMS *)pParam2);
  3315.            break;
  3316.  
  3317.         /* List unsupported functions */
  3318.  
  3319.         case MCI_ACQUIREDEVICE :  case MCI_CONNECTION :  case MCI_CONNECTOR :
  3320.         case MCI_CONNECTORINFO :  case MCI_DEVICESETTINGS :
  3321.         case MCI_DEFAULT_CONNECTION:                     case MCI_ESCAPE :
  3322.         case MCI_LOAD:            case MCI_MASTERAUDIO : case MCI_RECORD :
  3323.         case MCI_RELEASEDEVICE :  case MCI_SAVE :        case MCI_SPIN :
  3324.         case MCI_STEP :           case MCI_SYSINFO :     case MCI_UPDATE :
  3325.         case MCIDRV_CD_READ_LONG :
  3326.            rc = MCIERR_UNSUPPORTED_FUNCTION;
  3327.            break;
  3328.         default : rc = MCIERR_UNRECOGNIZED_COMMAND;
  3329.  
  3330.      }  /* of switch */
  3331.  
  3332.      return(rc);
  3333.  
  3334.  When CD01_Play receives a PLAY command, processing goes to the line that 
  3335.  issues the call to CallIOCtl. 
  3336.  
  3337.   ULONG CD01_Play(PINST pInst, ULONG *pulParam1, ULONG ulFrom, ULONG ulTo,
  3338.                   USHORT usUserParm, HWND hwndCallback)
  3339.   {
  3340.      ULONG rc;
  3341.      ULONG ulThreadID;
  3342.      ULONG cnt;
  3343.  
  3344.      /* Stop drive before issuing next play command */
  3345.      if ((pInst->usPlayFlag == TIMER_PLAYING) ||
  3346.          (pInst->usPlayFlag == TIMER_PLAY_SUSPEND) ||
  3347.          (pInst->usPlayFlag == TIMER_PLAY_SUSP_2))
  3348.         if (*pulParam1 & MCI_NOTIFY)
  3349.            CD01_Stop(pInst, TIMER_EXIT_SUPER);
  3350.         else
  3351.            CD01_Stop(pInst, TIMER_EXIT_ABORTED);
  3352.  
  3353.      /* prepare for play call */
  3354.      pInst->ulCurPos = ulFrom;
  3355.      pInst->ulEndPos = ulTo;
  3356.      pInst->usPlayNotify = (USHORT)(*pulParam1 & (MCI_WAIT | MCI_NOTIFY));
  3357.      if (*pulParam1 & MCI_NOTIFY)
  3358.      {
  3359.         pInst->usPlayUserParm = usUserParm;
  3360.         pInst->hwndPlayCallback = hwndCallback;
  3361.         *pulParam1 ^= MCI_NOTIFY;
  3362.      }  /* notify flag was used */
  3363.  
  3364.      if (*pulParam1 & MCI_WAIT)
  3365.         rc = CD01_Timer(pInst);      /* returns when play commands end */
  3366.      else
  3367.      {
  3368.         DosResetEventSem(pInst->hReturnSem, &cnt);  /*force a wait
  3369.         rc = DosCreateThread(&ulThreadID, (PFNTHREAD)CD01_Timer,
  3370.                              (ULONG)pInst, 0L, THREAD_STACK_SZ);
  3371.         if (rc)
  3372.         {
  3373.            rc = MCIERR_OUT_OF_MEMORY;
  3374.            DosPostEventSem(pInst->hReturnSem);
  3375.         }
  3376.         else  /* wait for new thread to process enough */
  3377.         {
  3378.            /* Let MCD know not to send notification by returning wait */
  3379.            *pulParam1 = (*pulParam1 & ~MCI_NOTIFY) | MCI_WAIT;
  3380.  
  3381.            /* wait for new thread to process enough */
  3382.            DosWaitEventSem(pInst->hReturnSem, WAIT_FOREVER);
  3383.         }
  3384.  
  3385.         DosReleaseMutexSem(pInst->hInstSem);
  3386.  
  3387.      }  /* else no wait flag was used */
  3388.  
  3389.      return(rc);
  3390.  
  3391.   }  /* of CD01_Play() */
  3392.  
  3393.   /************************************************************************/
  3394.   /*                                                                      */
  3395.   /* SUBROUTINE NAME:  CD01_PlayCont                                      */
  3396.   /*                                                                      */
  3397.   /* DESCRIPTIVE NAME:  CD Play Continue.                                 */
  3398.   /*                                                                      */
  3399.   /* FUNCTION:  Continue to play audio data to internal DAC(s) from a     */
  3400.   /*            MCIDRV_RESTORE or MCIDRV_SYNC command.                    */
  3401.   /*                                                                      */
  3402.   /* PARAMETERS:                                                          */
  3403.   /*      PINST pInst       -- Instance pointer.                          */
  3404.   /*      ULONG ulFrom      -- From address.                              */
  3405.   /*      ULONG ulTo        -- To address in MMTIME.                      */
  3406.   /*                                                                      */
  3407.   /* EXIT CODES:                                                          */
  3408.   /*      MCIERR_SUCCESS   -- action completed without error.             */
  3409.   /*      MCIERR_DEVICE_NOT_READY  -- device was not ready, no disc.      */
  3410.   /*      MCIERR_MEDIA_CHANGED     -- Disc changed.                       */
  3411.   /*                                                                      */
  3412.   /* NOTES:                                                               */
  3413.   /*                                                                      */
  3414.   /************************************************************************/
  3415.   ULONG CD01_PlayCont(PINST pInst, ULONG ulFrom, ULONG ulTo)
  3416.   {
  3417.      ULONG rc;
  3418.      BYTE param[PLAYAUD_PMAX] = {'C', 'D', '0', '1', RBMODE};
  3419.      ULONG ulDataLen = STANDRD_DMAX, ulParamLen = PLAYAUD_PMAX;
  3420.  
  3421.      /* convert starting MM Time into Redbook 2 format */
  3422.      * (ULONG *)¶m[STARTFFFLD] = REDBOOK2FROMMM(ulFrom);
  3423.  
  3424.      /* convert ending MM Time into Redbook 2 format */
  3425.      * (ULONG *)¶m[END_FF_FLD] = REDBOOK2FROMMM(ulTo);
  3426.  
  3427.      /* Stop drive before issuing next play command */
  3428.      CD01_Stop(pInst, TIMER_PLAY_SUSPEND);
  3429.  
  3430.      /* play drive */
  3431.      rc = CallIOCtl(pInst, CDAUDIO_CAT, PLAY__AUDIO,
  3432.                     param, ulParamLen, &ulParamLen,
  3433.                     NULL,  ulDataLen,  &ulDataLen);
  3434.      if (!rc)
  3435.         pInst->ulCurPos = ulFrom;
  3436.  
  3437.      /* if Timer was stopped, continue timer loop */
  3438.      if (pInst->usPlayFlag == TIMER_PLAY_SUSPEND)
  3439.         pInst->usPlayFlag = TIMER_PLAYING;
  3440.      DosPostEventSem(pInst->hTimeLoopSem);
  3441.  
  3442.      return(rc);
  3443.  
  3444.   }  /* of CD01_PlayCont() */
  3445.  
  3446.  The CallIOCtl routine issues the DosDevIOCtl request, passing the following 
  3447.  parameters: hDrive is the device handle retrieved from a DosOpen call, ulCat 
  3448.  is the IOCtl category, and ulFunction is the function number. Also required 
  3449.  are buffer pointers, buffer sizes and lengths, and pointers to the buffer 
  3450.  lengths for the parameter and the data buffers.  The Parameter buffer is used 
  3451.  for input, and the data buffer is used for output. The pointers to buffer 
  3452.  lengths enable the physical device driver to return the actual lengths of the 
  3453.  buffers. 
  3454.  
  3455.   ULONG CallIOCtl(PINST pInst,  ULONG ulCat,  ULONG ulFunction,
  3456.                   PVOID pParam, ULONG ulPLen, ULONG *pulPLen,
  3457.                   PVOID pData,  ULONG ulDLen, ULONG *pulDLen)
  3458.   {
  3459.      ULONG rc;
  3460.  
  3461.      DosRequestMutexSem(pInst->hIOSem, (ULONG)-1L);
  3462.      rc = DosDevIOCtl(pInst->hDrive, ulCat, ulFunction,
  3463.                       pParam, ulPLen, pulPLen,
  3464.                       pData,  ulDLen, pulDLen);
  3465.      DosReleaseMutexSem(pInst->hIOSem);
  3466.  
  3467.      switch(rc)
  3468.      {
  3469.         case 0L :
  3470.            rc = MCIERR_SUCCESS;
  3471.            break;
  3472.         case 0xFF03 :
  3473.            rc = MCIERR_UNSUPPORTED_FUNCTION;
  3474.            break;
  3475.         case 0xFF06 :
  3476.         case 0xFF08 :
  3477.            rc = MCIERR_OUTOFRANGE;
  3478.            break;
  3479.         case 0xFF04 :
  3480.         case 0xFF0C :
  3481.            rc = MCIERR_HARDWARE;
  3482.            break;
  3483.         case 0xFF10 :
  3484.            rc = MCIERR_MEDIA_CHANGED;
  3485.            break;
  3486.         default :
  3487.            rc = MCIERR_DEVICE_NOT_READY;
  3488.      }
  3489.  
  3490.      return(rc);
  3491.  
  3492.   }  /* of CallIOCtl() */
  3493.  
  3494.  
  3495. ΓòÉΓòÉΓòÉ 4.8.3. CD Audio MCD Modules ΓòÉΓòÉΓòÉ
  3496.  
  3497. The following figure illustrates the outline of the CD audio MCD (CDAUDIOT.DLL) 
  3498. and the vendor-specific driver (VSD) for the IBM 3510-001 CD-ROM driver 
  3499. (IBMCDRT.DLL). 
  3500.  
  3501.  
  3502. ΓòÉΓòÉΓòÉ 4.8.3.1. CD Audio Media Control Driver DLL (CDAUDIOT.DLL) ΓòÉΓòÉΓòÉ
  3503.  
  3504. The CD audio MCD, CDAUDIOT, receives commands from the MDM and processes them. 
  3505. If a command message cannot be completely processed, it is sent to the 
  3506. hardware-specific code in the VSD. 
  3507.  
  3508. Following describes the files and routines included in the CDAUDIOT.DLL. 
  3509.  
  3510.  
  3511. CDAUDIO.C File 
  3512.  
  3513. This module includes the entry point for the DLL.  Global validation and 
  3514. parameter checking is performed on requested command messages.  If the 
  3515. preliminary check finds no errors, a specific-processing function is called. 
  3516.  
  3517. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3518. ΓöéProcedure                ΓöéDescription                        Γöé
  3519. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3520. ΓöémciDriverEntry           ΓöéSpecifies the entry point to the   Γöé
  3521. Γöé                         ΓöéMCD from the MDM.                  Γöé
  3522. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3523. Γöépre_process_msg          ΓöéGets the device ready to process   Γöé
  3524. Γöé                         Γöéthe command.                       Γöé
  3525. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3526. Γöéprocess_msg              ΓöéProcesses the requested command    Γöé
  3527. Γöé                         Γöémessage.                           Γöé
  3528. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3529. Γöéverify_entry             ΓöéVerifies that entry parameters are Γöé
  3530. Γöé                         Γöévalid.                             Γöé
  3531. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3532. ΓöéQMAudio                  ΓöéQueries the master audio's current Γöé
  3533. Γöé                         Γöésettings.                          Γöé
  3534. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3535. ΓöéRegister                 ΓöéRegisters the drive.               Γöé
  3536. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3537. ΓöéReRegister               ΓöéRegisters the disc and tracks.     Γöé
  3538. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3539. ΓöéVSDReturn                ΓöéSpecifies the entry point to the   Γöé
  3540. Γöé                         ΓöéMCD from the VSD.  Processes returnΓöé
  3541. Γöé                         Γöéinformation from the VSD.          Γöé
  3542. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3543. ΓöéSetTrackInst             ΓöéSets track information in the      Γöé
  3544. Γöé                         Γöéinstance.                          Γöé
  3545. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3546. ΓöéValPointer               ΓöéValidates the address to record    Γöé
  3547. Γöé                         Γöéstructures.                        Γöé
  3548. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3549.  
  3550. CDAUDPRO.C File 
  3551.  
  3552. This module contains the hardware independent code that processes the command 
  3553. message.  Some command may be processed completely by the MCD while others 
  3554. require the VSD to access the hardware or know of information specific to the 
  3555. VSD's associated drive. 
  3556.  
  3557. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3558. ΓöéProcedure                ΓöéDescription                        Γöé
  3559. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3560. ΓöéProcClose                ΓöéProcesses the MCI_CLOSE command.   Γöé
  3561. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3562. ΓöéProcConnector            ΓöéProcesses the MCI_CONNECTOR        Γöé
  3563. Γöé                         Γöécommand.                           Γöé
  3564. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3565. ΓöéProcCue                  ΓöéProcesses the MCI_CUE command.     Γöé
  3566. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3567. ΓöéProcCuePoint             ΓöéProcesses the MCI_SET_CUEPOINT     Γöé
  3568. Γöé                         Γöécommand.                           Γöé
  3569. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3570. ΓöéProcGeneral              ΓöéProcesses pass through MCI         Γöé
  3571. Γöé                         Γöécommands.                          Γöé
  3572. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3573. ΓöéProcCaps                 ΓöéProcesses the MCI_GETDEVCAPS       Γöé
  3574. Γöé                         Γöécommand.                           Γöé
  3575. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3576. ΓöéProcInfo                 ΓöéProcesses the MCI_INFO command.    Γöé
  3577. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3578. ΓöéProcMAudio               ΓöéProcesses the MCI_MASTERAUDIO      Γöé
  3579. Γöé                         Γöécommand.                           Γöé
  3580. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3581. ΓöéProcOpen                 ΓöéProcesses the MCI_OPEN command.    Γöé
  3582. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3583. ΓöéProcPause                ΓöéProcesses the MCI_PAUSE command.   Γöé
  3584. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3585. ΓöéProcPlay                 ΓöéProcesses the MCI_PLAY command.    Γöé
  3586. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3587. ΓöéProcPosAdvise            ΓöéProcesses the                      Γöé
  3588. Γöé                         ΓöéMCI_SET_POSITION_ADVISE command.   Γöé
  3589. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3590. ΓöéProcRestore              ΓöéProcesses the MCIDRV_RESTORE       Γöé
  3591. Γöé                         Γöécommand.                           Γöé
  3592. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3593. ΓöéProcResume               ΓöéProcesses the MCI_RESUME command.  Γöé
  3594. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3595. ΓöéProcSave                 ΓöéProcesses the MCIDRV_SAVE command. Γöé
  3596. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3597. ΓöéProcSeek                 ΓöéProcesses the MCI_SEEK command.    Γöé
  3598. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3599. ΓöéProcSet                  ΓöéProcesses the MCI_SET command.     Γöé
  3600. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3601. ΓöéProcSetSync              ΓöéProcesses the MCI_SET_SYNC_OFFSET  Γöé
  3602. Γöé                         Γöécommand.                           Γöé
  3603. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3604. ΓöéProcStatus               ΓöéProcesses the MCI_STATUS command.  Γöé
  3605. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3606. ΓöéProcStop                 ΓöéProcesses the MCI_STOP command.    Γöé
  3607. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3608. ΓöéProcSync                 ΓöéProcesses the MCIDRV_SYNC command. Γöé
  3609. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3610.  
  3611. CDAUDUTL.C File 
  3612.  
  3613. This module contains the hardware independent code that supplement the process 
  3614. commands in CDAUDPRO.C.  It also contains utility functions as well. 
  3615.  
  3616. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3617. ΓöéProcedure                ΓöéDescription                        Γöé
  3618. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3619. ΓöéSetAudio                 ΓöéSets audio information from        Γöé
  3620. Γöé                         ΓöéMCI_SET.                           Γöé
  3621. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3622. ΓöéSetConnector             ΓöéEnables or disables a connection.  Γöé
  3623. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3624. ΓöéSetCuePoint              ΓöéEnables the cue point.             Γöé
  3625. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3626. ΓöéStatusMCD                ΓöéGets status from MCD information.  Γöé
  3627. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3628. ΓöéStatusMCDDef             ΓöéGets status from MCD default       Γöé
  3629. Γöé                         Γöéinformation.                       Γöé
  3630. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3631. ΓöéStatusVSD                ΓöéGets status from VSD information.  Γöé
  3632. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3633. ΓöéDisableEvents            ΓöéDisables cuepoints and position    Γöé
  3634. Γöé                         Γöéadvise.                            Γöé
  3635. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3636. ΓöéGetTimeAddr              ΓöéConverts a time format to/from     Γöé
  3637. Γöé                         ΓöéMMTIME.                            Γöé
  3638. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3639. ΓöéGetTimeAddrRC            ΓöéColinizes return code to time      Γöé
  3640. Γöé                         Γöéformat.                            Γöé
  3641. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3642. ΓöéGetTrackInfo             ΓöéGets the track information for a   Γöé
  3643. Γöé                         Γöéspecified track.                   Γöé
  3644. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3645. ΓöéValAddress               ΓöéValidates addresses to be in range.Γöé
  3646. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3647. ΓöéValState                 ΓöéValidates state of logical device. Γöé
  3648. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3649. ΓöévsdResponse              ΓöéProcesses VSD response.            Γöé
  3650. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3651.  
  3652. CDMCINIT.C File 
  3653.  
  3654. This module initializes the re-entrant DLL. 
  3655.  
  3656. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3657. ΓöéProcedure                ΓöéDescription                        Γöé
  3658. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3659. Γöé_DLL_InitTerm            ΓöéSpecifies the entry point for the  Γöé
  3660. Γöé                         ΓöéOS/2 loader.                       Γöé
  3661. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3662. ΓöéCDMCInitialization       ΓöéObtains initial heap.              Γöé
  3663. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3664. ΓöéCDMC_Exit                ΓöéCleans up instances after          Γöé
  3665. Γöé                         Γöétermination.                       Γöé
  3666. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3667.  
  3668. CDMCCOMN.C 
  3669.  
  3670. This module contains the common functions between the CD MCD and the VSD for 
  3671. the IBM CD-ROM Drive. 
  3672.  
  3673. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3674. ΓöéProcedure                ΓöéDescription                        Γöé
  3675. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3676. Γöéparse_DevParm            ΓöéParses the device-specific         Γöé
  3677. Γöé                         Γöéparameter.                         Γöé
  3678. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3679. Γöéget_token                ΓöéGets next token and null terminatesΓöé
  3680. Γöé                         Γöéit.                                Γöé
  3681. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3682.  
  3683. HHPHEAP.C File 
  3684.  
  3685. This module contains the common heap management functions. 
  3686.  
  3687. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3688. ΓöéProcedure                ΓöéDescription                        Γöé
  3689. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3690. ΓöéHhpCreateHeap            ΓöéCreates the first heap.            Γöé
  3691. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3692. ΓöéNewHeap                  ΓöéCreates a new heap (one segment).  Γöé
  3693. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3694. ΓöéHhpAllocMem              ΓöéAllocates some memory.             Γöé
  3695. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3696. ΓöéLocateFreeMem            ΓöéLocates a free block of memory.    Γöé
  3697. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3698. ΓöéHhpFreeMem               ΓöéFrees memory.                      Γöé
  3699. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3700. ΓöéCollapseFreeBlock        ΓöéRemoves fragmentation within a     Γöé
  3701. Γöé                         Γöéheap.                              Γöé
  3702. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3703. ΓöéCollapseFreeHeap         ΓöéRemoves fragmentation within heaps.Γöé
  3704. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3705. ΓöéHhpDestroyHeap           ΓöéDestroys a heap.                   Γöé
  3706. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3707. ΓöéHhpAllocBuffer           ΓöéAllocates a buffer from the system.Γöé
  3708. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3709. ΓöéHhpFreeBuffer            ΓöéFrees the allocated buffer.        Γöé
  3710. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3711. ΓöéHhpAccessBuffer          ΓöéSets up segment for access.        Γöé
  3712. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3713. ΓöéHhpAccessHeap            ΓöéAccesses a shared heap.            Γöé
  3714. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3715. ΓöéHhpReleaseHeap           ΓöéReleases a heap.                   Γöé
  3716. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3717. ΓöéAddPid                   ΓöéAdds a process ID to the PID list. Γöé
  3718. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3719. ΓöéReallocHeap              ΓöéReallocates a heap.                Γöé
  3720. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3721. ΓöéHhpGetPID                ΓöéGets the PID for the heap.         Γöé
  3722. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3723. ΓöéHhpDumpHeap              ΓöéDumps heap contents to standard    Γöé
  3724. Γöé                         Γöéout.                               Γöé
  3725. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3726.  
  3727.  
  3728. ΓòÉΓòÉΓòÉ 4.8.4. Vendor-Specific Driver for CD-ROM Drives (IBMCDRT.DLL) ΓòÉΓòÉΓòÉ
  3729.  
  3730. Following describes the files and routines included in the IBMCDRT.DLL. 
  3731.  
  3732.  
  3733. CDMCINIT.C File 
  3734.  
  3735. See table in previous section. 
  3736. CDMCCOMN.C File 
  3737.  
  3738. See table in previous section. 
  3739. HHPHEAP.C File 
  3740.  
  3741. See table in previous section. 
  3742. IBMCDROM.C 
  3743.  
  3744. This module includes the entry point for the DLL.  It contains the device 
  3745. dependent code for a specific CD-ROM drive. 
  3746.  
  3747. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3748. ΓöéProcedure                ΓöéDescription                        Γöé
  3749. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3750. ΓöévsdDriverEntry           ΓöéSpecifies the entry point to the   Γöé
  3751. Γöé                         ΓöéVSD from the MCD.                  Γöé
  3752. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3753. Γöéprocess_msg              ΓöéProcesses the requested command    Γöé
  3754. Γöé                         Γöémessage.                           Γöé
  3755. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3756. ΓöéCDAudClose               ΓöéError recovery routine.            Γöé
  3757. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3758. ΓöéCDAudErrRecov            ΓöéCloses an instance.                Γöé
  3759. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3760. ΓöéCDAudInfo                ΓöéReturns information about the      Γöé
  3761. Γöé                         Γöécomponent.                         Γöé
  3762. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3763. ΓöéCDAudOpen                ΓöéOpens an instance.                 Γöé
  3764. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3765. ΓöéCDAudRegDisc             ΓöéRegisters a disc for the logical   Γöé
  3766. Γöé                         Γöédevice.                            Γöé
  3767. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3768. ΓöéCDAudRegDrive            ΓöéRegisters a drive for the calling  Γöé
  3769. Γöé                         ΓöéMCD.                               Γöé
  3770. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3771. ΓöéCDAudSet                 ΓöéSets various attributes of the     Γöé
  3772. Γöé                         Γöédevice.                            Γöé
  3773. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3774. ΓöéCDAudSetVerify           ΓöéTests flags for the SET command.   Γöé
  3775. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3776. ΓöéCDAudStatus              ΓöéReturns the requested attribute.   Γöé
  3777. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3778. ΓöéCDAudStatCVol            ΓöéReturns mapped component volume    Γöé
  3779. Γöé                         Γöélevels.                            Γöé
  3780. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3781.  
  3782. IBMCDPRO.C File 
  3783.  
  3784. This module processes hardware requests. 
  3785.  
  3786. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3787. ΓöéProcedure                ΓöéDescription                        Γöé
  3788. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3789. ΓöéCD01_Cue                 ΓöéPrerolls a drive.                  Γöé
  3790. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3791. ΓöéCD01_CuePoint            ΓöéSets up a cue point.               Γöé
  3792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3793. ΓöéCD01_GetCaps             ΓöéGets device capabilities.          Γöé
  3794. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3795. ΓöéCD01_GetDiscInfo         ΓöéGets status information of the     Γöé
  3796. Γöé                         Γöédisc.                              Γöé
  3797. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3798. ΓöéCD01_GetID               ΓöéGets the CD ID from the disc.      Γöé
  3799. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3800. ΓöéCD01_GetPosition         ΓöéGets the position of the head.     Γöé
  3801. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3802. ΓöéCD01_GetState            ΓöéGets the state of the device.      Γöé
  3803. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3804. ΓöéCD01_GetTOC              ΓöéReturns the table of contents      Γöé
  3805. Γöé                         Γöé(MMTOC form).                      Γöé
  3806. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3807. ΓöéCD01_GetVolume           ΓöéGets the volume settings of the    Γöé
  3808. Γöé                         Γöédrive.                             Γöé
  3809. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3810. ΓöéCD01_LockDoor            ΓöéLocks or unlocks the drive door.   Γöé
  3811. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3812. ΓöéCD01_Open                ΓöéOpens the specified device or      Γöé
  3813. Γöé                         Γöédrive.                             Γöé
  3814. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3815. ΓöéCD01_Play                ΓöéInitiates a play operation.        Γöé
  3816. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3817. ΓöéCD01_PlayCont            ΓöéContinues a play operation.        Γöé
  3818. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3819. ΓöéCD01_PosAdvise           ΓöéSets up a position advise command. Γöé
  3820. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3821. ΓöéCD01_RegTracks           ΓöéRegisters tracks on the disc.      Γöé
  3822. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3823. ΓöéCD01_Restore             ΓöéRestores the saved instance.       Γöé
  3824. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3825. ΓöéCD01_Resume              ΓöéUnpauses a CD play operation.      Γöé
  3826. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3827. ΓöéCD01_Save                ΓöéSaves the current instance.        Γöé
  3828. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3829. ΓöéCD01_Seek                ΓöéSeeks to a particular redbook      Γöé
  3830. Γöé                         Γöéaddress.                           Γöé
  3831. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3832. ΓöéCD01_SetVolume           ΓöéSets the volume of the drive.      Γöé
  3833. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3834. ΓöéCD01_Stop                ΓöéStops a CD play operation.         Γöé
  3835. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3836.  
  3837. IBMCDMSC.C File 
  3838.  
  3839. This module processes miscellaneous functions such as the timer routine for the 
  3840. play command, identify the drive, and package the IOCtl calls. 
  3841.  
  3842. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3843. ΓöéProcedure                ΓöéDescription                        Γöé
  3844. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3845. ΓöéCD01_StartPlay           ΓöéStarts the play operation.         Γöé
  3846. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3847. ΓöéCD01_Sync                ΓöéSync to MDM request.               Γöé
  3848. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3849. ΓöéCD01_Timer               ΓöéTimer routine for play operation.  Γöé
  3850. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3851. ΓöéCD01_Timernotify         ΓöéTimer routine to setup/notify      Γöé
  3852. Γöé                         Γöéevents.                            Γöé
  3853. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3854. ΓöéGetTableName             ΓöéGets the CD table full path name.  Γöé
  3855. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3856. ΓöéOpenFirstTime            ΓöéFirst time device open tests.      Γöé
  3857. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3858. ΓöéQueryTable               ΓöéQueries the CD look-up table.      Γöé
  3859. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3860. ΓöéCallIOCtl                ΓöéCalls the hardware by way of       Γöé
  3861. Γöé                         ΓöéIOCtls.                            Γöé
  3862. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3863.  
  3864.  
  3865. ΓòÉΓòÉΓòÉ 4.9. Resource Units and Classes ΓòÉΓòÉΓòÉ
  3866.  
  3867. Device contexts are managed by the MDM, using an abstract concept of resource 
  3868. units, resource classes and valid class combinations. 
  3869.  
  3870. Resource units provide a measurement for the resource manager to determine how 
  3871. many device contexts may be active at any given time. Each device specifies how 
  3872. many resource units it can process concurrently. 
  3873.  
  3874. Besides a total resource number, each resource class has a maximum number of 
  3875. resource units available to it.  This allows the MDM to determine how many 
  3876. device contexts from a particular class can be active concurrently. During the 
  3877. install procedure the maximum numbers are provided. 
  3878.  
  3879. On the MCI_OPEN of a device context the required resource units and class for 
  3880. the device context is returned in the MMDRV_OPEN_PARMS structure.  The required 
  3881. resource units and resource class of a device context can be changed by the MCD 
  3882. by calling the MDM with the MCIDRV_CHANGERESOURCE message.  For example, if a 
  3883. waveaudio device allocated 1 resource unit for a mono wave and two units for a 
  3884. stereo wave, then a load command might change the required units for that 
  3885. device context. 
  3886.  
  3887. The final piece of resource management is provided during install. This is the 
  3888. valid class combinations. A certain device might have multiple classes, but not 
  3889. allow certain classes to have active device contexts concurrently. The 
  3890. following example is the Pro AudioSpectrum 16 card. It has at most two resource 
  3891. units available. It uses 2 classes, one for waveform audio and the other for 
  3892. MIDI. Each class can have at most one resource unit consumed by a active device 
  3893. context. It can have any number of in-active device contexts. Finally both 
  3894. classes can have active device contexts concurrently. This says that this card 
  3895. can support one waveform audio and or one MIDI. 
  3896.  
  3897.  
  3898. ΓòÉΓòÉΓòÉ 4.10. Inserting Pages in the Multimedia Setup Notebook ΓòÉΓòÉΓòÉ
  3899.  
  3900. This section explains how to insert settings pages in the Multimedia Setup 
  3901. notebook-a program which provides a user interface to the properties of 
  3902. multimedia devices that are registered with the Media Device Manager (MDM). 
  3903.  
  3904. There are two approaches to insert settings pages in the Multimedia Setup 
  3905. notebook.  The following discussion focuses on the first approach, which 
  3906. illustrates how to use the MCI_DEVICESETTINGS message to insert a page for a 
  3907. particular MCD.  The second approach is discussed in Defining Changes to Other 
  3908. INI Files in Installation Requirements.  This approach addresses a registration 
  3909. mechanism for Multimedia Setup to insert settings pages based on device type 
  3910. (not MCD).  For example, pages that apply to the system or to all media control 
  3911. interface devices of a particular class. 
  3912.  
  3913. Note: 
  3914.  
  3915. The MMSYSTEM.H header file defines data structures used in inserting a page in 
  3916. the Multimedia Setup notebook for a device object. 
  3917.  
  3918. Refer to the OS/2 PM Reference for additional information on notebook control 
  3919. window processing. 
  3920.  
  3921.  You can insert a notebook page in the Multimedia Setup program if 
  3922.  device-specific properties exist for a particular device.  When the Multimedia 
  3923.  Setup program is creating a notebook window, it checks the 
  3924.  MCI_SYSINFO_DEVICESETTINGS style bit in the ulDeviceFlag field of the 
  3925.  MCI_SYSINFO_LOGDEVICE data structure.  This data structure (as shown in the 
  3926.  following example contains information about a logical device that is 
  3927.  installed in the system.  The MCI_SYSINFO_DEVICESETTINGS style bit indicates 
  3928.  that the MCD has custom device settings pages. 
  3929.  
  3930.   typedef struct _MCI_SYSINFO_LOGDEVICE {
  3931.     CHAR    szInstallName[MAX_DEVICE_NAME];      /* Device install name            */
  3932.     USHORT  usDeviceType;                        /* Device type number             */
  3933.     ULONG   ulDeviceFlag;                        /* Flag indicating whether device */
  3934.                                                  /*  device is controllable or not */
  3935.     CHAR    szVersionNumber[MAX_VERSION_NUMBER]; /* INI file version number        */
  3936.     CHAR    szProductInfo[MAX_PRODINFO];         /* Textual product description    */
  3937.     CHAR    szMCDDriver[MAX_DEVICE_NAME];        /* MCI driver DLL name            */
  3938.     CHAR    szVSDDriver[MAX_DEVICE_NAME];        /* VSD DLL name                   */
  3939.     CHAR    szPDDName[MAX_PDD_NAME];             /* Device PDD name                */
  3940.     CHAR    szMCDTable[MAX_DEVICE_NAME];         /* Device-type command table      */
  3941.     CHAR    szVSDTable[MAX_DEVICE_NAME];         /* Device-specific command table  */
  3942.     USHORT  usShareType;                         /* Device sharing mode            */
  3943.     CHAR    szResourceName[MAX_DEVICE_NAME];     /* Resource name                  */
  3944.     USHORT  usResourceUnits;                     /* Total resource units available */
  3945.                                                  /*  for this device               */
  3946.     USHORT  usResourceClasses;                   /* Number of resource classes for */
  3947.                                                  /*  this device                   */
  3948.     USHORT  ausClassArray[MAX_CLASSES];          /* Maximum number of resource     */
  3949.                                                  /*  units for each class          */
  3950.     USHORT
  3951.   ausValidClassArray[MAX_CLASSES][MAX_CLASSES];/* Valid class combination */
  3952.   } MCI_SYSINFO_LOGDEVICE;
  3953.  
  3954.  If an MCD creates one or more custom settings pages, the Multimedia Setup 
  3955.  program sends a MCI_DEVICESETTINGS message to the MCD.  This allows the MCD 
  3956.  the opportunity to insert device-specific pages in the Multimedia Setup 
  3957.  notebook for a particular device.  The MCD then passes this message to a 
  3958.  Vendor-Specific Driver (VSD) if one exists.  Some device properties might be 
  3959.  related to the type of device and some might be related to the particular 
  3960.  manufacturer's hardware. 
  3961.  
  3962.  The MCI_DEVICESETTINGS_PARMS data structure (as shown in the following 
  3963.  example) defines the information that is passed to the MCD in the 
  3964.  MCI_DEVICESETTINGS message.  The hwndNotebook field contains the window handle 
  3965.  of a CUA notebook control window where the page should be inserted.  The 
  3966.  usDeviceType field defines the type of media device, and the pszDeviceName 
  3967.  field defines the logical device name (WAVEAUDIO01) of the device for which 
  3968.  custom settings are to be inserted. 
  3969.  
  3970.   typedef struct_MCI_DEVICESETTINGS_PARMS {
  3971.   ULONG     hwndCallback;              /* Window handle              */
  3972.   HWND      hwndNotebook;              /* Handle to notebook window  */
  3973.   USHORT    usDeviceType;              /* Device type                */
  3974.   PSZ       pszDeviceName;             /* Device name                */
  3975.    } MCI_DEVICESETTINGS_PARMS;
  3976.  
  3977.  You should also provide help for each page inserted in the notebook.  The 
  3978.  recommended way of implementing help for a Multimedia Setup settings page is 
  3979.  to handle the WM_HELP message explicitly in the dialog procedure and then send 
  3980.  the HM_DISPLAY_HELP message to a help instance that is created by the page (or 
  3981.  group of pages). 
  3982.  
  3983.  When help for a tab is requested the Multimedia Setup program sends a 
  3984.  MM_TABHELP message to the page as shown in the following example. The page 
  3985.  window procedure can then display the appropriate help panel. 
  3986.  
  3987.   MM_TABHELP
  3988.      mp1          ULONG ulPageID       /* Page identifier            */
  3989.      mp2          ULONG Reserved
  3990.      return       TRUE for handled and FALSE not handled
  3991.  
  3992.  Some pages use the device-specific parameters of the MCD to save settings 
  3993.  information.  New pages should expect that other pages are also using the 
  3994.  device-specific parameters to save their settings and therefore other keywords 
  3995.  may exist or exist in the future.  New pages should be implemented in such as 
  3996.  way as to preserve keyword values that they do not recognize. 
  3997.  
  3998.  The following example provides source code to create a modeless secondary 
  3999.  window and insert a page in a notebook.  This code can be provided as a part 
  4000.  of an external DLL or part of the MCD code itself.  The page should be 
  4001.  consistent with the existing notebook design and be inserted after the 
  4002.  standard pages in the notebook. 
  4003.  
  4004.   HWND InsertExamplePage( LPMCI_DEVICESETTINGS_PARMS pMCIDevSettings)
  4005.   {
  4006.     HWND  hwndPage;               /* Page window handle                     */
  4007.     CHAR  szTabText[CCHMAXPATH];  /* Buffer for tab string                  */
  4008.     ULONG ulPageId;               /* Page Identifier                        */
  4009.  
  4010.     /************************************************************************/
  4011.     /*  Load a modeless secondary window.                                   */
  4012.     /************************************************************************/
  4013.  
  4014.     hwndPage    = WinLoadSecondaryWindow(
  4015.                          pMCIDevSettings->hwndNotebook,
  4016.                          pMCIDevSettings->hwndNotebook,
  4017.                          ExamplePageDlgProc,
  4018.                          vhmodMRI,
  4019.                          ID_EXAMPLE,
  4020.                          (PVOID)pMCIDevSettings);
  4021.  
  4022.     if (!hwndPage) return (NULL);
  4023.  
  4024.     ulPageId = (ULONG)WinSendMsg( pMCIDevSettings->hwndNotebook,
  4025.                          BKM_INSERTPAGE,
  4026.                          (ULONG)NULL,
  4027.                          MPFROM2SHORT( BKA_AUTOPAGESIZE | BKA_MINOR, BKA_LAST ) );
  4028.  
  4029.     /************************************************************************/
  4030.     /*  Associate a secondary window with a notebook page.                  */
  4031.     /************************************************************************/
  4032.  
  4033.     WinSendMsg(pMCIDevSettings->hwndNotebook, BKM_SETPAGEWINDOWHWND,
  4034.               MPFROMP( ulPageId ), MPFROMLONG( hwndPage ) );
  4035.  
  4036.     /************************************************************************/
  4037.     /* Get tab text from DLL.                                               */
  4038.     /************************************************************************/
  4039.  
  4040.     WinLoadString(WinQueryAnchorBlock( HWND_DESKTOP ), vhmodMRI,
  4041.            (USHORT)IDB_EXAMPLE, CCHMAXPATH, szTabText );
  4042.  
  4043.     /************************************************************************/
  4044.     /* Set tab text.                                                        */
  4045.     /************************************************************************/
  4046.  
  4047.     WinSendMsg( pMCIDevSettings->hwndNotebook, BKM_SETTABTEXT,
  4048.           MPFROMP( ulPageId ), szTabText );
  4049.  
  4050.     return( hwndPage );
  4051.  
  4052.   }
  4053.  
  4054.    typedef struct {
  4055.       HWND hwndHelpInstance;
  4056.    } MMPAGEINFO;
  4057.    typedef MMPAGEINFO * PMMPAGEINFO;
  4058.  
  4059.     /************************************************************************/
  4060.     /* Modeless secondary window procedure                                  */
  4061.     /************************************************************************/
  4062.  
  4063.    MRESULT EXPENTRY ExamplePageDlgProc (HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2)
  4064.  
  4065.       PMMPAGEINFO pMMPageInfo = (PMMPAGEINFO) WinQueryWindowPtr (hwnd, QWL_USER);
  4066.  
  4067.       switch (msg) {
  4068.          case WM_INITDLG:
  4069.             /*******************************************************************/
  4070.             /*  Place window initialization code here.                         */
  4071.             /*******************************************************************/
  4072.             pMMPageInfo = (PMMPAGEINFO) malloc(sizeof(MMPAGEINFO));
  4073.             WinSetWindowPtr (hwnd, QWL_USER, pMMPageInfo);
  4074.  
  4075.             /*******************************************************************/
  4076.             /*  Create a help instance.                                        */
  4077.             /*******************************************************************/
  4078.             pMMPageInfo->hwndHelpInstance = WinCreateHelpInstance(...);
  4079.             break;
  4080.  
  4081.          case WM_DESTROY:
  4082.             /*******************************************************************/
  4083.             /*  Clean up page window resources.                                */
  4084.             /*******************************************************************/
  4085.             WinDestroyHelpInstance (pMMPageInfo->hwndHelpInstance);
  4086.             free (pMMPageInfo);
  4087.             break;
  4088.          case WM_COMMAND:
  4089.             /*******************************************************************/
  4090.             /*  Process all commands.                                          */
  4091.             /*******************************************************************/
  4092.             return ((MRESULT) FALSE);
  4093.             break;
  4094.  
  4095.          case MM_TABHELP:
  4096.             /*******************************************************************/
  4097.             /*  Display help for a tab.                                        */
  4098.             /*******************************************************************/
  4099.             if (pMMPageInfo->hwndHelpInstance) {
  4100.                 WinSendMsg(
  4101.                       pMMPageInfo->hwndHelpInstance,
  4102.                       HM_DISPLAY_HELP,
  4103.                       MPFROMSHORT( WinQueryWindowUShort( hwnd, QWS_ID ) ),
  4104.                       HM_RESOURCEID );
  4105.             }
  4106.             break;
  4107.  
  4108.          case WM_CLOSE:
  4109.             return ((MRESULT) FALSE);
  4110.             break;
  4111.  
  4112.          case WM_HELP:
  4113.             if (pMMPageInfo->hwndHelpInstance) {
  4114.                 WinSendMsg(
  4115.                       pMMPageInfo->hwndHelpInstance,
  4116.                       HM_DISPLAY_HELP,
  4117.                       (MPARAM) mp1,
  4118.                       HM_RESOURCEID );
  4119.              }
  4120.              return ((MRESULT)TRUE);
  4121.              break;
  4122.  
  4123.          case WM_TRANSLATEACCEL:
  4124.             return (WinDefWindowProc (hwnd, msg, mp1, mp2));
  4125.             break;
  4126.  
  4127.        case HM_QUERY_KEYS_HELP:
  4128.             return((MRESULT) IDH_HELPFORKEYS);
  4129.             break;
  4130.  
  4131.       }
  4132.  
  4133.       return (WinDefSecondaryWindowProc(hwnd, msg, mp1, mp2)); }
  4134.  
  4135.  
  4136. ΓòÉΓòÉΓòÉ 5. Stream Handlers ΓòÉΓòÉΓòÉ
  4137.  
  4138. This section describes the Stream Programming Interface (SPI) services used by 
  4139. MCDs to implement data streaming and synchronization, as well as the interfaces 
  4140. used by stream handlers to transport data. 
  4141.  
  4142.  
  4143. ΓòÉΓòÉΓòÉ 5.1. Stream Handler Architecture ΓòÉΓòÉΓòÉ
  4144.  
  4145. Pairs of stream handlers implement the transport of data from a source to a 
  4146. target device while the Synchronization and Streaming Manager (SSM) provides 
  4147. coordination and central management of data buffers and synchronization data. 
  4148.  
  4149. A stream handler can be built as a device driver run at Ring 0, or as a 
  4150. dynamic-link library (DLL) run at Ring 3. See DLL Model: File System Stream 
  4151. Handler and Device Driver Model: Video PDD for examples of these stream handler 
  4152. types. 
  4153.  
  4154. Some streams are ideally controlled by a direct connection between the stream 
  4155. handler and a physical device driver, whereas other streams are not associated 
  4156. with a data source or target that maps physically to a specific device.  For 
  4157. example, the File System Stream Handler is a DLL because all file system I/O 
  4158. functions are available as Ring 3 OS/2 functions that service all file system 
  4159. devices. 
  4160.  
  4161. After you determine the type of stream handler you require (DLL or DD), you 
  4162. must incorporate the required functional modules in your stream handler design. 
  4163. Refer to the following figure, which represents the key modules in both DLL and 
  4164. device driver stream handler components. 
  4165.  
  4166. Although the detailed coding practices of building OS/2 DLLs and device drivers 
  4167. differ considerably, most logic for a stream handler is not affected by this 
  4168. choice. The structure of the DLL stream handler closely resembles the device 
  4169. driver stream handler, with few exceptions. 
  4170.  
  4171. The following figure illustrates the logical structure of the Sync/Stream 
  4172. Manager (SSM) and its relationship with stream handlers. The Sync/Stream 
  4173. Manager DLL exports SPI services to higher-level OS/2 multimedia components 
  4174. (such as media drivers) and exports Stream Manager Helper (SMH) messages to 
  4175. support the stream handler DLLs. Additional SMH messages are exported by the 
  4176. Sync/Stream Manager device driver to stream handler device drivers using 
  4177. standard OS/2 inter-device driver communication (IDC) interfaces (established 
  4178. using DevHelp_AttachDD). 
  4179.  
  4180. The following table illustrates the stream handlers are provided by OS/2 
  4181. multimedia. 
  4182.  
  4183. Note:  See Stream Handler Module Definitions for information describing the 
  4184.        high-level design and operation of the stream handlers provided with 
  4185.        OS/2 multimedia. 
  4186.  
  4187.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4188.   ΓöéStream Handler ΓöéDescription                             Γöé
  4189.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4190.   ΓöéAudio          ΓöéVSD interface to a vendor-specific      Γöé
  4191.   Γöé               Γöédriver. Supports PCM, MIDI, ADPCM       Γöé
  4192.   Γöé               Γöéformats.                                Γöé
  4193.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4194.   ΓöéMIDI Mapper    ΓöéFilters data using the selected MIDI    Γöé
  4195.   Γöé               Γöémap.                                    Γöé
  4196.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4197.   ΓöéFile system    ΓöéUses file system services to read or    Γöé
  4198.   Γöé               Γöéwrite data from any associated device.  Γöé
  4199.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4200.   ΓöéMulti-track    ΓöéReads and splits interleaved data.      Γöé
  4201.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4202.   ΓöéVideo          ΓöéIn conjunction with CODECs, outputs     Γöé
  4203.   Γöé               Γöévideo data to the display.              Γöé
  4204.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4205.   ΓöéSystem Memory  ΓöéTransfers data to and from system memoryΓöé
  4206.   Γöé               Γöébuffers. See Cuepoint Event Support.    Γöé
  4207.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4208.   ΓöéCD-ROM XA      ΓöéReads CD-ROM XA data and splits audio   Γöé
  4209.   Γöé               Γöésectors from video and data sectors. SeeΓöé
  4210.   Γöé               ΓöéCD-ROM XA Stream Handler.               Γöé
  4211.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4212.   ΓöéCD-DA          ΓöéReads digital audio data directly from  Γöé
  4213.   Γöé               Γöéthe CD-ROM driver. Can be used to play  Γöé
  4214.   Γöé               Γöéback CD audio data using an audio       Γöé
  4215.   Γöé               Γöéadapter.                                Γöé
  4216.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4217.  
  4218.  
  4219. ΓòÉΓòÉΓòÉ 5.2. Synchronization Features ΓòÉΓòÉΓòÉ
  4220.  
  4221. The ability to synchronize events is essential for multimedia applications. For 
  4222. example, you might decide to display a certain bitmap (an image of fireworks 
  4223. bursting) at precisely the same time you play an audio waveform (a specific 
  4224. cymbal crash during the "Star Spangled Banner"). From a standard OS/2 
  4225. application perspective, two independent threads or a single thread might 
  4226. control these events. However, there is no way for either of these approaches 
  4227. to guarantee that both events will occur within a specified time span. The 
  4228. longer the time delay between events, the more likely a user will notice the 
  4229. loss of synchronization. 
  4230.  
  4231. The sync/stream subsystem design supports multimedia application 
  4232. synchronization requirements by ensuring that program events such as the output 
  4233. of specific data elements (digital audio, image, MIDI audio, and so on) can be 
  4234. reliably synchronized within very narrow real-time limits. The sync/stream 
  4235. subsystem also reduces the complexity of application code required to 
  4236. synchronize events. 
  4237.  
  4238. Being able to synchronize user-oriented and system-driven events is also 
  4239. important to multimedia application developers. For example, an application 
  4240. might need to adjust the tempo of a musical playback sequence while responding 
  4241. to the user's movement of the mouse or pressing arrow keys ( ) on the 
  4242. keyboard. Any perceivable delay in response might be unacceptable. Of more 
  4243. urgent importance is a pilot training program that requires the trainee to 
  4244. press a key to respond to a ground-proximity alarm. If the trainee senses a 
  4245. delay between pressing the key and the alarm sound muting, it would be 
  4246. reasonable to expect the real cockpit controls to react the same way. This 
  4247. false expectation might lead to a crash in real life. 
  4248.  
  4249. SSM synchronization functions simplify a programmer's work. For example, 
  4250. instead of establishing large and complex control structures to synchronize a 
  4251. group of streams, a programmer needs only to identify the streams as part of a 
  4252. group. 
  4253.  
  4254. The sync/stream subsystem design includes several features that provide for 
  4255. simple, effective control of real-time event synchronization: 
  4256.  
  4257.      Master/slave relationship 
  4258.      Sync pulse generation 
  4259.      Sync pulse processing 
  4260.      Sync/stream subsystem events 
  4261.      Null stream handler 
  4262.  
  4263.  These features exploit the multitasking capability of OS/2 to prevent specific 
  4264.  regions of code and data in physical memory from being paged to disk. This 
  4265.  ensures that the required modules can process data and requests in a real-time 
  4266.  manner, avoiding the latency that would arise should those critical regions be 
  4267.  swapped out when needed. 
  4268.  
  4269.  
  4270. ΓòÉΓòÉΓòÉ 5.2.1. Master/Slave Relationship ΓòÉΓòÉΓòÉ
  4271.  
  4272. A master/slave relationship is a specification of a chain of command for 
  4273. controlling a synchronized event. The relationship is 1:N, where one object 
  4274. (the synchronization master) controls the behavior of one or more subordinate 
  4275. objects (the slaves). The relationship is established using the SpiEnableSync 
  4276. function, where one data stream is designated the master and one or more data 
  4277. streams are designated as slaves. Real-time information, transmitted from the 
  4278. master to all slaves by the Sync/Stream Manager, gives each of the slaves the 
  4279. current time in the time base of the MMTIME standard (1/3 msec units). This 
  4280. time information (sync pulse) allows each slave stream handler to adjust the 
  4281. activity of that stream so that synchronization can be maintained. 
  4282.  
  4283. Certain rules govern master/slave synchronization relationships: 
  4284.  
  4285.      A data stream can be a slave in only one synchronization relationship. 
  4286.  
  4287.      Stream handlers must be able to enslave multiple data streams (if 
  4288.       multiple data streams are supported) according to different sync masters. 
  4289.       For example, each active stream under that handler's control might have a 
  4290.       different master. 
  4291.  
  4292.      A stream cannot become the master of two separate groups of slaves (any 
  4293.       additional streams become slaves in the existing master/slave group). 
  4294.  
  4295.      The sync group (master and all slaves) can be started, stopped, and 
  4296.       seeked as a group by using the "slaves" flag on each of the following SPI 
  4297.       functions: 
  4298.  
  4299.         -  SpiStartStream 
  4300.         -  SpiStopStream 
  4301.         -  SpiSeekStream 
  4302.  
  4303.      Any slave in a sync relationship may be arbitrarily started or stopped 
  4304.       without affecting the activity of the master or any other slave. The 
  4305.       master can be stopped independently of any slave streams in the same sync 
  4306.       group and the option is available for all of the slave to be stopped at 
  4307.       the same time that the master stream is stopped. 
  4308.  
  4309.      Group synchronized stream time will always be the master stream time. 
  4310.       This includes slave streams that have been stopped and re-started. 
  4311.  
  4312.      Stream seeking is done on a per stream basis. For example, a seek in a 
  4313.       master stream does not seek in any slave streams that may be in the same 
  4314.       sync group. 
  4315.  
  4316.  It is possible for a slave to fail to maintain synchronization. This 
  4317.  condition, called sync overrun, happens when a stream handler has not 
  4318.  processed the last sync pulse received from the Sync/Stream Manager and 
  4319.  another sync pulse is received. The application can optionally request (by way 
  4320.  of the SpiEnableEvent function) to be notified of any sync overruns. The 
  4321.  stream is not stopped but the application could request a stop once it 
  4322.  receives a sync overrun event. 
  4323.  
  4324.  
  4325. ΓòÉΓòÉΓòÉ 5.2.2. Sync Pulse Generation ΓòÉΓòÉΓòÉ
  4326.  
  4327. A sync pulse represents the current stream sync master clock value and its 
  4328. stream handle (HSTREAM). The clock value is expressed in MMTIME units (1/3 
  4329. milliseconds) where 0 represents the time the master stream was started from 
  4330. the beginning of its associated multimedia data object. If a seek operation is 
  4331. performed on the master, the stream must be stopped. The master stream time 
  4332. also stops when a seek takes place and is reset to the stream time of the seek 
  4333. point. When the stream is restarted, the stream time is restarted from the seek 
  4334. point. This means that stream time can be equated to position in the data as 
  4335. opposed to the amount of time the stream has been active. 
  4336.  
  4337. Sync pulses are generated on a regular basis by the master. A slave receives 
  4338. sync pulses only when the Sync/Stream Manager determines that it is out of sync 
  4339. with the master. Sync pulses are distributed by the stream manager based on the 
  4340. programmed stream sync relationship. This distribution is effective for both 
  4341. DLL and device driver slave stream handlers. 
  4342.  
  4343. Each slave stream handler must regularly update the sync pulse SYNC_EVCB with 
  4344. what it believes the stream time is. The Sync/Stream Manager checks this slave 
  4345. handler stream time against the master stream time and decides whether to send 
  4346. a sync pulse to this handler. 
  4347.  
  4348. Device driver stream handlers receive sync pulses through their sync pulse 
  4349. event control block (SYNC_EVCB). A device driver stream handler must check for 
  4350. sync pulses from the Sync/Stream Manager by polling a flag in the sync pulse 
  4351. SYNC_EVCB. The Sync/Stream Manager sets the flag to indicate a sync pulse and 
  4352. updates the current master stream time. Usually, the device driver slave 
  4353. handler polls the flag once during interrupt processing and adjusts the stream 
  4354. consumption accordingly. 
  4355.  
  4356. DLL stream handlers receive sync pulses in one of two ways. A DLL stream 
  4357. handler can register a semaphore with the Sync/Stream Manager, or it can use 
  4358. the same method the SSM uses for a device driver stream handler. 
  4359.  
  4360.  
  4361. ΓòÉΓòÉΓòÉ 5.2.3. Sync Pulse Processing ΓòÉΓòÉΓòÉ
  4362.  
  4363. Each stream handler (DLL or device driver) can provide sync pulse handling to 
  4364. support synchronization for any streams activated. Typically, the stream 
  4365. handler sync pulse handling logic is capable of correcting the active stream's 
  4366. progress in its real-time context, based on information received in sync pulse 
  4367. SYNC_EVCB created by the stream handler and accessed by the Sync/Stream 
  4368. Manager. 
  4369.  
  4370. For example, if the slave's current local time is 45000 (15.0 seconds in 
  4371. MMTIME), and the master sync pulse time is 44500 (14.83 sec), then the slave 
  4372. stream handler's sync pulse logic should adjust the pace of data streaming 
  4373. (slow down, or repeat the last 170 milliseconds worth of data). This 
  4374. time-adjusting (resync) logic is unique to the type of data the handler is 
  4375. streaming. 
  4376.  
  4377. Since there can be occurrences of heavy system load that make it impossible for 
  4378. DLL sync pulse logic to get control between two sync pulses (task dispatch 
  4379. latency can rise occasionally to delay even time-critical threads), the handler 
  4380. always takes the most current master time (last sync pulse posted). The SSM 
  4381. sets a sync pulse overrun flag if a sync pulse is not processed before the next 
  4382. sync pulse arrives. Also, the sync pulse logic and all associated control data 
  4383. objects must reside in fixed memory, so that these code and data pages are 
  4384. never paged out (at least not while the stream is active). 
  4385.  
  4386. The sync pulse logic must be high performance by nature. Complex, 
  4387. time-consuming synchronization adjusting routines with very long path lengths 
  4388. will not be able to maintain synchronization if they are dispatched 
  4389. continuously. The sync pulse logic is a second level interrupt handler, so its 
  4390. performance must be optimized. If no adjustment of the stream is necessary, the 
  4391. routine might not need to be dispatched at all, which brings us to one final 
  4392. point. 
  4393.  
  4394. The Sync/Stream Manager has sync pulse distribution logic that controls when it 
  4395. will set the slave device driver handler's sync pulse SYNCPOLLING bit flag (the 
  4396. SSM does not call the handler's IDC interface). This logic similarly controls 
  4397. when it will dispatch the DLL handler's time-critical thread (clear a semaphore 
  4398. the thread is waiting on). Typically, the DLL handler detects that a sync pulse 
  4399. has occurred by polling the SYNCPOLLING bit flag in its sync pulse SYNC_EVCB 
  4400. that it gave to the Sync/Stream Manager on return from an SHC_ENABLE_SYNC 
  4401. message. This SYNCPOLLING bit flag is set only when the difference between the 
  4402. master stream time and the slave's local time (both stored in the sync pulse 
  4403. SYNC_EVCB) exceeds a specified resync tolerance value. The Sync/Stream Manager 
  4404. determines this difference for all slaves on each sync pulse received from the 
  4405. master, and only notifies the slaves whose stream has deviated too much from 
  4406. the master stream time. Each stream handler that can receive sync pulses must 
  4407. provide its tolerance value (a minimum time difference expressed in MMTIME) in 
  4408. the stream's SPCB passed on return from the SHC_CREATE. 
  4409.  
  4410.  
  4411. ΓòÉΓòÉΓòÉ 5.2.4. Sync/Stream Subsystem Events ΓòÉΓòÉΓòÉ
  4412.  
  4413. Sync/stream subsystem events identify a specific change of state for either a 
  4414. master or slave stream handler. Some of these events do not have any effect on 
  4415. synchronization and merely indicate status of the data stream. 
  4416.  
  4417. Two classes of events are defined: implicit and explicit. Implicit events are 
  4418. those events which all stream handlers must always support (such as end of 
  4419. stream or preroll complete). Explicit events are events which are supported 
  4420. only by some handlers (such as a custom event unique to a particular type of 
  4421. data). The application automatically receives notification of implicit events; 
  4422. however, the application must enable explicit events by using the 
  4423. SpiEnableEvent function if it wants to receive notification of any other 
  4424. events. Events remain enabled until they are disabled. The SSM and stream 
  4425. handlers are the only components that generate events. 
  4426.  
  4427. The following table lists the events that are currently defined for the 
  4428. sync/stream subsystem. Stream handlers can also define new events for use as a 
  4429. communication mechanism between the stream handler and the application. Refer 
  4430. to the ulType and ulSubType fields in the EVCB data structure in the OS/2 
  4431. Multimedia Programming Reference. 
  4432.  
  4433. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  4434. ΓöéEvent                   ΓöéData      ΓöéDescription                             Γöé
  4435. Γöé                        ΓöéStructure Γöé                                        Γöé
  4436. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4437. ΓöéEVENT_CUE_DATA          ΓöéDATA_EVCB ΓöéA cuepoint in terms of some specific    Γöé
  4438. Γöé(Explicit)              Γöé          Γöépiece of data in a stream. This event   Γöé
  4439. Γöé                        Γöé          Γöécan be enabled as a single event or as aΓöé
  4440. Γöé                        Γöé          Γöérecurring event.                        Γöé
  4441. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4442. ΓöéEVENT_CUE_TIME          ΓöéTIME_EVCB ΓöéA cuepoint in terms of stream time from Γöé
  4443. Γöé(Explicit)              Γöé          Γöéthe start of the stream. This event can Γöé
  4444. Γöé                        Γöé          Γöébe enabled as a single event or as a    Γöé
  4445. Γöé                        Γöé          Γöérecurring event. Recurring events are   Γöé
  4446. Γöé                        Γöé          Γöéevents that are defined as a time       Γöé
  4447. Γöé                        Γöé          Γöéinterval. An event is generated an each Γöé
  4448. Γöé                        Γöé          Γöéoccurrence of this time interval. SingleΓöé
  4449. Γöé                        Γöé          Γöéevents remain enabled, even after they  Γöé
  4450. Γöé                        Γöé          Γöéare reported. In case the stream is     Γöé
  4451. Γöé                        Γöé          Γöéseeked backwards in time to a position  Γöé
  4452. Γöé                        Γöé          Γöébefore a cuepoint and play is resumed,  Γöé
  4453. Γöé                        Γöé          Γöéthe cuepoint will be reported again.    Γöé
  4454. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4455. ΓöéEVENT_CUE_TIME_PAUSE    ΓöéTIME_EVCB ΓöéA cuepoint in terms of stream time from Γöé
  4456. Γöé(Explicit)              Γöé          Γöéthe start of the stream. This event willΓöé
  4457. Γöé                        Γöé          Γöécause the stream to be paused when the  Γöé
  4458. Γöé                        Γöé          Γöécuepoint is reached. This event can be  Γöé
  4459. Γöé                        Γöé          Γöéenabled as a single event.              Γöé
  4460. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4461. ΓöéEVENT_DATAOVERRUN       ΓöéEVCB      ΓöéA stream handler detected a data        Γöé
  4462. Γöé(Explicit)              Γöé          Γöéoverrun. Data could be lost in a        Γöé
  4463. Γöé                        Γöé          Γöérecording situation.                    Γöé
  4464. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4465. ΓöéEVENT_DATAUNDERRUN      ΓöéEVCB      ΓöéA target stream handler detected a data Γöé
  4466. Γöé(Explicit)              Γöé          Γöéunderrun condition. There was no data   Γöé
  4467. Γöé                        Γöé          Γöéavailable to output to the output       Γöé
  4468. Γöé                        Γöé          Γöédevice. Usually in this situation, the  Γöé
  4469. Γöé                        Γöé          Γöétarget stream handler will attempt to   Γöé
  4470. Γöé                        Γöé          Γöéget another buffer and then pause it's  Γöé
  4471. Γöé                        Γöé          Γöédevice. The target stream handler will  Γöé
  4472. Γöé                        Γöé          Γöébe re-started when more data is         Γöé
  4473. Γöé                        Γöé          Γöéavailable to be output. This condition  Γöé
  4474. Γöé                        Γöé          Γöéresults in a break in the output data   Γöé
  4475. Γöé                        Γöé          Γöéstream. Interleaved data format can     Γöé
  4476. Γöé                        Γöé          Γöécause underruns to occur when the end ofΓöé
  4477. Γöé                        Γöé          Γöéthe data is reached, but the end of fileΓöé
  4478. Γöé                        Γöé          Γöéhas not been reached.                   Γöé
  4479. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4480. ΓöéEVENT_EOS (Implicit)    ΓöéIMPL_EVCB ΓöéEnd of stream event.  This event is     Γöé
  4481. Γöé                        Γöé          Γöégenerated after the target stream       Γöé
  4482. Γöé                        Γöé          Γöéhandler has consumed the last buffer in Γöé
  4483. Γöé                        Γöé          Γöéthe stream. This signals to the         Γöé
  4484. Γöé                        Γöé          Γöéapplication that the stream has         Γöé
  4485. Γöé                        Γöé          Γöécompleted processing.                   Γöé
  4486. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4487. ΓöéEVENT_ERROR (Implicit)  ΓöéIMPL_EVCB ΓöéAn error has occurred while streaming.  Γöé
  4488. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4489. ΓöéEVENT_PLAYLISTCUEPOINT  ΓöéPLAYL_EVCBΓöéA memory stream handler playlist        Γöé
  4490. Γöé(Implicit)              Γöé          Γöécuepoint event.                         Γöé
  4491. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4492. ΓöéEVENT_PLAYLISTMESSAGE   ΓöéPLAYL_EVCBΓöéA memory stream handler playlist        Γöé
  4493. Γöé(Implicit)              Γöé          Γöémessage.                                Γöé
  4494. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4495. ΓöéEVENT_QUEUE_OVERFLOW    ΓöéIMPL_EVCB ΓöéEvent queue overflow. Indicates that an Γöé
  4496. Γöé(Implicit)              Γöé          Γöéevent has been lost due to too many     Γöé
  4497. Γöé                        Γöé          Γöéevents being generated. The application Γöé
  4498. Γöé                        Γöé          Γöé(MCD) should use this event to clear anyΓöé
  4499. Γöé                        Γöé          Γöéwaiting conditions.                     Γöé
  4500. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4501. ΓöéEVENT_STREAM_STOPPED    ΓöéIMPL_EVCB ΓöéThe stream has been emptied or          Γöé
  4502. Γöé(Implicit)              Γöé          Γöédiscarded. (See the SpiStopStream       Γöé
  4503. Γöé                        Γöé          Γöéfunction in the OS/2 Multimedia         Γöé
  4504. Γöé                        Γöé          ΓöéProgramming Reference.)                 Γöé
  4505. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4506. ΓöéEVENT_SYNC_PREROLLED    ΓöéIMPL_EVCB ΓöéAll synchronized streams are prerolled. Γöé
  4507. Γöé(Implicit)              Γöé          Γöé(See the SpiStartStream function in the Γöé
  4508. Γöé                        Γöé          ΓöéOS/2 Multimedia Programming Reference.) Γöé
  4509. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  4510. ΓöéEVENT_SYNCOVERRUN       ΓöéOVRU_EVCB ΓöéA sync overrun has been detected in the Γöé
  4511. Γöé(Explicit)              Γöé          Γöéstream.                                 Γöé
  4512. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  4513.  
  4514. The Sync/Stream Manager propagates events to the application through the media 
  4515. driver by doing a call-back to an event routine that the application registered 
  4516. with the SSM on an SpiCreateStream call. Use the event routine as if it were a 
  4517. second-level interrupt routine and do not attempt to do a lot of processing. 
  4518. The event routine is on a per-process basis; it receives only one process at a 
  4519. time. Therefore, when an event is sent to be processed, it must wait until the 
  4520. current event has completed processing. 
  4521.  
  4522. Because there is only one EVCB for implicit events, it is a good idea to copy 
  4523. any needed information from the EVCB into local variables for processing by the 
  4524. event routine. The event routine has the following interface: 
  4525.  
  4526. Event_Entry(PEVCB pEVCB, rc)
  4527.  
  4528.  
  4529. ΓòÉΓòÉΓòÉ 5.2.5. Null Stream Handler ΓòÉΓòÉΓòÉ
  4530.  
  4531. The SSM provides a null stream creation capability to enable multimedia 
  4532. applications to synchronize nonstreaming devices with streaming devices. The 
  4533. null stream is created and started for the nonstreaming device, but has no data 
  4534. flow associated with it. The Duet Player II Sample Program provides an example 
  4535. of synchronizing the CD-DA device, which is a nonstreaming device. 
  4536.  
  4537. Any application or media driver can create a null stream, or several null 
  4538. streams. Since the null stream has no default resync tolerance value, the 
  4539. creating module must establish this value by calling SpiGetProtocol followed by 
  4540. SpiInstallProtocol, modifying the resync tolerance field between these two 
  4541. calls. This establishes the frequency of event notification to the calling 
  4542. process, allowing the system to maintain sync without the burden of running the 
  4543. notification thread on every sync pulse. 
  4544.  
  4545. A given process can create multiple null streams. These streams are notified of 
  4546. sync pulses in the same way as real stream handlers; therefore, each null 
  4547. stream handler must support some capabilities a real stream handler supports. 
  4548. Each null stream thus created can have different sync pulse timing 
  4549. characteristics. Sync pulse granularity for each stream is governed by changing 
  4550. the resync tolerance value in the respective SPCBs. 
  4551.  
  4552. Null stream handlers must support the following Stream Handler Command (SHC) 
  4553. messages: 
  4554.  
  4555.      SHC_CREATE 
  4556.      SHC_DESTROY 
  4557.      SHC_DISABLE_EVENT 
  4558.      SHC_DISABLE_SYNC 
  4559.      SHC_ENABLE_EVENT 
  4560.      SHC_ENABLE_SYNC 
  4561.      SHC_ENUMERATE_PROTOCOLS 
  4562.      SHC_GET_PROTOCOL 
  4563.      SHC_GET_TIME 
  4564.      SHC_INSTALL_PROTOCOL 
  4565.      SHC_NEGOTIATE_RESULT 
  4566.      SHC_SEEK 
  4567.      SHC_START 
  4568.      SHC_STOP 
  4569.  
  4570.  
  4571. ΓòÉΓòÉΓòÉ 5.3. Stream Protocols ΓòÉΓòÉΓòÉ
  4572.  
  4573. The Stream Protocol Control Block (SPCB) defines key parameters that control 
  4574. the behavior of a data stream. The application can query, install, or deinstall 
  4575. a specific SPCB from a stream handler. SPCB information is installed in the 
  4576. SPI.INI file by means of a resource file. (See Installing a Stream Handler for 
  4577. a description of how to install stream protocol.) 
  4578.  
  4579. Each stream handler supports one or more stream protocols. Each SPCB is 
  4580. uniquely identified by the value of the stream data type (SPCB key). One field 
  4581. in the SPCB key allows the stream handler to have multiple SPCBs installed for 
  4582. the same data type. This field can be used by an application to specify which 
  4583. SPCB, for any data type, it wants to use. Each application in the system could 
  4584. define multiple SPCBs for the same data type (see the ulType field in the 
  4585. SPCBKEY data structure). The application can modify a stream protocol by 
  4586. installing a new SPCB and deinstalling the old SPCB. 
  4587.  
  4588. The parameters in the SPCB are: 
  4589.  
  4590.  Fields                   Meaning 
  4591.  
  4592.  SPCB Length              Length of SPCB structure. Provided for future 
  4593.                           expansion of the SPCB. 
  4594.  
  4595.  SPCB Key                 Data stream type and internal key. The internal key 
  4596.                           is used to differentiate between multiple SPCB's of 
  4597.                           the same data stream type. 
  4598.  
  4599.                               Data Type - The data type of the stream (for 
  4600.                                example, waveform or MIDI). 
  4601.                               Data Subtype - The subtype of the stream (for 
  4602.                                example, 16-bit stereo PCM). 
  4603.                               Internal Key - Used to differentiate between 
  4604.                                multiple SPCB's of the same data type and 
  4605.                                subtype. 
  4606.  
  4607.  Data Flag                Attributes of the data type. (that is, specifies 
  4608.                           whether data or time cuepoints are supported by this 
  4609.                           data type). 
  4610.  
  4611.                               SPCBDATA_CUETIME - This data type can support 
  4612.                                time cuepoint events. 
  4613.                               SPCBDATA_CUEDATA - This data type can support 
  4614.                                data cuepoint events. 
  4615.                               SPCBDATA_NOSEEK - Seeking cannot be done on this 
  4616.                                data type. 
  4617.  
  4618.  Number of Records        Maximum number of records per buffer. (This is only 
  4619.                           valid for split streams). 
  4620.  
  4621.  Data Block Size          Size of a block. A block is an atomic piece of data. 
  4622.                           For example, for digital audio data type PCM 16-bit 
  4623.                           stereo at a 44.1 kHz sampling rate, the block size 
  4624.                           would be 4 bytes. 
  4625.  
  4626.  Data Buffer Size         Size of buffer to be used while streaming. Maximum 
  4627.                           buffer size is 64KB. 
  4628.  
  4629.  Min Number of Buffers    Minimum number of buffers needed to maintain a 
  4630.                           constant data stream. 
  4631.  
  4632.  Max Number of Buffers    Maximum number of buffers needed (ideal number). For 
  4633.                           normal streams, this means the number of buffers that 
  4634.                           will be allocated for the stream. For user provided 
  4635.                           buffer streaming, this means the number of buffers 
  4636.                           that the Sync/Stream Manager can queue up for a 
  4637.                           consumer. This can be used by a source stream handler 
  4638.                           that gives the same set of buffers to the Sync/Stream 
  4639.                           Manager repeatedly. If the number of buffers is set 
  4640.                           to the number of buffers in the set minus one, the 
  4641.                           source stream handler will be able to detect when the 
  4642.                           target has consumed a buffer and it can be reused. 
  4643.                           Assuming that the set of buffers is an ordered set 
  4644.                           and each buffer is used in the same order each time. 
  4645.  
  4646.  Source Start Number      Number of EMPTY buffers required to start the source 
  4647.                           stream handler. The value should be at least as big 
  4648.                           as the maximum number of buffers that would be 
  4649.                           requested by the source stream handler. 
  4650.  
  4651.  Target Start Number      Number of FULL buffers required to start the target 
  4652.                           stream handler. The value should be at least as big 
  4653.                           as the maximum number of buffers that would be 
  4654.                           requested by the target stream handler. Usually, a 
  4655.                           target will require at least two buffers at the start 
  4656.                           of the stream. 
  4657.  
  4658.  Buffer Flag              Buffer attributes (that is, the user provides 
  4659.                           buffers, fixed block size, interleaved data type, and 
  4660.                           maximum buffer size). 
  4661.  
  4662.                               SPCBBUF_USERPROVIDED - User provides buffers for 
  4663.                                streaming. The Sync/Stream Manager will not 
  4664.                                allocate buffers, but attempt to lock down user 
  4665.                                provided buffers or copy the data to locked 
  4666.                                buffers. Using this flag will affect the 
  4667.                                performance of streaming. Only a source stream 
  4668.                                handler can set this flag. This flag is mutually 
  4669.                                exclusive with the SPCBBUF_INTERLEAVED flag. The 
  4670.                                SPCBBUF_FIXEDBUF cannot be used with this flag 
  4671.                                set. 
  4672.                               SPCBBUF_FIXEDBUF - The buffer size for this 
  4673.                                stream handler must be a particular fixed size 
  4674.                                (for this data type). This flag cannot be used 
  4675.                                with the SPCBBUF_USERPROVIDED flag. The 
  4676.                                SPCBBUF_INTERLEAVED flag (split stream) implies 
  4677.                                SPCBBUF_FIXEDBUF. 
  4678.                               SPCBBUF_NONCONTIGUOUS - Each data buffer is 
  4679.                                allocated contiguously in physical memory unless 
  4680.                                both stream handlers set the non-contiguous flag 
  4681.                                (SPCBBUF_NONCONTIGUOUS). This flag allows the 
  4682.                                system flexibility in allocating memory. A 
  4683.                                device driver stream handler may require 
  4684.                                contiguous memory, while a DLL stream handler 
  4685.                                may not. 
  4686.                               SPCBBUF_INTERLEAVED - This stream is a split 
  4687.                                stream. It consists of one input stream of 
  4688.                                interleaved data that is split into multiple 
  4689.                                streams of individual data types. Only the 
  4690.                                source stream handler can set this flag. This 
  4691.                                flag is mutually exclusive with the 
  4692.                                SPCBBUF_USERPROVIDED flag. The SPCBBUF_FIXEDBUF 
  4693.                                cannot be used with this flag set. 
  4694.                               SPCBBUF_MAXSIZE - The ulBufSize field contains 
  4695.                                that maximum size buffer that this stream 
  4696.                                handler can handle. 
  4697.                               SPCBBUF_16MEG - The stream buffers may be 
  4698.                                allocated above 16MB. This is used by stream 
  4699.                                handlers device drivers that can support greater 
  4700.                                than 16MB addresses. 
  4701.  
  4702.  Handler Flag             Stream handler flags (that is, the handler can 
  4703.                           generate and receive sync pulses, and use the 
  4704.                           Sync/Stream Manager timer as the master, 
  4705.                           non-streaming handler). 
  4706.  
  4707.                               SPCBHAND_GENSYNC - This stream handler can 
  4708.                                generate sync pulses. 
  4709.                               SPCBHAND_RCVSYNC - This stream handler can 
  4710.                                receive sync pulses. 
  4711.                               SPCBHAND_NONSTREAM - This stream handler is a 
  4712.                                non-streaming handler (that is, a stream handler 
  4713.                                that can participate in synchronization, but 
  4714.                                does not stream). 
  4715.                               SPCBHAND_GENTIME - This stream handler can keep 
  4716.                                track of the real stream time. This handler also 
  4717.                                supports the SpiGetTime and cuepoint events. 
  4718.                               SPCBHAND_NOPREROLL - This stream handler cannot 
  4719.                                preroll its device (that is, for recording 
  4720.                                streams, the source stream handler cannot be 
  4721.                                prerolled).  The Sync/Stream Manager will treat 
  4722.                                this stream as if it were prerolled if asked to 
  4723.                                preroll this stream. 
  4724.                               SPCBHAND_NOSYNC - This stream handler can be in 
  4725.                                a sync group but does not receive or generate 
  4726.                                sync pulses. (It is useful to group streams 
  4727.                                together so that they can be manipulated as a 
  4728.                                group). 
  4729.                               SPCBHAND_PHYS_SEEK - This stream handler does a 
  4730.                                seek to a physical device. Other stream handlers 
  4731.                                only adjust stream time on a seek request. The 
  4732.                                Sync/Stream Manager will always call this stream 
  4733.                                handler first on a call to the SpiSeekStream 
  4734.                                function. 
  4735.  
  4736.  Resync Tolerance         Resync tolerance value. It is used to determine 
  4737.                           whether to send a sync pulse to this specific slave 
  4738.                           stream handler, if it is a slave. 
  4739.  
  4740.  Sync Pulse Granularity   Time interval in MMTIME units between sync pulses. 
  4741.                           Used to save sync pulse generation granularity if 
  4742.                           this stream handler is a master, but cannot generate 
  4743.                           its own sync pulse. 
  4744.  
  4745.  Bytes Per Unit           Bytes per unit of time. This is used to do seeks on 
  4746.                           linear data that is not compressed or of variable 
  4747.                           length. It is also used for SHC_GETTIME queries in a 
  4748.                           stream handler. 
  4749.  
  4750.  MMTIME Per Unit          The amount of MMTIME each unit represents. This is 
  4751.                           also used for the seek and "get time" functions of a 
  4752.                           stream handler. 
  4753.  
  4754.  Refer to the OS/2 Multimedia Programming Reference for further information on 
  4755.  structure and flag definitions. 
  4756.  
  4757.  
  4758. ΓòÉΓòÉΓòÉ 5.3.1. Stream Protocol Negotiation at Stream Creation Time ΓòÉΓòÉΓòÉ
  4759.  
  4760. Following are some statements regarding stream protocol negotiation. 
  4761.  
  4762.      The following flags are set to On in the negotiated SPCB for the stream 
  4763.       handler that should perform the action specified by the flag. Either the 
  4764.       source or the target negotiated SPCB will contain these bit flags. 
  4765.  
  4766.       SPCBHAND_GENSYNC         SPCBHAND_RCVSYNC 
  4767.  
  4768.       SPCBHAND_GENTIME         SPCBHAND_PHYS_SEEK 
  4769.  
  4770.      The DATATYPE_GENERIC will match any other data type during negotiation. 
  4771.       This is useful for stream handlers like the File System Stream Handler 
  4772.       that can be a source for almost any data type. 
  4773.  
  4774.      If neither of the SPCB key data types are generic, then both the data 
  4775.       type and subtype fields must match or an error will occur. The internal 
  4776.       key field is not used during negotiation. The internal key of 0 is 
  4777.       returned from negotiation. 
  4778.  
  4779.      The block size will default to 1 byte if not specified. The source and 
  4780.       target block size must match or the negotiation will fail. 
  4781.  
  4782.      The Data Buffer Size must be a multiple of block size. 
  4783.  
  4784.      The negotiation will fail if one stream handler has a fixed buffer size 
  4785.       (SPCBBUF_FIXEDBUF) greater than the maximum buffer size (SPCBBUF_MAXSIZE) 
  4786.       of the other. 
  4787.  
  4788.      Both handlers must not have fixed buffer sizes (SPCBBUF_FIXEDBUF) of 
  4789.       different lengths. 
  4790.  
  4791.      Both handlers must not have maximum buffer sizes (SPCBBUF_MAXSIZE) of 
  4792.       different lengths. 
  4793.  
  4794.      Negotiation will default to a fixed buffer size (SPCBBUF_FIXEDBUF). 
  4795.       Otherwise, the buffer size is set the greater of the two SPCB buffer 
  4796.       sizes, but not greater than the maximum buffer size (SPCBBUF_MAXSIZE), if 
  4797.       one is specified. 
  4798.  
  4799.      If no special conditions 
  4800.       (SPCBBUF_FIXEDBUF,SPCBBUF_MAXSIZE,SPCBBUF_USERPROVIDED) were specified, 
  4801.       the largest buffer size is the one that will be used for the stream 
  4802.       creation. 
  4803.  
  4804.      For user-provided buffers (SPCBBUF_USERPROVIDED), the buffer size is set 
  4805.       to the maximum buffer size (SPCBBUF_MAXSIZE), or to the largest buffers 
  4806.       possible rounded to a multiple of the block size. 
  4807.  
  4808.      Split streams (SPCBBUF_INTERLEAVED) must have a maximum number of records 
  4809.       per buffer greater than 0. The target stream handler must set this field 
  4810.       to 0, since only the source stream handler can set this value. 
  4811.  
  4812.      The Minimum and Maximum number of buffers must be greater than zero. 
  4813.  
  4814.      The largest Minimum number of buffers value is used. 
  4815.  
  4816.      The largest Maximum number of buffers value is used. 
  4817.  
  4818.      The Sync/Stream Manager attempts to allocate the maximum number of stream 
  4819.       buffers requested. If it is unable to allocate this amount of space, but 
  4820.       is able to allocate the minimum needed, the stream is created. Otherwise, 
  4821.       the stream creation fails for lack of resources. 
  4822.  
  4823.      The number of EMPTY buffers required to start the source is always taken 
  4824.       from the source SPCB. 
  4825.  
  4826.      The number of FULL buffers required to start the target is always taken 
  4827.       from the target SPCB. 
  4828.  
  4829.      For SpiGetTime requests, each handler must specify whether it can receive 
  4830.       these requests and return real-time information. It can do this by 
  4831.       specifying the SPCBHAND_GENTIME flag. For negotiation, the target stream 
  4832.       handler is the default provider of this information unless only the 
  4833.       source can provide this information. 
  4834.  
  4835.      The Bytes Per Unit and MMTIME Per Unit are set from the stream handler 
  4836.       that handles the real-time requests per the previous statement. 
  4837.  
  4838.      For sync pulses, each handler must specify whether it can send or receive 
  4839.       sync pulses. It can do this by specifying the SPCBHAND_GENSYNC or 
  4840.       SPCBHAND_RCVSYNC flag. For negotiation, the target stream handler is the 
  4841.       default generator and receiver of sync pulses unless only the source can 
  4842.       generate and receive sync pulses. 
  4843.  
  4844.      The sync tolerance is only valid for handlers that set the 
  4845.       SPCBHAND_RCVSYNC. 
  4846.  
  4847.      The sync pulse granularity is only valid for handlers that set the 
  4848.       SPCBHAND_GENSYNC. 
  4849.  
  4850.      The SPCBHAND_PHYS_SEEK flag is used to specify if a stream handler does a 
  4851.       physical device seek when called on an SHC_SEEK call. The Sync/Stream 
  4852.       Manager uses this information to determine which stream handler should be 
  4853.       called first on an SpiSeekStream call. The handler that does a physical 
  4854.       device seek will be called first, otherwise, the stream handler that 
  4855.       specified SPCBHAND_GENTIME will be called last. 
  4856.  
  4857.      Any reserved fields must be set to NULL. 
  4858.  
  4859.      Any undefined bit in any bit flag of the stream protocol must be set to 
  4860.       0. 
  4861.  
  4862.  
  4863. ΓòÉΓòÉΓòÉ 5.4. Cuepoint Event Support ΓòÉΓòÉΓòÉ
  4864.  
  4865. In certain instances it is not appropriate for a source stream handler to 
  4866. report cuepoints to an application (or media driver), but to allow the target 
  4867. to report the cuepoint. Usually, an application awaiting a cuepoint wants to 
  4868. receive it at the time the data is being output on the target side of a stream. 
  4869. One such circumstance involves the System Memory Stream Handler. 
  4870.  
  4871. The System Memory Stream Handler has the ability to stream data from a 
  4872. playlist. A playlist is basically a little program that specifies what memory 
  4873. objects from a user application should be streamed and in what order. It 
  4874. consists of control information to enable looping, branching, and subroutines 
  4875. calls within the playlist. Another feature of a playlist is the CUEPOINT 
  4876. instruction, which allows the playlist to specify where in the data stream that 
  4877. cuepoints need to be sent to the application. Since the playlist is "played" 
  4878. within the source stream handler, it needs to notify the target stream handler 
  4879. to report the cuepoint at the appropriate time in the data stream. 
  4880.  
  4881. The Sync/Stream Manager provides the ability for a source stream handler to 
  4882. associate a cuepoint with a buffer that it passes to the target stream handler 
  4883. (through the Sync/Stream Manager). This buffer and attribute remain in the data 
  4884. stream until the target stream handler requests it. The attribute for the 
  4885. buffer is passed with the buffer to the target (refer to the SMH_NOTIFY message 
  4886. in the OS/2 Multimedia Programming Reference). The target stream handler must 
  4887. then flag the event (for example, EVENT_CUE_DATA) when it receives a buffer 
  4888. with a non-zero attribute. The value of the attribute is passed as a parameter 
  4889. to the event on the SMH_REPORTEVENT call to the Sync/Stream Manager. 
  4890.  
  4891. This feature of the Sync/Stream Manager supports the memory playlist ability to 
  4892. send a cuepoint event as close to actual time it occurs as possible. For this 
  4893. to work, it must be the target stream handler that must flag the cuepoint event 
  4894. to the application, in this case the media driver. If the System Memory Stream 
  4895. Handler is the source stream handler, it must notify the target stream handler 
  4896. to flag a cuepoint event. Refer to the OS/2 Multimedia Programming Reference 
  4897. for more information on playlists. 
  4898.  
  4899.  
  4900. ΓòÉΓòÉΓòÉ 5.5. CD-ROM XA Stream Handler ΓòÉΓòÉΓòÉ
  4901.  
  4902. The Sync/Stream Manager provides a mechanism to allow one data stream source 
  4903. and multiple targets, called split streams. For example, CD-ROM XA can 
  4904. interleave waveform audio, video, and text data within the same data buffer. 
  4905. The CD-ROM XA Stream Handler splits the data into multiple streams for CD-ROM 
  4906. XA devices. It is more efficient for the stream handler to read the combined 
  4907. data into one buffer and then insert the video data into a video stream and the 
  4908. waveform audio data into a waveform audio stream without copying the data. The 
  4909. waveform audio data stream is then consumed by a waveform audio stream handler 
  4910. and the video stream by a video stream handler. The waveform audio stream 
  4911. handler sees only the audio portions of the data stream and the video stream 
  4912. handler sees only the video portions of the stream. 
  4913.  
  4914. A data stream can be split into multiple split streams. The number is limited 
  4915. only by the resources of the system. Each separate split of the stream is a 
  4916. separate stream. The work of parsing and determining the different data is the 
  4917. job of the source stream handler, which actually fills an empty buffer from the 
  4918. Sync/Stream Manager with data from the source device. 
  4919.  
  4920. The source stream handler must determine which data goes in which stream. It 
  4921. must then return to the Sync/Stream Manager pointers to the individual records 
  4922. of the buffer. Each record is a portion of the buffer filled with data specific 
  4923. to one of the split streams. These records are returned to the Sync/Stream 
  4924. Manager indicating which stream they should go to. The Sync/Stream Manager will 
  4925. then queue these records in the respective buffer or record queue for one of 
  4926. the split streams sharing the buffer. 
  4927.  
  4928. You can set up this type of split stream as follows. Multiple streams must be 
  4929. created, each with a call to the SpiCreateStream function to the Sync/Stream 
  4930. Manager. The first of these functions is a normal stream creation call with the 
  4931. hstreamBuf parameter set to NULL. Every other subsequent SpiCreateStream call 
  4932. that needs to share the buffers of the first stream must pass that stream's 
  4933. handle in the hstreamBuf parameter. This is the mechanism used by the 
  4934. Sync/Stream Manager to allow these split streams to share the buffers of the 
  4935. first stream. 
  4936.  
  4937. The source stream handler will also receive this parameter on an SHC_CREATE 
  4938. call and need to support this kind of streaming. The SPCBBUF_INTERLEAVED flag 
  4939. in the SPCB that is set by the source stream handler to indicate whether it can 
  4940. do split streaming. If it cannot, any SpiCreateStream attempting to use its 
  4941. buffers will be rejected.  Any stream sharing buffers will be negotiated to use 
  4942. the same size buffers and number of buffers as the stream that allocated the 
  4943. buffers. 
  4944.  
  4945. The split-stream mechanism only works for one source and multiple targets. 
  4946.  
  4947.  
  4948. ΓòÉΓòÉΓòÉ 5.6. Streaming Scenarios ΓòÉΓòÉΓòÉ
  4949.  
  4950. The following programming scenarios provide sample pseudocode of data streaming 
  4951. in the OS/2 multimedia environment using the sync/stream subsystem functions. 
  4952. This pseudocode shows how to structure your application code to use the SPI 
  4953. functions. For further details about how the sync/stream subsystem interfaces 
  4954. operate, refer to detailed definitions of the functions and messages in the 
  4955. OS/2 Multimedia Programming Reference. 
  4956.  
  4957.  
  4958. ΓòÉΓòÉΓòÉ 5.6.1. Streaming Waveform Audio Data from the File System ΓòÉΓòÉΓòÉ
  4959.  
  4960. This scenario describes creating a waveform audio data stream and associating a 
  4961. file containing waveform audio with the source stream handler (File System 
  4962. Stream Handler DLL), where the target handler is the Audio Stream Handler, as 
  4963. shown in the following example. 
  4964.  
  4965.  /**************************************************************/
  4966.  /*                         M A I N                            */
  4967.  /**************************************************************/
  4968.  #include        <os2.h>
  4969.  #include        <stdlib.h>
  4970.  #include        <stdio.h>
  4971.  #include        <conio.h>
  4972.  #include        <string.h>
  4973.  #include        "os2me.h"
  4974.  
  4975.  main()
  4976.  {
  4977.  RC           ulRC;             /* Error return code */
  4978.  SPCBKEY      SPCBkey;          /* Data type to stream */
  4979.  IMPL_EVCB    EVCB;             /* Event control block for implicit events */
  4980.  ACB_MMIO     acb;              /* Associate control block used to assoc */
  4981.                                 /* The file to stream (play) */
  4982.  DCB_AUDIOSH  dcb;              /* Audio device driver information */
  4983.  HAND         ahand[5];         /* Enumerate handler info */
  4984.  ULONG        ulNumHand = 5;
  4985.  HID          hidSource, hidTarget, hidunused; /* Handler ID */
  4986.  HSTREAM      hstream;          /* Stream handle */
  4987.  HEVENT       hevent;           /* Event handle for implicit events */
  4988.  HMMIO        hmmioIn;          /* Handle to mmio file open */
  4989.  /* Get list of all stream handlers in system */
  4990.  if (rc = SpiEnumerateHandlers(&ahand, &ulNumHand))
  4991.     return(rc);    /* error! */
  4992.  /* Get the stream handler ID for the File System Stream Handler */
  4993.  if (rc = SpiGetHandler("FSSH",&hidSource,&hidunused))
  4994.     return(rc);    /* error! */
  4995.  /* Get the stream handler ID for the Audio Stream Handler */
  4996.  if (rc = SpiGetHandler("AUDIOSH$",&hidunused,&hidTarget))
  4997.     return(rc);    /* error! */
  4998.  /* Create a data stream from the file system to the */
  4999.  /* waveform audio ACPA device connected to speakers. */
  5000.  SPCBkey.ulDataType = DATATYPE_WAVEFORM;
  5001.  SPCBkey.ulDataSubType = WAVE_FORMAT_4S16;
  5002.  SPCBkey.ulINtKey = 0;
  5003.  strcpy(dcb.szDevName,"AUDIO1$");
  5004.  dcb.ulDCBLen = sizeof(dcb);
  5005.  dcb.hSysFileNum = (** hSysFileNum returned by audio dd on audio_init call)
  5006.  if (rc = SpiCreateStream(hidSource,
  5007.                           hidTarget,
  5008.                           &SPCBkey,
  5009.                           NULL,
  5010.                           (PDCB)&dcb,
  5011.                           (PEVCB)&EVCB,
  5012.                           EventProc,
  5013.                           0,
  5014.                           &hstream,
  5015.                           &hevent))
  5016.     return(rc);    /* error! */
  5017.  /* USE MMIO to access a waveform audio object */
  5018.  if ((hmmioIn = mmioOpen("c:\lawton\files\waveform\hendrix.jim"
  5019.                          NULL,
  5020.                          MMIO_READWRITE|
  5021.                          MMIO_DENYNONE)) == NULL)
  5022.     return(ERROR_FILE_NOT_FOUND);
  5023.  /* Fill in acb with data object info */
  5024.  acb.ulACBLen = sizeof(ACB_MMIO);
  5025.  acb.ulObjType = ACBTYPE_MMIO;
  5026.  acb.hmmio = hmmioIn;
  5027.  /* Associate the waveform data object with the source handler */
  5028.  if (rc = SpiAssociate(hstream,hidSource,&acb))
  5029.     return(rc);    /* error! */
  5030.  /* Start the streaming */
  5031.  if (rc = SpiStartStream(hstream, SPI_START_STREAM))
  5032.     return(rc);    /* error! */
  5033.  /* Do other processing */
  5034.  
  5035.  /* Create a semaphore and block this thread on the semaphore */
  5036.  /* until the streaming is complete                           */
  5037.                     .
  5038.                     .
  5039.                     .
  5040.  /* Destroy the stream  */
  5041.  if (rc = SpiDestroyStream(hstream))
  5042.     return(rc);    /* error! */
  5043.  
  5044.  /* Perform any other resource cleanup */
  5045.  
  5046.  /**************************************************************/
  5047.  /*                E v e n t   P r o c e d u r e               */
  5048.  /**************************************************************/
  5049.  RC EventProc(EVCB *pEVCB)
  5050.  {
  5051.  /* Handle events from the Sync/Stream Manager */
  5052.  switch (pEVCB->ulType) {
  5053.  
  5054.     case EVENT_IMPLICIT_TYPE:
  5055.        switch (pEVCB->ulSubType) {
  5056.           case EVENT_EOS:     /* End of Stream */
  5057.              /* Clear the semaphore so that the main */
  5058.              /* routine can continue execution.      */
  5059.              break;
  5060.           case EVENT_ERROR:   /* Error occurred */
  5061.              /* flag error condition in main line application */
  5062.              break;
  5063.           case EVENT_STREAM_STOPPED:  /* Discard/Flush Stop */
  5064.              /* Do processing while stream stopped */
  5065.              break;
  5066.           case EVENT_SYNC_PREROLLED:  /* Stream is prerolled */
  5067.              /* Now that the producers are prerolled, do a real
  5068.                 start to the stream handlers */
  5069.              break;
  5070.           default:
  5071.              /* Unknown event, do something */
  5072.           }
  5073.        break;
  5074.     default:
  5075.        /* Unknown event, do something */
  5076.     }
  5077.  }
  5078.  
  5079.  
  5080. ΓòÉΓòÉΓòÉ 5.6.2. Synchronized MIDI and Waveform Streams ΓòÉΓòÉΓòÉ
  5081.  
  5082. This scenario describes how two streams (waveform audio and MIDI) are created 
  5083. and synchronized with each other. The audio stream is the synchronization 
  5084. master stream. The source handler for the waveform stream is the File System 
  5085. Stream Handler DLL. The source handler for the MIDI stream is the File System 
  5086. Stream Handler DLL. 
  5087.  
  5088. Currently, the audio stream handler does not provide the ability to be a slave 
  5089. to a master stream. It does, however, have the ability to be the master stream 
  5090. handler. 
  5091.  
  5092.  /**************************************************************/
  5093.  /*                         M A I N                            */
  5094.  /**************************************************************/
  5095.  main()
  5096.  {
  5097.  RC           ulRC;             /* Error return code */
  5098.  
  5099.  SPCBKEY      spcbkey;          /* Data type to stream */
  5100.  IMPL_EVCB    evcb1, evcb2;     /* Event control block for implicit events */
  5101.  ACB_MMIO     acb;              /* Associate control block used to assoc */
  5102.                                 /* The file to stream (play) */
  5103.  DCB_AUDIOSH  dcb;              /* Audio device driver information */
  5104.  HAND         ahand[5];         /* Enumerate handler info */
  5105.  ULONG        ulNumHand = 5;
  5106.  HID          hidSource1, hidTarget1, hidunused;    /* Handler IDs */
  5107.  HID          hidSource2, hidTarget2
  5108.  HSTREAM      hstream1, hstream2; /* Stream handle */
  5109.  HEVENT       hevent1, hevent2; /* Event handle for implicit events */
  5110.  HMMIO        hmmio1, hmmio2;   /* Handle to mmio file open */
  5111.  SLAVE        slave[1];         /* Sync slave structure */
  5112.  
  5113.  /* Get list of all Stream handlers in system */
  5114.  if (rc = SpiEnumerateHandlers(&ahand, &ulNumHand))
  5115.     return(rc);    /* error! */
  5116.  
  5117.  /********************************************************/
  5118.  /****** CREATE WAVEFORM AUDIO STREAM  (Stream # 1) ******/
  5119.  /********************************************************/
  5120.  /* Get the stream Handler ID for the file system stream handler */
  5121.  if (rc = SpiGetHandler("FSSH",&hidSource1,&hidunused))
  5122.     return(rc);    /* error! */
  5123.  /* Get the stream handler ID for the Audio Stream Handler */
  5124.  if (rc = SpiGetHandler("AUDIOSH$",&hidunused,&hidTarget1))
  5125.     return(rc);    /* error! */
  5126.  /* Create a data stream from the file system to */
  5127.  /* the audio ACPA device connected to speakers.  */
  5128.  spcbkey.ulDataType = DATATYPE_ADPCM_AVC;
  5129.  spcbkey.ulDataSubType = ADPCM_AVC_HQ;
  5130.  spcbkey.ulINtKey = 0;
  5131.  strcpy(dcb.szDevName,"AUDIO1$");
  5132.  dcb.ulDCBLen = sizeof(dcb);
  5133.  dcb.hSysFileNum = (** hSysFileNum returned by audio dd on audio_init call)
  5134.  if (rc = SpiCreateStream(hidSource1,
  5135.                           hidTarget1,
  5136.                           &spcbkey,
  5137.                           NULL,
  5138.                           (PDCB)&dcb,
  5139.                           (PEVCB)&evcb1,
  5140.                           EventProc,
  5141.                           0,
  5142.                           &hstream1,
  5143.                           &hevent1))
  5144.     return(rc);    /* error! */
  5145.  /* USE MMIO to access a waveform audio object */
  5146.  if ((hmmio1 = mmioOpen("E:\Mygreat\waveform\file\screams.hq"
  5147.                         NULL,
  5148.                         MMIO_READWRITE|
  5149.                         MMIO_DENYNONE)) == NULL)
  5150.     return(ERROR_FILE_NOT_FOUND);
  5151.  /* Fill in acb with data object info */
  5152.  acb.ulACBLen = sizeof(ACB_MMIO);
  5153.  acb.ulObjType = ACBTYPE_MMIO;
  5154.  acb.hmmio = hmmio1;
  5155.  /* Associate the waveform data object with the source handler */
  5156.  if (rc = SpiAssociate(hstream1,hidSource1,&acb))
  5157.     return(rc);    /* error! */
  5158.  
  5159.  /**********************************************/
  5160.  /****** CREATE MIDI STREAM  (Stream # 2) ******/
  5161.  /**********************************************/
  5162.  /* Get the stream handler ID for the File System Stream Handler */
  5163.  if (rc = SpiGetHandler("FSSH",&hidSource2,&hidunused))
  5164.     return(rc);    /* error! */
  5165.  /* Get the stream handler ID for the MIDI Audio Stream Handler */
  5166.  if (rc = SpiGetHandler("AUDIOSH$",&hidunused,&hidTarget2))
  5167.     return(rc);    /* error! */
  5168.  
  5169.  /* Create a data stream from the memory to an */
  5170.  /* OEM audio device connected to speakers.     */
  5171.  spcbkey.ulDataType = DATATYPE_MIDI;
  5172.  spcbkey.ulDataSubType = SUBTYPE_NONE;
  5173.  spcbkey.ulINtKey = 0;
  5174.  strcpy(dcb.szDevName,"AUDIO99$");
  5175.  dcb.ulDCBLen = sizeof(dcb);
  5176.  dcb.hSysFileNum = (** hSysFileNum returned by audio dd on audio_init call)
  5177.  if (rc = SpiCreateStream(hidSource2,
  5178.                           hidTarget2,
  5179.                           &spcbkey,
  5180.                           NULL,
  5181.                           (PDCB)&dcb,
  5182.                           (PEVCB)&evcb2,
  5183.                           EventProc,
  5184.                           0,
  5185.                           &hstream2,
  5186.                           &hevent2))
  5187.     return(rc);    /* error! */
  5188.  
  5189.  /* USE MMIO to access a waveform audio object */
  5190.  if ((hmmio2 = mmioOpen("E:Mygreat\midi\file\screams.mid"
  5191.                         NULL,
  5192.                         MMIO_READWRITE|
  5193.                         MMIO_DENYNONE)) == NULL)
  5194.     return(ERROR_FILE_NOT_FOUND);
  5195.  /* Fill in acb with data object info */
  5196.  acb.ulACBLen = sizeof(ACB_MMIO);
  5197.  acb.ulObjType = ACBTYPE_MMIO;
  5198.  acb.hmmio = hmmio2;
  5199.  /* Associate the waveform data object with the source handler */
  5200.  if (rc = SpiAssociate(hstream2,hidSource2,&acb))
  5201.     return(rc);    /* error! */
  5202.  
  5203.  
  5204.  /**************************************************************/
  5205.  /***** SETUP THE SYNCHRONIZATION BETWEEN THE TWO STREAMS ******/
  5206.  /**************************************************************/
  5207.  slave[0].hSlaveStream = hstream2;   /* MIDI stream is slave */
  5208.  slave[0].mmtimeStart = 0;           /* Time to start slave */
  5209.  if (rc = SpiEnableSync(hstream1,          /* Audio stream is master */
  5210.                         &slave,
  5211.                         1,                 /* Number of slaves */
  5212.                         0))                /* Use spcb sync granularity */
  5213.     return(rc);    /* error! */
  5214.  /* Start streams by passing the handle to the stream sync master */
  5215.  if (rc = SpiStartStream(hstream1, SPI_START_SLAVES))
  5216.     return(rc);    /* error! */
  5217.  
  5218.  /* Do other processing */
  5219.                     .
  5220.                     .
  5221.                     .
  5222.  
  5223.  /* Create a semaphore and block this thread on the semaphore */
  5224.  /* until the streaming is complete                           */
  5225.                     .
  5226.                     .
  5227.                     .
  5228.  
  5229.  /* Destroy both streams when completed */
  5230.  if (rc = SpiDestroyStream(hstream1))
  5231.     return(rc);    /* error! */
  5232.  if (rc = SpiDestroyStream(hstream2))
  5233.     return(rc);    /* error! */
  5234.  
  5235.  /* Perform other resource cleanup */
  5236.  }
  5237.  /**************************************************************/
  5238.  /*                E v e n t   P r o c e d u r e               */
  5239.  /**************************************************************/
  5240.  RC EventProc(EVCB *pEVCB)
  5241.  {
  5242.  if (pEVCB == &EVCB1)      /* Stream #1 or Stream # 2 event ? */
  5243.     /* Process Stream #1 events */
  5244.  else
  5245.     /* Process Stream #2 events */
  5246.  /* Handle events from the Sync/Stream Manager */
  5247.  switch (pEVCB->ulType) {
  5248.     case EVENT_IMPLICIT_TYPE:
  5249.        switch (pEVCB->ulSubType) {
  5250.           case EVENT_EOS:     /* End of Stream */
  5251.              /* Clear the semaphore so that the main routine can */
  5252.              /* continue execution.                              */
  5253.              break;
  5254.           case EVENT_ERROR:   /* Error occurred */
  5255.              /* flag error condition in main line application */
  5256.              break;
  5257.           case EVENT_STREAM_STOPPED:  /* Discard/Flush Stop */
  5258.              /* Do processing while stream stopped */
  5259.              break;
  5260.           case EVENT_SYNC_PREROLLED:  /* Stream is prerolled */
  5261.              /* Now that the producers are prerolled, do a real
  5262.                 start to the stream handlers */
  5263.              break;
  5264.           default:
  5265.              /* Unknown event, do something */
  5266.           }
  5267.        break;
  5268.     default:
  5269.        /* Unknown event, do something */
  5270.     }
  5271.  }
  5272.  
  5273.  
  5274. ΓòÉΓòÉΓòÉ 5.7. DLL Model: File System Stream Handler ΓòÉΓòÉΓòÉ
  5275.  
  5276. The multimedia system provides stream handlers at both system kernel level 
  5277. (Ring 0) as OS/2 PDDs, and at application level (Ring 3) as OS/2 DLLs. The 
  5278. reason for having both types of stream handlers is that while some streams are 
  5279. ideally controlled by a direct connection between the stream handler and a 
  5280. device's PDD, other streams are not associated with a data source or target, 
  5281. which maps physically to a specific device. For example, the File System Stream 
  5282. Handler is a DLL, because all file system I/O functions are available as Ring 3 
  5283. OS/2 API, and service all file system devices. This eliminates the need to 
  5284. build a specific stream handler PDD for every device the file system can 
  5285. access. 
  5286.  
  5287.  
  5288. ΓòÉΓòÉΓòÉ 5.7.1. File System Stream Handler Modules ΓòÉΓòÉΓòÉ
  5289.  
  5290. The following figure illustrates the outline of the file system stream handler 
  5291. (FSSHT.DLL). 
  5292.  
  5293. The descriptions for the sample file system stream handler modules shown in the 
  5294. example in section File System Stream Handler Modules are contained in the 
  5295. following table. 
  5296.  
  5297. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5298. ΓöéProcedure Name ΓöéDescription                                            Γöé
  5299. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5300. ΓöéSHINIT.C       ΓöéReceives control when FSSHT.DLL is loaded and performs Γöé
  5301. Γöé               Γöéthe following functions:                               Γöé
  5302. Γöé               ΓöéDLL_INITTERM  Initialization routine to                Γöé
  5303. Γöé               Γöé              register the stream handler              Γöé
  5304. Γöé               Γöé              with the Sync/Stream Manager             Γöé
  5305. Γöé               Γöé              (SSM), allocate heap memory,             Γöé
  5306. Γöé               Γöé              and create mutex semaphores.             Γöé
  5307. Γöé               ΓöéSHEXITLIST    Termination routine to                   Γöé
  5308. Γöé               Γöé              deregister the stream handler,           Γöé
  5309. Γöé               Γöé              destroy any active streams,              Γöé
  5310. Γöé               Γöé              reload heap memory, and close            Γöé
  5311. Γöé               Γöé              mutex semaphores.                        Γöé
  5312. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5313. ΓöéSHROUTER.C     ΓöéReceives the stream handler command (SHC) messages fromΓöé
  5314. Γöé               ΓöéSSM and routes them to the appropriate low-level       Γöé
  5315. Γöé               Γöéroutines.                                              Γöé
  5316. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5317. ΓöéFSSHASS.C      ΓöéProcesses the SHC_ASSOCIATE stream handler command     Γöé
  5318. Γöé               Γöémessage to associate an object (file handler, CD ROM   Γöé
  5319. Γöé               Γöédrive letter, and so on) with a data stream.           Γöé
  5320. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5321. ΓöéSHEPROT.C      ΓöéProcesses the SHC_ENUMERATE stream handler command     Γöé
  5322. Γöé               Γöémessage to return a list of stream protocols for a     Γöé
  5323. Γöé               Γöégiven stream.                                          Γöé
  5324. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5325. ΓöéSHGPROT.C      ΓöéProcesses the SHC_GET_PROTOCOL stream handler command  Γöé
  5326. Γöé               Γöémessage to return a stream protocol control block      Γöé
  5327. Γöé               Γöé(SPCB) for a given data type.                          Γöé
  5328. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5329. ΓöéSHIPROT.C      ΓöéProcesses the SHC_INSTALL_PROTOCOL stream handler      Γöé
  5330. Γöé               Γöécommand message to install or replace an SPCB for a    Γöé
  5331. Γöé               Γöégiven data type.                                       Γöé
  5332. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5333. ΓöéFSSHCREA.C     ΓöéProcesses the SHC_CREATE stream handler command messageΓöé
  5334. Γöé               Γöéto create a stream instance for a given data type and  Γöé
  5335. Γöé               Γöésubtype. If the create is for a source stream handler, Γöé
  5336. Γöé               Γöéa read thread in FSSHREAD.C is created. Otherwise a    Γöé
  5337. Γöé               Γöéwrite thread is created in FSSHWRIT.C for a target     Γöé
  5338. Γöé               Γöéstream handler.                                        Γöé
  5339. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5340. ΓöéSHNEGOT.C      ΓöéProcesses the SHC_NEGOTIATE_RESULTS stream handler     Γöé
  5341. Γöé               Γöécommand message to save the negotiated SPCB for a givenΓöé
  5342. Γöé               Γöéstream instance.                                       Γöé
  5343. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5344. ΓöéSHSTART.C      ΓöéProcesses the SHC_START stream handler command message Γöé
  5345. Γöé               Γöéto start the data streaming for a given stream         Γöé
  5346. Γöé               Γöéinstance. For a source stream handler, the read thread Γöé
  5347. Γöé               Γöéin FSSHREAD.C is run. For a target stream handler, the Γöé
  5348. Γöé               Γöéwrite thread in FSSHWRIT.C is run.                     Γöé
  5349. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5350. ΓöéSHSTOP.C       ΓöéProcesses the SHC_STOP stream handler command message  Γöé
  5351. Γöé               Γöéto stop the data streaming for a given stream instance.Γöé
  5352. Γöé               ΓöéFor a source stream handler, the read thread in all theΓöé
  5353. Γöé               Γöébuffers is either discarded (STOP DISCARD) or returned Γöé
  5354. Γöé               Γöéto SSM (STOP FLUSH). For a target stream handler, the  Γöé
  5355. Γöé               Γöéwrite thread in FSSHWRIT.C is blocked, with buffers    Γöé
  5356. Γöé               Γöéeither discarded or flushed.                           Γöé
  5357. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5358. ΓöéFSSHSEEK.C     ΓöéProcesses the SHC_SEEK stream handler command message  Γöé
  5359. Γöé               Γöéto seek to a specified point in the stream object. The Γöé
  5360. Γöé               Γöéseek can be from the beginning of the file, the currentΓöé
  5361. Γöé               Γöéposition, or the end o the file. The seek point can be Γöé
  5362. Γöé               Γöéspecified in bytes offset or MMTIME units. This module Γöé
  5363. Γöé               Γöéinterfaces with low-level routines in SEEKCALC.ASM to  Γöé
  5364. Γöé               Γöéperform conversion from MMTIME values to bytes, and    Γöé
  5365. Γöé               Γöéwith mmioSeek to perform the actual seek in the object.Γöé
  5366. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5367. ΓöéSEEKCALC.ASM   ΓöéPerforms the low-level conversions of MMTIME to bytes, Γöé
  5368. Γöé               Γöéand bytes to MMTIME, needed by FSSHSEEK.C.             Γöé
  5369. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5370. ΓöéSHDESTRY.C     ΓöéProcesses the SHC_DESTROY stream handler command       Γöé
  5371. Γöé               Γöémessage to remove a stream instance. Either the read   Γöé
  5372. Γöé               Γöéthread in FSSHREAD.C or the write thread in FSSHWRIT.C Γöé
  5373. Γöé               Γöéis terminated when this message is received.           Γöé
  5374. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5375. ΓöéSHMISC.C       ΓöéSupporting routines used by the other stream handler   Γöé
  5376. Γöé               Γöémodules; for example, searching the stream instance    Γöé
  5377. Γöé               Γöéchain to find a particular stream instance, finding an Γöé
  5378. Γöé               Γöéextended stream protocol control block (SPCB), and     Γöé
  5379. Γöé               Γöédeallocating a stream instance.                        Γöé
  5380. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5381. ΓöéFSSHREAD.C     ΓöéReads an object from the file system. A read thread is Γöé
  5382. Γöé               Γöécreated when the SHC_CREATE message is received in     Γöé
  5383. Γöé               ΓöéFSSHCREA.C and destroyed when the SHC_DESTROY message  Γöé
  5384. Γöé               Γöéis received in SHDESTRY.C. The read is accomplished by Γöé
  5385. Γöé               Γöéinterfacing with a mmioRead routine and low-level      Γöé
  5386. Γöé               Γöéroutines in SHIOUTIL.C to check processing flags and   Γöé
  5387. Γöé               Γöéreport events to SSM.                                  Γöé
  5388. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5389. ΓöéSHIOUTIL.C     ΓöéLow-level routines used by FSSHREAD.C and FSSHWRIT.C   Γöé
  5390. Γöé               Γöémodules. This module performs checks of processing     Γöé
  5391. Γöé               Γöéflags and also reports processing events to SSM.       Γöé
  5392. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5393. ΓöéFSSHDAT.C      ΓöéGlobal data declaration for the stream handler         Γöé
  5394. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5395. Γöémakefile       ΓöéMakefile to build FSSHT.DLL sample file system stream  Γöé
  5396. Γöé               Γöéhandler                                                Γöé
  5397. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5398.  
  5399.  
  5400. ΓòÉΓòÉΓòÉ 5.7.2. Entry Points Diagram ΓòÉΓòÉΓòÉ
  5401.  
  5402. The Sync/Stream Manager DLL exports SPI services to higher-level OS/2 
  5403. multimedia components (such as media drivers) and exports Stream Manager Helper 
  5404. (SMH) messages to support the stream handler DLLs. Additional SMH messages are 
  5405. exported by the SSM device driver to stream handler device drivers using 
  5406. standard OS/2 inter-device driver communication (IDC) interfaces (established 
  5407. using DevHelp_AttachDD). 
  5408.  
  5409.  
  5410. ΓòÉΓòÉΓòÉ 5.7.3. SMHEntryPoint ΓòÉΓòÉΓòÉ
  5411.  
  5412. The Stream Manager Helper (SMH) messages are exported for use by both device 
  5413. driver and DLL stream handlers through the SMHEntryPoint. The stream handlers 
  5414. use these helper routines to register with the Sync/Stream Manager, report 
  5415. events and synchronization cues, and request or return buffers. They are 
  5416. synchronous calls and are available to Ring 3 DLL stream handlers as a DLL call 
  5417. (Ring 0 stream handlers as an IDC call). 
  5418.  
  5419.  
  5420. ΓòÉΓòÉΓòÉ 5.7.4. SHCEntryPoint ΓòÉΓòÉΓòÉ
  5421.  
  5422. As illustrated in the following example, a DLL stream handler implements 
  5423. function through an additional entry point. DLL stream handlers must supply an 
  5424. interface to communicate with the Sync/Stream Manager. This interface, called 
  5425. the stream handler command (SHC) interface, exports stream handler commands 
  5426. (SHCs) for use by the Sync/Stream Manager to set up and control data streams. 
  5427. These SHCs are accessible through a single entry point, SHCEntryPoint. 
  5428.  
  5429. RC ShcRouter(pshc)
  5430. PSHC_COMMON pshcNow;
  5431.  
  5432. { /* Start of ShcRouter */
  5433.  
  5434. RC rc = NO_ERROR;                       /* local return code */
  5435.   switch (pshc->ulFunction)
  5436.   {
  5437.     case SHC_ASSOCIATE:
  5438.          {
  5439.            rc = ShcAssociate((PPARM_ASSOC)pshcNow);
  5440.            break;
  5441.          }
  5442.     case SHC_CREATE:
  5443.          {
  5444.            rc = ShcCreate((PPARM_CREATE)pshcNow);
  5445.            break;
  5446.          }
  5447.     case SHC_DESTROY:
  5448.          {
  5449.            rc = ShcDestroy((PPARM_DESTROY)pshcNow);
  5450.            break;
  5451.          }
  5452.     case SHC_SEEK:
  5453.          {
  5454.            rc = ShcSeek((PPARM_SEEK)pshcNow);
  5455.            break;
  5456.          }
  5457.     case SHC_START:
  5458.          {
  5459.            rc = ShcStart((PPARM_START)pshcNow);
  5460.            break;
  5461.          }
  5462.     case SHC_STOP:
  5463.          {
  5464.            rc = ShcStop((PPARM_STOP)pshcNow);
  5465.            break;
  5466.          }
  5467.     case SHC_GET_PROTOCOL:
  5468.          {
  5469.            rc = ShcGetProtocol((PPARM_GPROT)pshcNow);
  5470.            break;
  5471.          }
  5472.     case SHC_INSTALL_PROTOCOL:
  5473.          {
  5474.            rc = ShcInstallProtocol((PPARM_INSTPROT)pshcNow);
  5475.            break;
  5476.          }
  5477.     case SHC_ENUMERATE_PROTOCOLS:
  5478.          {
  5479.            rc = ShcEnumerateProtocols((PPARM_ENUMPROT)pshcNow);
  5480.            break;
  5481.          }
  5482.     case SHC_NEGOTIATE_RESULT:
  5483.          {
  5484.            rc = ShcNegotiateResult((PPARM_NEGOTIATE)pshcNow);
  5485.            break;
  5486.          }
  5487.     default:
  5488.          {
  5489.            rc = ERROR_INVALID_FUNCTION;
  5490.            break;
  5491.          }
  5492.   } /* endswitch */
  5493.  
  5494.   return(rc);
  5495.  
  5496. } /* End of ShcRouter */
  5497.  
  5498.  
  5499. ΓòÉΓòÉΓòÉ 5.7.5. DLL Initialization ΓòÉΓòÉΓòÉ
  5500.  
  5501. The following example illustrates a DLL stream handler's initialization 
  5502. process. During initialization, the stream handler must perform any global DLL 
  5503. initialization the first time the DLL is loaded and perform any instance 
  5504. initialization for each instance of the stream handler DLL. Each instance of 
  5505. the DLL represents a process. The stream handler must register itself with the 
  5506. Sync/Stream Manager during global initialization. The stream handler should 
  5507. also register an exit-list routine if any is required for DLL termination. 
  5508.  
  5509. ULONG _DLL_InitTerm( HMODULE hmod, ULONG fTerm)
  5510.  
  5511. { /* Start of ShInit */
  5512.  
  5513. RC rc = NO_ERROR;                       /* local return code */
  5514. PARM_REG smhRegParm;                    /* Parameters for SMH_REGISTER */
  5515. int Registered = FALSE;
  5516. int HeapAllocated_Attached = FALSE;
  5517. int GlobDataMtxCreated = FALSE;
  5518. hmod;
  5519.  
  5520.   /*
  5521.    * Checking this parameter will insure that this routine will only
  5522.    * be run on an actual initialization.  Return success from the
  5523.    * termination.
  5524.    */
  5525.  
  5526.   if (fTerm)
  5527.      {
  5528.      return (1L);
  5529.      }
  5530.  
  5531.   if (_CRT_init())
  5532.      {
  5533.      return (0L);
  5534.      }
  5535.  
  5536.   /*
  5537.    * Get the semaphore controlling the process count and update the process
  5538.    * count if successful.  Then after we have the sem, if the count is 1,
  5539.    * we are guaranteed that we must do the global initializations.
  5540.    *
  5541.    * There is a problem.  To determine if we need to create or open the
  5542.    * semaphore, we need to check the ProcessCount to see if this is the
  5543.    * first process.  But since we don't have the semaphore, we don't have
  5544.    * a guarantee the count won't change.  If we get caught in this window
  5545.    * then we will fail to get the semaphore and the rc will indicate error.
  5546.   */
  5547.  
  5548.   if (ulProcessCount == 0)
  5549.     { /* First process */
  5550.  
  5551.       if (!(rc = DosCreateMutexSem(pszProcCntMutexName,
  5552.                                    &hmtxProcCnt,
  5553.                                    0L,
  5554.                                    TRUE)))
  5555.         {
  5556.           ulProcessCount++;
  5557.         }
  5558.     } /* First process */
  5559.   else
  5560.     { /* not first process */
  5561.       /* if a process exits and decrements ProcessCount before we get  */
  5562.       /* the semaphore here, we will fail. */
  5563.       if (!(rc = DosOpenMutexSem(pszProcCntMutexName,
  5564.                                  &hmtxProcCnt)))
  5565.         {
  5566.           if (!(rc = DosRequestMutexSem(hmtxProcCnt,
  5567.                                         SEM_INDEFINITE_WAIT)))
  5568.             {
  5569.               ulProcessCount++;
  5570.             }
  5571.           else
  5572.             {
  5573.               DosCloseMutexSem(hmtxProcCnt);
  5574.             }
  5575.         }
  5576.     } /* not first process */
  5577.  
  5578.   if (!rc)
  5579.   { /* Semaphore ok, In critical section */
  5580.     /*
  5581.      * If this is the first time this init routine is called then we are
  5582.      * being brought in by the loader the first time, so we need to
  5583.      * register with the SSM.
  5584.      */
  5585.     if (ulProcessCount == 1)
  5586.       { /* First process */
  5587.         smhRegParm.ulFunction = SMH_REGISTER;
  5588.         smhRegParm.pszSHName = pszHandlerName;
  5589.         smhRegParm.phidSrc = &SrcHandlerID;
  5590.         smhRegParm.phidTgt = &TgtHandlerID;
  5591.         smhRegParm.pshcfnEntry = ( PSHCFN ) ShcRouter;
  5592.  
  5593.         smhRegParm.ulFlags = 0L;
  5594.         if (ulHandlerFlags & HANDLER_CAN_BE_SOURCE)
  5595.           {
  5596.             smhRegParm.ulFlags = REGISTER_SRC_HNDLR;
  5597.           }
  5598.         if (ulHandlerFlags & HANDLER_CAN_BE_TARGET)
  5599.           {
  5600.             smhRegParm.ulFlags |= REGISTER_TGT_HNDLR;
  5601.           }
  5602.         if (ulHandlerFlags & HANDLER_IS_NONSTREAMING)
  5603.           {
  5604.             smhRegParm.ulFlags |= REGISTER_NONSTREAMING;
  5605.           }
  5606.         rc = SMHEntryPoint((PVOID)&smhRegParm);
  5607.         /*
  5608.          * If ok then allocate our memory pool (heap), since it is under
  5609.          * semaphore control create and get the semaphore first.
  5610.          */
  5611.         if (!rc)
  5612.           { /* Register ok */
  5613.             Registered = TRUE;
  5614.             hHeap = HhpCreateHeap(HEAPSIZE,
  5615.                                   HH_SHARED);
  5616.             if (hHeap)
  5617.               { /* Heap Allocated */
  5618.                 HeapAllocated_Attached = TRUE;
  5619.                 if (!(rc = DosCreateMutexSem(NULL,
  5620.                                              &hmtxGlobalData,
  5621.                                              DC_SEM_SHARED,
  5622.                                              FALSE)))
  5623.                   {
  5624.                     GlobDataMtxCreated = TRUE;
  5625.                   }
  5626.               } /* Heap Allocated */
  5627.             else
  5628.               { /* Heap not allocated */
  5629.                 rc = ERROR_ALLOC_RESOURCES;
  5630.               } /* Heap not allocated */
  5631.           } /* Register ok */
  5632.       } /* First Process */
  5633.     else
  5634.       { /* Not first process */
  5635.         if (!(rc = DosOpenMutexSem(NULL,
  5636.                                    &hmtxGlobalData)))
  5637.           { /* Global data semaphore opened */
  5638.  
  5639.             GlobDataMtxCreated = TRUE;
  5640.  
  5641.             if (!ENTERCRIT(rc))
  5642.               { /* Global Data Sem obtained */
  5643.  
  5644.                 if (HhpAccessHeap(hHeap, HhpGetPID()))
  5645.                   { /* Error accessing heap */
  5646.                     rc = ERROR_ALLOC_RESOURCES;
  5647.                   } /* Error accessing heap */
  5648.                 else
  5649.                   { /* Heap attached */
  5650.                     HeapAllocated_Attached = TRUE;
  5651.                   } /* Heap attached */
  5652.  
  5653.                 EXITCRIT;
  5654.  
  5655.               } /* Global Data Sem obtained */
  5656.           } /* Global data semaphore opened */
  5657.       } /* Not first process */
  5658.  
  5659.     /*
  5660.      * If things are ok, Register an exit list handler and if that works
  5661.      * increment the process count.
  5662.      */
  5663.     if (!rc)
  5664.       {
  5665.         rc = DosExitList(EXTLSTADD_ORDER,
  5666.                          (PFNEXITLIST)ShExitList);
  5667.       }
  5668.  
  5669.     if (rc)
  5670.       { /* Error occurred - Clean Up */
  5671.         if (HeapAllocated_Attached)
  5672.           {
  5673.             HhpReleaseHeap(hHeap,
  5674.                            HhpGetPID());
  5675.           }
  5676.         if (GlobDataMtxCreated)
  5677.           {
  5678.             DosCloseMutexSem(hmtxGlobalData);
  5679.           }
  5680.         if (Registered)
  5681.           { /* Deregister */
  5682.             PARM_DEREG smhDeregParm;
  5683.  
  5684.             smhDeregParm.ulFunction = SMH_DEREGISTER;
  5685.             smhDeregParm.pszSHName = pszHandlerName;
  5686.             SMHEntryPoint(&smhDeregParm);
  5687.           } /* Deregister */
  5688.         ulProcessCount--;
  5689.         DosReleaseMutexSem(hmtxProcCnt);
  5690.         DosCloseMutexSem(hmtxProcCnt);
  5691.       } /* Error occurred - Clean Up */
  5692.     else
  5693.       {
  5694. #ifdef MMRAS_PTRACE
  5695.         InitPTrace()
  5696. #endif
  5697.         DosReleaseMutexSem(hmtxProcCnt);
  5698.       }
  5699.  
  5700.   } /* Semaphore ok, In critical section */
  5701.   /*
  5702.    * The return codes expected are:
  5703.    *  TRUE (any non-zero) - init routine worked
  5704.    *  FALSE (zero)        - init routine failed
  5705.    *
  5706.    * So we have to reverse the local rc before we pass it back.
  5707.    */
  5708.   return(!rc);
  5709.  
  5710. } /* End of SHInit */
  5711.  
  5712. The stream event handling logic in the DLL stream handlers is essentially the 
  5713. same as in device driver stream handlers. The only significant difference is 
  5714. that stream events are detected and reported at task time in a DLL, rather than 
  5715. at interrupt time as in the case with device drivers 
  5716.  
  5717. #include        "os2.h"
  5718. #include        "os2me.h"
  5719.  
  5720.   RC            rc;                    /* Error return code            */
  5721.   HID           hidSource;             /* Source handler ID            */
  5722.   TIME_EVCB     timeevcb;              /* Cuepoint event control block */
  5723.   HEVENT        hevent;                /* time event handle            */
  5724.   HSTREAM       hstream;               /* Stream handle                */
  5725.   HID           hid;                   /* Handler ID                   */
  5726.   PARM_EVENT    parm_event;            /* Report event parameter block */
  5727.   MMTIME        mmtimeCurrent;         /* Current stream time          */
  5728.   PSMHFN        SMHEntryPoint;         /* Pointer to SMH entry point   */
  5729.  
  5730. /*-------------------------------------------------------------------*/
  5731. /*  Report an event.                                                 */
  5732. /*-------------------------------------------------------------------*/
  5733.   parm_event.ulFunction = SMH_REPORTEVENT;     /* Set function         */
  5734.   parm_event.hid = hidSource;                  /* Source handler ID    */
  5735.   parm_event.hevent = hevent;                  /* Event handle         */
  5736.   parm_event.pevcbEvent = (PEVCB) &timeevcb;   /* Pointer to Time EVCB */
  5737.  
  5738.   timeevcb.ulType = EVENT_CUE_TIME;            /* Set event type       */
  5739.   timeevcb.hstream = hstream;                  /* Set stream handle    */
  5740.   timeevcb.hid = hid;                          /* Set handler ID       */
  5741.   timeevcb.ulStatus = 0;                       /* No status            */
  5742.   timeevcb.mmtimeStream = mmtimeCurrent;       /* Set current time     */
  5743.  
  5744.   if (rc = SMHEntryPoint (&parm_event))
  5745.      return(rc);                               /* Error! */
  5746.  
  5747.  
  5748. ΓòÉΓòÉΓòÉ 5.7.6. Synchronization ΓòÉΓòÉΓòÉ
  5749.  
  5750. DLL stream handlers can process sync pulses as either a master or slave stream. 
  5751. A master of a sync group must have the SPCBHAND_GENSYNC or the SPCBHAND_NOSYNC 
  5752. bits set in the SPCB that is returned to the SSM on the SHC_CREATE call. 
  5753. Otherwise, the stream handler cannot be a master. 
  5754.  
  5755. If you would like to create a stream handler that can generate sync pulses, you 
  5756. must either use a hardware device (such as an audio card) to generate timing 
  5757. interrupts at a fixed rate, or use the OS/2 timer services such as the OS/2 
  5758. device driver SetTimer DevHelp or the OS/2 DosAsyncTimer functions. You can 
  5759. then call GetDOSVar to query the address of the global information segment 
  5760. structure (GlobalInfoSeg). This allows you to get the real time so that you can 
  5761. detect missed timing messages. For further information, refer to the Physical 
  5762. Device Driver Reference for OS/2. 
  5763.  
  5764. Note:  We provide the architecture for synchronization. The audio stream 
  5765.        handler can be a master (generate sync pulses). The audio stream handler 
  5766.        can also be a slave, but it does not support the ability to 
  5767.        re-synchronize to a master stream. 
  5768.  
  5769.   /************************************************************************/
  5770.   /* Master                                                               */
  5771.   /* Synchronization - If we are the master stream, then report the       */
  5772.   /*                   current time to the Sync/Stream Manager so that    */
  5773.   /*                   it can be distributed to any slave streams.        */
  5774.   /*                                                                      */
  5775.   /************************* END OF SPECIFICATIONS ************************/
  5776.   PARM_EVENT  parmevent;               /* parms for SMH_NOTIFY calls    */
  5777.   SYNC_EVCB   syncevcb;                /* Cuepoint event control block  */
  5778.  
  5779.   if (psib->ulStatus & STREAM_MASTER_SYNC) {
  5780.      parm_event.ulFunction = SMH_REPORTEVENT;     /* Set function         */
  5781.      parm_event.hid = psib->HandlerID;            /* Source handler ID    */
  5782.      parm_event.hevent = hevent;                  /* Event handle         */
  5783.      parm_event.pevcbEvent = (PEVCB) &syncevcb;   /* Pointer to Sync EVCB */
  5784.      syncevcb.ulType = EVENT_CUE_TIME;            /* Set event type       */
  5785.      syncevcb.hstream = psib->hStream;            /* Set stream handle    */
  5786.      syncevcb.hid = hid;                          /* Set handler ID       */
  5787.      syncevcb.ulStatus = 0;                       /* No status            */
  5788.      syncevcb.mmtimeStream = mmtimeCurrent;       /* Set current time     */
  5789.  
  5790.      if (rc = SMHEntryPoint (&parm_event))
  5791.         return(rc);                               /* Error! */
  5792.  
  5793.      }
  5794.  
  5795.   /***********************************************************************/
  5796.   /* Slave                                                               */
  5797.   /* Synchronization - If we are the slave stream, then update the slave */
  5798.   /*                   time and determine if this slave stream is        */
  5799.   /*                   too slow or too fast with respect to the master   */
  5800.   /*                   stream.                                           */
  5801.   /*                                                                     */
  5802.   /************************ END OF SPECIFICATIONS ************************/
  5803.  
  5804.   if ((pSTREAM)->ulStateFlg & STREAM_SLAVE_SYNC) {
  5805.           (pSTREAM)->SyncEvcb.mmtimeSlave = mmtimeCurrStreamTime;
  5806.           if ((pSTREAM)->SyncEvcb.ulStatus & SYNCPOLLING) {
  5807.                if (mmtimeCurrStreamTime > (pSTREAM)->SyncEvcb.mmtimeMaster)
  5808.                        /* I need to slow my stream */
  5809.                        ;
  5810.                if (mmtimeCurrStreamTime < (pSTREAM)->SyncEvcb.mmtimeMaster)
  5811.                        /* I need to speed up my stream */
  5812.                        ;
  5813.           }
  5814.  
  5815.  
  5816. ΓòÉΓòÉΓòÉ 5.7.7. Worker Thread Creation ΓòÉΓòÉΓòÉ
  5817.  
  5818. Stream handler DLLs create worker threads for each stream created. A worker 
  5819. thread, for example, would consist of code to request a buffer from the 
  5820. Sync/Stream Manager, fill it with data from a device and return it to the 
  5821. Sync/Stream Manager. This would continue until the end of stream or until some 
  5822. other kind of stream stop. 
  5823.  
  5824. A worker thread does all the work of the stream handler itself. It is a good 
  5825. idea to create a worker thread for each stream instance. Basically, a worker 
  5826. thread either loops in the read routine or loops in the write routine. This 
  5827. depends on whether it is a source or target. If it is a source, the thread 
  5828. loops in the read routine and reads from its device using whatever commands it 
  5829. uses to interface with its device. It also interfaces with the Sync/Stream 
  5830. Manager requesting empty buffers and returning full buffers. On the other hand, 
  5831. when the DLL stream handler is the target, the thread will also be in a big 
  5832. loop, but it is performing different operations. It will be requesting full 
  5833. buffers from the Sync/Stream Manager and then consuming those buffers by 
  5834. passing them off to the device (in whatever way it communicates with its 
  5835. device). 
  5836.  
  5837. #include <os2.h>
  5838. #include <os2me.h>
  5839. #include <hhpheap.h>
  5840. #include <shi.h>
  5841.  
  5842. PSIB psib;                              /* Stream Instance Block */
  5843.  
  5844. { /* Start of FsshRead */
  5845.  
  5846. RC          rc = NO_ERROR;              /* local return code */
  5847. char        NeedBuf;                    /* local loop Boolean */
  5848. LONG        NumBytesIO;                 /* Number of bytes from mmio */
  5849. PARM_NOTIFY npget, npret;               /* parms for SMH_NOTIFY calls */
  5850. SRCBUFTAB   SrcBufTab = {0};            /* Source buffer table */
  5851. ULONG       ulStopped = DO_SLEEP;       /* did we get stop disc or flush */
  5852. BOOL        bAtEOS = FALSE;             /* End of Stream indicator */
  5853. ULONG       ulPostCount;                /* Temp to hold count */
  5854.  
  5855.   /* Before we start lets do some init stuff: */
  5856.  
  5857.   npget.ulFunction = SMH_NOTIFY;
  5858.   npget.hid = psib->HandlerID;
  5859.   npget.hstream = psib->hStream;
  5860.   npget.ulGetNumEntries = 1L;
  5861.   npget.ulRetNumEntries = 0L;
  5862.   npget.pGetBufTab = &SrcBufTab;
  5863.   npget.pRetBufTab = NULL;
  5864.  
  5865.   npret.ulFunction = SMH_NOTIFY;
  5866.   npret.hid = psib->HandlerID;
  5867.   npret.hstream = psib->hStream;
  5868.   npret.ulFlags = BUF_RETURNFULL;
  5869.   npret.ulGetNumEntries = 0L;
  5870.   npret.ulRetNumEntries = 1L;
  5871.   npret.pGetBufTab = NULL;
  5872.   npret.pRetBufTab = &SrcBufTab;
  5873.  
  5874.   /* Wait until we get the ShcStart */
  5875.  
  5876.   DosWaitEventSem(psib->hevStop, SEM_INDEFINITE_WAIT);
  5877.  
  5878.   /* We will loop forever getting an empty buffer, calling the device to */
  5879.   /* fill up the buffer, sending it to the consumer.  During each        */
  5880.   /* iteration of the loop we will check the action flags for            */
  5881.   /* asynchronous requests to do things.                                 */
  5882.  
  5883.   if (psib->ulActionFlags & SIBACTFLG_KILL)
  5884.     { /* Must have been a create error */
  5885.       rc = 1L;
  5886.     } /* Must have been a create error */
  5887.  
  5888.   /*  Start the main loop */
  5889.  
  5890.   while (!rc)
  5891.     { /* while no severe error */
  5892.  
  5893.     if (psib->ulActionFlags)
  5894.       rc = CheckNSleep(psib);
  5895.  
  5896.     /*
  5897.      * Get a buffer
  5898.      */
  5899.     NeedBuf = TRUE;
  5900.     while ((NeedBuf) && (!rc))
  5901.       { /* while we don't have a buffer */
  5902.  
  5903.       /* Clear the stop sem, so if after we call ssm to get a buffer if */
  5904.       /* it returns none avail then we won't miss a SSMBuffer Start     */
  5905.       /* before we go to sleep.                                         */
  5906.         DosResetEventSem(psib->hevStop, &ulPostCount);
  5907.  
  5908.         npget.ulFlags = BUF_GETEMPTY;
  5909.         rc = SMHEntryPoint(&npget); /* get a buffer */
  5910.         if (!rc)
  5911.           {
  5912.             NeedBuf = FALSE;
  5913.          /* make sure attribute is 0 so we don't pass around a bad value */
  5914.             SrcBufTab.ulMessageParm = 0L;
  5915.           }
  5916.         else
  5917.           { /* return code from smhnotify */
  5918.             if (rc == ERROR_BUFFER_NOT_AVAILABLE)
  5919.               { /* buffer not available */
  5920.  
  5921.             /* the smhnotify resets the num entries to 0 when none avail */
  5922.                 npget.ulGetNumEntries = 1L;
  5923.  
  5924.                 ulStopped = DO_SLEEP;
  5925.                 rc = SleepNCheck(psib, &ulStopped);
  5926.  
  5927.               } /* buffer not available */
  5928.           } /* return code from smhnotify */
  5929.       } /* while we don't have a buffer */
  5930.  
  5931.     /* We have a buffer or an error */
  5932.  
  5933.     if (!rc)
  5934.       { /* have a buffer - do the read */
  5935.  
  5936.         NumBytesIO = mmioRead((HMMIO)psib->ulAssocP1,
  5937.                                 (PCHAR)SrcBufTab.pBuffer,
  5938.                                 (LONG)SrcBufTab.ulLength);
  5939.  
  5940.         if (NumBytesIO == -1L)
  5941.           { /* an error */
  5942.  
  5943.             SrcBufTab.ulLength = 0L;
  5944.             /* get the real error code */
  5945.             rc = mmioGetLastError((HMMIO)psib->ulAssocP1);
  5946.  
  5947.             rc = ShIOError(psib, npret, rc);
  5948.  
  5949.           } /* an error */
  5950.         else
  5951.           { /* We have some data */
  5952.  
  5953.             if (NumBytesIO != (LONG)SrcBufTab.ulLength)
  5954.               { /* End of stream */
  5955.                 npret.ulFlags |= BUF_EOS;
  5956.                 bAtEOS = TRUE;
  5957.                 DosResetEventSem(psib->hevStop, &ulPostCount);
  5958.                 SrcBufTab.ulLength = NumBytesIO;
  5959.               } /* End of stream */
  5960.  
  5961.             /* Send the data to the stream manager */
  5962.  
  5963.             rc = SMHEntryPoint(&npret);
  5964.             if (!rc)
  5965.               { /* data sent ok */
  5966.                 if (bAtEOS)
  5967.                   {
  5968.                     bAtEOS = FALSE;
  5969.                     ulStopped = DO_SLEEP;
  5970.                     rc = SleepNCheck(psib, &ulStopped);
  5971.                   }
  5972.               } /* data sent ok */
  5973.           } /* We have some data */
  5974.  
  5975.         /* Clear the EOS if it was set. And attribute */
  5976.         npret.ulFlags = BUF_RETURNFULL;
  5977.         SrcBufTab.ulMessageParm = 0L;
  5978.  
  5979.       } /* have a buffer - do the read */
  5980.  
  5981.     } /* while no severe error */
  5982.  
  5983.   /* We get here if an error has occurred or a kill has */
  5984.   /*  been sent.  In the case of the kill, reset the */
  5985.   /*  return code to 0 (no error) and exit the thread. */
  5986.   /*  Otherwise, report the error event and exit the */
  5987.   /*  thread. */
  5988.  
  5989.   if (psib->ulActionFlags & SIBACTFLG_KILL)
  5990.     {
  5991.       rc = 0L;
  5992.     }
  5993.   else
  5994.     {
  5995.       ReportEvent(psib,
  5996.                   rc,                   /* Return code */
  5997.                   EVENT_ERROR,          /* event type */
  5998.                   0L,                   /* user info */
  5999.                   NONRECOVERABLE_ERROR);  /* Severe Error */
  6000.     }
  6001.  
  6002.   /* Only set this flag when we no longer need access to the sib since */
  6003.   /* Destroy may get control and Free the sib. */
  6004.  
  6005.   psib->ulActionFlags |= SIBACTFLG_THREAD_DEAD;
  6006.   return;
  6007.  
  6008. } /* End of FsshRead */
  6009.  
  6010.  
  6011. ΓòÉΓòÉΓòÉ 5.8. Device Driver Model: Video PDD ΓòÉΓòÉΓòÉ
  6012.  
  6013. A device driver stream handler is used as a source handler at the Ring 0 level. 
  6014. It interfaces with the Sync/Stream Manager to get or return stream data 
  6015. buffers. The stream handler also interfaces with the hardware's physical device 
  6016. driver (PDD) to give or receive data buffer pointers. The purpose of the stream 
  6017. handler is to alleviate the media driver from the task of sending a data stream 
  6018. to the PDD. Instead, the media driver issues function calls to the SSM to 
  6019. initiate a stream. In turn, the SSM requests the stream handlers to regulate 
  6020. the proper stream flow without intervention from the application. 
  6021.  
  6022. Device driver stream handlers include two main entry points - SMHEntryPoint and 
  6023. DDCMDEntryPoint. 
  6024.  
  6025.  
  6026. ΓòÉΓòÉΓòÉ 5.8.1. SMHEntryPoint ΓòÉΓòÉΓòÉ
  6027.  
  6028. Device driver stream handlers send Stream Manager Helper (SMH) routines to the 
  6029. SSM through the SMHEntryPoint. The stream handlers use these helper routines to 
  6030. register with the Sync/Stream Manager, report events and synchronization cues, 
  6031. and to request or return buffers. This interface is created using the standard 
  6032. inter-device driver communication (IDC) approach, established by the AttachDD 
  6033. DevHelp function during initialization processing. 
  6034.  
  6035.  
  6036. ΓòÉΓòÉΓòÉ 5.8.2. DDCMDEntryPoint ΓòÉΓòÉΓòÉ
  6037.  
  6038. Device driver stream handlers communicate with the hardware PDD through the 
  6039. DDCMDEntryPoint. This is accomplished through the use of device driver commands 
  6040. (DDCMDs), which allow a stream handler to request a PDD to perform functions 
  6041. such as starting, stopping, or resuming a device. This interface uses the IDC 
  6042. mechanism provided by the ATTACHDD DevHelp function. The stream handler must 
  6043. attach to the device driver to receive the DDCMD entry point address of the 
  6044. device driver. This function is performed before issuing device driver 
  6045. commands. 
  6046.  
  6047.  
  6048. ΓòÉΓòÉΓòÉ 5.8.3. SHCEntryPoint ΓòÉΓòÉΓòÉ
  6049.  
  6050. As illustrated in the following example, a device driver stream handler 
  6051. implements function through two additional entry points:  SHCEntryPoint and 
  6052. SHDEntryPoint. 
  6053.  
  6054. Device driver stream handlers receive commands from the Sync/Stream Manager to 
  6055. initialize and perform streaming functions. These stream handler commands 
  6056. (SHCs) are accessible through a single entry point, SHCEntryPoint. The main 
  6057. routine is an IDC interface with the Sync/Stream Manager Device Driver. The SSM 
  6058. calls the device driver stream handler by issuing stream programming interface 
  6059. (SPI) functions such as SpiCreateStream, SpiStartStream, and SpiStopStream. 
  6060.  
  6061. The following example illustrates the code implementation of the SHCEntryPoint. 
  6062.  
  6063. RC  DDCMDEntryPoint(PDDCMDCOMMON pCommon); /* PDD entry point from SH */
  6064. RC  SHDEntryPoint(PSHD_COMMON pCommon);    /* SH entry point from PDD */
  6065. RC  SHCEntryPoint(PSHC_COMMON pCommon);    /* SH entry point from SSM */
  6066. RC  SMHEntryPoint(PSHC_COMMON pCommon);    /* SSM entry point from SH */
  6067.  
  6068. ULONG   (*ShcFuncs[])(PVOID pCommon) = {   /* SHC function jump table */
  6069.                 SHCAssociate,                   /* 0 */
  6070.                 SHCClose,                       /* 1 */
  6071.                 SHCCreate,                      /* 2 */
  6072.                 SHCDestroy,                     /* 3 */
  6073.                 SHCStart,                       /* 4 */
  6074.                 SHCStop,                        /* 5 */
  6075.                 SHCSeek,                        /* 6 */
  6076.                 SHCEnableEvent,                 /* 7 */
  6077.                 SHCDisableEvent,                /* 8 */
  6078.                 SHCEnableSync,                  /* 9 */
  6079.                 SHCDisableSync,                 /* 10 */
  6080.                 SHCGetTime,                     /* 11 */
  6081.                 SHCGetProtocol,                 /* 12 */
  6082.                 SHCInstallProtocol,             /* 13 */
  6083.                 SHCEnumerateProtocols,          /* 14 */
  6084.                 SHCNegotiateResult              /* 15 */
  6085.                 };
  6086. USHORT  MaxShcFuncs = sizeof(ShcFuncs)/sizeof(USHORT);
  6087.  
  6088. /**********************************************************************/
  6089.  
  6090. RC      SHCEntryPoint(pCommon)
  6091. PSHC_COMMON     pCommon;
  6092. {
  6093.       if (pCommon->ulFunction > (ULONG)MaxShcFuncs)
  6094.               return(ERROR_INVALID_FUNCTION);
  6095.                                           /* Check for valid function */
  6096.  
  6097. return(ShcFuncs[pCommon->ulFunction](pCommon));
  6098. }                                         /* Call SHC message         */
  6099.  
  6100. /**********************************************************************/
  6101.  
  6102. RC SHCStart(PPARM_START pStart)
  6103. {
  6104.    PSTREAM         pSTREAM;             /* Ptr to current stream */
  6105.    DDCMDREADWRITE  DDCMDReadWrite;
  6106.    DDCMDCONTROL    DDCMDControl;
  6107.    ulRC            rc;                  /* Return code           */
  6108.  
  6109.  
  6110.    if (rc = GetStreamEntry(&pSTREAM, pStart->hstream))
  6111.                 return(rc);
  6112.  
  6113.    EnterCritSec;                           /* Disable interrupts */
  6114.  
  6115.  
  6116.    switch (pSTREAM->ulStateFlg) {
  6117.      case STREAM_RUNNING:
  6118.          /*********************************************************/
  6119.          /* Get a full buffer for playback                        */
  6120.          /*********************************************************/
  6121.          ParmNotify.ulFunction = SMH_NOTIFY;
  6122.          ParmNotify.hid = pSTREAM->hid;
  6123.          ParmNotify.hstream = pSTREAM->hStream;
  6124.          ParmNotify.ulGetNumEntries = 1;
  6125.          ParmNotify.ulRetNumEntries = 0;
  6126.          ParmNotify.pGetBufTab = &(pSTREAM->BufTab.aBufTab[usBufTabIndex]);
  6127.          ParmNotify.pRetBufTab = NULL;
  6128.          ParmNotify.ulFlags = BUF_GETFULL;
  6129.          SMHEntryPoint(&ParmNotify);
  6130.  
  6131.          /**********************************************************/
  6132.          /* Send full buffer to device (PDD)                       */
  6133.          /**********************************************************/
  6134.  
  6135.          DDCMDReadWrite.hStream = (*ppSTREAM)->hStream;
  6136.          DDCMDReadWrite.ulFunction = DDCMD_WRITE;
  6137.          DDCMDReadWrite.pBuffer = pCurrentBufTab->pBuffer;
  6138.          DDCMDReadWrite.ulBufferSize = pCurrentBufTab->ulLength;
  6139.          rc = (*pSTREAM->pDDCMDEntryPoint)(&DDCMDReadWrite);
  6140.  
  6141.          /*********************************************************/
  6142.          /* Start the device                                      */
  6143.          /*********************************************************/
  6144.  
  6145.          DDCMDControl.ulFunction = DDCMD_CONTROL;
  6146.          DDCMDControl.hStream = pSTREAM->hStream;
  6147.          DDCMDControl.pParm = NULL;
  6148.          DDCMDControl.ulParmSize = NULL;
  6149.          DDCMDControl.ulCmd = DDCMD_START;
  6150.          rc = (*pSTREAM->pDDCMDEntryPoint)(&DDCMDControl);
  6151.          break;
  6152.  
  6153.     }
  6154.     ExitCritSec;
  6155.         return(rc);
  6156. }
  6157.  
  6158.  
  6159. ΓòÉΓòÉΓòÉ 5.8.4. SHDEntryPoint ΓòÉΓòÉΓòÉ
  6160.  
  6161. Device driver stream handlers receive commands from PDDs to report events and 
  6162. interrupts. These stream handler device (SHD) helper commands are provided 
  6163. through the SHDEntryPoint. This entry point is specifically used for the PDD to 
  6164. call back to the stream handler. For example, the PDD can send an 
  6165. SHD_REPORT_INT command to the stream handler to report status, indicate that a 
  6166. buffer is full, or specify that an additional buffer is required. 
  6167.  
  6168. The following example illustrates the code implementation of the SHDEntryPoint. 
  6169.  
  6170. ULONG   (*ShdFuncs[])(PVOID pCommon) = {  /* SHD message jump table */
  6171.                         SHDReportInt,                   /* 0 */
  6172.                         SHDReportEvent                  /* 1 */
  6173.                         };
  6174.  
  6175. USHORT  MaxShdFuncs = sizeof(ShdFuncs)/sizeof(USHORT);
  6176. /*************************************************************************/
  6177.  
  6178. RC SHDEntryPoint(pCommon)
  6179. PSHD_COMMON     pCommon;
  6180. {
  6181.       if (pCommon->ulFunction > (ULONG)MaxShdFuncs)
  6182.  
  6183.              return(ERROR_INVALID_FUNCTION); /* Check for valid function */
  6184.  
  6185.       return(ShdFuncs[pCommon->ulFunction](pCommon));
  6186. }                                            /* Call SHC message         */
  6187.  
  6188. /*************************************************************************/
  6189.  
  6190.  
  6191. ΓòÉΓòÉΓòÉ 5.8.5. Event Detection ΓòÉΓòÉΓòÉ
  6192.  
  6193. A device driver stream handler must be able to keep track of time to detect 
  6194. events. Timing is important to know when the stream starts and stops, and when 
  6195. to report certain cue time events. There are two methods you can implement to 
  6196. detect events. They are: 
  6197.  
  6198.      Request the PDD to monitor the time for use. 
  6199.      Implement an algorithm that constantly monitors real-time. 
  6200.  
  6201.  
  6202. ΓòÉΓòÉΓòÉ 5.8.5.1. PDD Monitors the Time ΓòÉΓòÉΓòÉ
  6203.  
  6204. The first and most accurate method of event detection is to retrieve the time 
  6205. from the actual physical device. Interfaces are provided through the use of 
  6206. DDCMD_STATUS, which requests the current stream time from the physical device 
  6207. driver. When an application requests an event, the stream handler issues a 
  6208. DDCMD_STATUS command to the PDD to detect the event time. (There are also 
  6209. additional DDCMD messages that allow the PDD to inform the stream handler of 
  6210. the time. Refer to the OS/2 Multimedia Programming Reference for details.) When 
  6211. the time arrives, the PDD calls back to the stream handler through the 
  6212. SHDEntryPoint using the SHD_REPORT_EVENT message. At this time, the stream 
  6213. handler looks through its table, and identifies which event has now come due. 
  6214. In turn, the stream handler reports the event through the SMHEntryPoint on the 
  6215. SMH_REPORTEVENT call to the Sync/Stream Manager. Once received, the SSM reports 
  6216. the event back to the application as shown in the following example. 
  6217.  
  6218. RC  SHDReportEvent(PSHD_REPORTEVENT pRptEvent)
  6219. {
  6220.    PSTREAM         pSTREAM;
  6221.    ulRC            rc;
  6222.  
  6223.    if (rc = GetStreamEntry(&pSTREAM, pRptEvent->hStream))
  6224.            return(rc);
  6225.  
  6226.    pSTREAM->ulStreamTime = pRptEvent->ulStreamTime;
  6227.    /* Update stream time */
  6228.  
  6229.    /*********************************************************/
  6230.    /* PDD detected an event and notified the stream handler */
  6231.    /*********************************************************/
  6232.  
  6233.    while (pEVENT != NULL) {
  6234.       if (pEVENT->hEvent == pRptEvent->hEvent) {
  6235.                    RptEvent.ulFunction = SMH_REPORTEVENT;
  6236.                    RptEvent.hid = pSTREAM->hid;
  6237.                    RptEvent.hevent = pEVENT->hEvent;
  6238.                    RptEvent.pevcbEvent = &(pEVENT->evcb);
  6239.                    /************************************/
  6240.                    /* call SSM to report event arrival */
  6241.                    /************************************/
  6242.                    VideoSH.pSMHEntryPoint(&RptEvent);     /* report it */
  6243.                    break;   /* process only one event and break out */
  6244.      }
  6245.          pEVENT = pEVENT->pNext;
  6246.  
  6247.    } /* end while */
  6248.  
  6249.    return(NO_ERROR);
  6250. }
  6251.  
  6252.  
  6253. ΓòÉΓòÉΓòÉ 5.8.5.2. Stream Handler Monitors the Time ΓòÉΓòÉΓòÉ
  6254.  
  6255. The second method of event detection is for the stream handler to monitor the 
  6256. time, independent of the PDD. This method is less accurate and not as efficient 
  6257. as requesting the PDD to monitor the time. It involves implementing an 
  6258. algorithm that constantly monitors real-time. When the stream handler detects 
  6259. the appropriate time, it reports the event to the Sync/Stream Manager as shown 
  6260. in the following example. 
  6261.  
  6262. RC  SHDReportEvent(PSHD_REPORTEVENT pRptEvent)
  6263. {
  6264.   PSTREAM         pSTREAM;
  6265.   ulRC            rc;
  6266.  
  6267.   if (rc = GetStreamEntry(&pSTREAM, pRptEvent->hStream))
  6268.           return(rc);
  6269.  
  6270.    pSTREAM->ulStreamTime = pRptEvent->ulStreamTime;
  6271.    /* Update stream time */
  6272.  
  6273.   /******************************************************************/
  6274.   /* Stream handler detected event and notified the SSM.            */
  6275.   /******************************************************************/
  6276.  
  6277.   while (pEVENT != NULL) {             /* process all possible events */
  6278.      if (pEVENT->hEvent == pRptEvent->hEvent) {
  6279.                   /*********************************************/
  6280.                   /* Poll the current time to determine if the */
  6281.                   /* event time is now.                        */
  6282.                   /*********************************************/
  6283.                   if (mmtimeCurrTime >= pTimeEvcb->mmtimeStream) {
  6284.                       pTimeEvcb->mmtimeStream = mmtimeCurrTime;
  6285.                       RptEvent.ulFunction = SMH_REPORTEVENT;
  6286.                       RptEvent.hid = pSTREAM->hid;
  6287.                       RptEvent.hevent = pEVENT->hEvent;
  6288.                       RptEvent.pevcbEvent = &(pEVENT->evcb);
  6289.                       /******************************************/
  6290.                       /* Call the Sync/Stream Manager to report */
  6291.                       /*  event arrival.                        */
  6292.                       /******************************************/
  6293.                       VideoSH.pSMHEntryPoint(&RptEvent); /* report it */
  6294.    }
  6295.      pEVENT = pEVENT->pNext;
  6296.  
  6297.   } /* end while */
  6298.  
  6299.   return(NO_ERROR);
  6300. }
  6301.  
  6302. Note that when you develop a stream handler, the stream handler should be able 
  6303. to support all time formats. 
  6304.  
  6305. Note:  Most physical device drivers use milliseconds as their reference; 
  6306.        however, cuepoints initiated by the application come in as a request to 
  6307.        the stream handler in the time format, MMTIME. Therefore, the stream 
  6308.        handler must be able to convert from MMTIME to milliseconds and vice 
  6309.        versa. 
  6310.  
  6311.  
  6312. ΓòÉΓòÉΓòÉ 5.8.6. Cuepoints ΓòÉΓòÉΓòÉ
  6313.  
  6314. Cuepoints remain active for the life of the stream-meaning that once enabled, 
  6315. they remain for the duration of the stream, whether the user decides to seek 
  6316. forwards or backwards. If the user seeks over an event, the stream handler 
  6317. should not detect that event.  If the user seeks backwards, the stream handler 
  6318. should re-enable that event. 
  6319.  
  6320.  
  6321. ΓòÉΓòÉΓòÉ 5.8.7. Error Detection ΓòÉΓòÉΓòÉ
  6322.  
  6323. Stream handlers can detect errors and report them back to the Sync/Stream 
  6324. Manager to be passed back to the media driver. Once a physical device driver 
  6325. detects an error, the PDD must report the error to the stream handler through 
  6326. the SHDEntryPoint. In turn, the stream handler takes the appropriate action. If 
  6327. the error is a hard error, the stream handler must stop the device and report 
  6328. an event to the Sync/Stream Manager. The stream handler indicates that a hard 
  6329. error took place by referencing the error code number. For normal events, such 
  6330. as underruns and overruns, the target stream handler will attempt to get 
  6331. another buffer and then pause its device. The target stream handler will be 
  6332. restarted when more data is available to be output. This condition results in a 
  6333. break in the output data stream.  Interleaved data format can cause underruns 
  6334. to occur when the end of the data is reached, but end of file has not been 
  6335. reached. 
  6336.  
  6337. The code sample in the following example illustrates the code implementation of 
  6338. a stream handler detecting an error. 
  6339.  
  6340. RptEvent.ulFunction = SMH_REPORTEVENT;
  6341. RptEvent.hid = pSTREAM->hid;
  6342. RptEvent.hevent = 0;                         /* must be 0 */
  6343. RptEvent.pevcbEvent = (PEVCB)&evcb;
  6344.  
  6345. evcb.ulType = EVENT_IMPLICIT_TYPE;              /* SPI event */
  6346. evcb.ulSubType = EVENT_ERROR;                   /* event type */
  6347. evcb.ulFlags = 0;
  6348. evcb.ulStatus = EVENT_ERROR;                    /* error code */
  6349. evcb.hstream = pSTREAM->hStream;
  6350. /***********************************/
  6351. /* call SSM to report event arrival*/
  6352. /***********************************/
  6353. VideoSH.pSMHEntryPoint(&Ramp.ptEvent);              /* report it! */
  6354.  
  6355.  
  6356. ΓòÉΓòÉΓòÉ 5.8.8. Synchronization ΓòÉΓòÉΓòÉ
  6357.  
  6358. Each stream handler may, or may not, be able to generate or receive sync 
  6359. pulses. This capability for each stream handler is defined in the SPCB for that 
  6360. stream handler. Synchronization pulses are passed as an event from the master 
  6361. stream handler. 
  6362.  
  6363. Synchronization pulses are distributed by the Sync/Stream Manager based on the 
  6364. synchronization relationship of the programmed stream. This distribution is 
  6365. effective for both DLL and device driver stream handlers. Device driver stream 
  6366. handlers receive sync pulses through their sync pulse SYNC_EVCB. Each slave 
  6367. stream handler must regularly update the sync pulse SYNC_EVCB with its 
  6368. calculated stream time. The Sync/Stream Manager checks this slave-handler 
  6369. stream time against the master stream time and decides whether to send a sync 
  6370. pulse to this handler. The device driver stream handler checks for sync pulses 
  6371. from the Sync/Stream Manager by polling a flag in the sync pulse SYNC_EVCB. The 
  6372. Sync/Stream Manager sets the flag to indicate a sync pulse and updates the 
  6373. current master stream time. Typically, the PDD slave handler polls the flag 
  6374. once during interrupt processing and adjusts the stream usage accordingly. 
  6375. Refer to the following example for an example of how device driver stream 
  6376. handlers support synchronization. 
  6377.  
  6378. /*****************************************************************/
  6379. /* If we are the master, then report the time so that the slaves */
  6380. /* can adjust their time and be in sync with the master.         */
  6381. /*****************************************************************/
  6382.  
  6383. if ((pSTREAM)->ulStateFlg & STREAM_MASTER_SYNC) {
  6384.         (pSTREAM)->SyncEvcb.mmtimeMaster = mmtimeCurrStreamTime;
  6385.         RptEvent.ulFunction = SMH_REPORTEVENT;
  6386.         RptEvent.hid = (pSTREAM)->hid;
  6387.         RptEvent.hevent = 0;          /* must be 0 for implicit events */
  6388.         RptEvent.pevcbEvent = (PEVCB)&((pSTREAM)->SyncEvcb);
  6389.         VideoSH.pSMHEntryPoint(&RptEvent); /* report master time */
  6390. }
  6391. /**************************************************************/
  6392. /* If we are the slave, then update slave time                */
  6393. /* and determine if this slave stream is too slow or too fast */
  6394. /* with respect to the master.                                */
  6395. /**************************************************************/
  6396.  
  6397. if ((pSTREAM)->ulStateFlg & STREAM_SLAVE_SYNC) {
  6398.         (pSTREAM)->SyncEvcb.mmtimeSlave = mmtimeCurrStreamTime;
  6399.         if ((pSTREAM)->SyncEvcb.ulStatus & SYNCPOLLING) {
  6400.              if (mmtimeCurrStreamTime > (pSTREAM)->SyncEvcb.mmtimeMaster)
  6401.                      /* I need to slow my stream */
  6402.                      ;
  6403.              if (mmtimeCurrStreamTime < (pSTREAM)->SyncEvcb.mmtimeMaster)
  6404.                      /* I need to speed up my stream */
  6405.                      ;
  6406.         }
  6407.  
  6408. Note:  See Synchronization Features for more information on sync pulse 
  6409.        generation and processing. 
  6410.  
  6411.  
  6412. ΓòÉΓòÉΓòÉ 5.9. Inter-device Driver Communications (IDC) ΓòÉΓòÉΓòÉ
  6413.  
  6414. The OS/2 multimedia Audio Device Driver is a standard OS/2 PDD that makes use 
  6415. of two OS/2 interfaces to define a standard for IBM audio device drivers: the 
  6416. audio IOCtl interface and the inter-device driver communication (IDC) 
  6417. interface. These interfaces provide the foundation for sharing of the audio 
  6418. device by OS/2 multimedia applications and media drivers. 
  6419.  
  6420. The audio IOCtl interface is provided as subfunctions of the OS/2 DosDevIOCtl 
  6421. function. Media drivers running at Ring 3 privilege level use the IOCtl 
  6422. interface to set up the audio device for access, to change volume controls, and 
  6423. so on. The IOCtl interface is not meant to be used to send audio data to the 
  6424. device driver. 
  6425.  
  6426. The IDC interface is provided by the OS/2 ATTACHDD DevHelp function. Stream 
  6427. handler device drivers and audio physical device drivers use the IDC interface 
  6428. to communicate with one another to coordinate their efforts to stream data to 
  6429. the audio device. 
  6430.  
  6431.  
  6432. ΓòÉΓòÉΓòÉ 5.9.1. IDC Interface ΓòÉΓòÉΓòÉ
  6433.  
  6434. Two entry points are provided for the two device drivers participating in the 
  6435. IDC interface: DDCMDEntryPoint and SHDEntryPoint. DDCMDEntryPoint allows the 
  6436. stream handler device driver to communicate to the PDD, and SHDEntryPoint 
  6437. allows the audio PDD to communicate to the stream handler. 
  6438.  
  6439. The audio PDD modules are shown in the following figure. Note that streaming 
  6440. data buffer pointers are passed by SSM to the Audio Stream Handler by means of 
  6441. SMH calls. Then the Audio Stream Handler passes pointers to the PDD using DDCMD 
  6442. messages. 
  6443.  
  6444.  
  6445. ΓòÉΓòÉΓòÉ 5.9.1.1. Communication to the PDD ΓòÉΓòÉΓòÉ
  6446.  
  6447. Seven messages are defined from the DDCMD entry point. Each message represents 
  6448. a specific request by the stream handler for the audio PDD to do perform an 
  6449. action. 
  6450.  
  6451. Read and write messages allow the stream handler to get and receive data 
  6452. directly from the PDD without any intervention required by the application. The 
  6453. application neither has to send data through an IOCtl nor allocate and lock 
  6454. memory to perform data transfers. 
  6455.  
  6456. Note:  Refer to the Device Driver Command (DDCMD) messages in the OS/2 
  6457.        Multimedia Programming Reference for further information. 
  6458.  
  6459.  
  6460. ΓòÉΓòÉΓòÉ 5.9.1.2. Communication to the Stream Handler ΓòÉΓòÉΓòÉ
  6461.  
  6462. The SHDEntryPoint contains the following two messages. These messages are 
  6463. located in the SHDD.H file of the \TOOLKIT\H subdirectory. SHDD.H contains the 
  6464. data structures, their type definitions, and #define statements for certain 
  6465. values. Note that the messages pass pointers to packets of data, to allow 
  6466. maximum flexibility for the future. 
  6467.  
  6468.  SHD_REPORT_INT 
  6469.      The PDD uses this message when it needs things at interrupt time. For 
  6470.      example, it uses this message to tell the stream handler it has used up 
  6471.      all the data and needs some more. 
  6472.  
  6473.      When the stream handler gets the call, it knows the PDD is passing back a 
  6474.      buffer that it might already have consumed. So the stream handler returns 
  6475.      on that call, giving the PDD a fresh buffer to consume. 
  6476.  
  6477.  SHD_REPORT_EVENT 
  6478.      The stream handler uses this message to keep in sync with what the PDD is 
  6479.      doing. For example, the stream handler can request the PDD to report back 
  6480.      every tenth of a second that data is played. And the stream handler has 
  6481.      all the logic to handle these events. The PDD examines the request, and 
  6482.      during its checks when it realizes a tenth of a second has been played in 
  6483.      data, the PDD calls SHD_REPORT_EVENT. The stream handler can do what it 
  6484.      wants at this point, and the PDD returns. 
  6485.  
  6486.      The PDD is the only one that really knows what is going on. In other 
  6487.      words, only the PDD knows how much data, to the millisecond, has been 
  6488.      played out to the device. The stream handler can approximate the data 
  6489.      played, using calculations based on how much data has gone by. But the 
  6490.      stream handler cannot calculate the data played to the millisecond, or 
  6491.      even to the fraction of a millisecond, the way the PDD can. 
  6492.  
  6493.  
  6494. ΓòÉΓòÉΓòÉ 5.9.2. Stream Handler Values ΓòÉΓòÉΓòÉ
  6495.  
  6496. There are certain values that the stream handler looks for. For example, when 
  6497. the stream handler requests a stop or a pause on a DDCMD_CONTROL message, the 
  6498. pointer that comes back to the stream handler is a pointer to the cumulative 
  6499. time that the PDD has recorded in real time. So whenever the stream handler 
  6500. requests the device to stop, the PDD honors that request and tells the stream 
  6501. handler the real time the PDD stopped within the stream. 
  6502.  
  6503. Another value the stream handler looks for is returned on DDCMD_STATUS. This is 
  6504. also a pointer to the cumulative time from the PDD, with respect to when that 
  6505. stream was first started at the stream handler's request. 
  6506.  
  6507.  
  6508. ΓòÉΓòÉΓòÉ 5.9.3. PDD Values ΓòÉΓòÉΓòÉ
  6509.  
  6510. The stream handler passes a pointer to the PDD on DDCMD_SETUP. This points to a 
  6511. value used by the PDD for setting the referenced time of the PDD. We do not 
  6512. always want the PDD to start its time at 0 every time the stream handler does a 
  6513. start, because the stream handler might have performed a seek in the stream. 
  6514. The PDD might have played a minute of data and then seeked backwards to maybe 
  6515. the 30-second mark in the data. If we issue a start, we do not want the PDD to 
  6516. think it is starting from zero again when it is really starting from the 
  6517. 30-second mark in that stream. 
  6518.  
  6519. DDCMD_CONTROL has an important NOTIFY subfunction, which is used for cuepoint 
  6520. or event detection. The stream handler supports events in cuepoints-an 
  6521. application request to be notified when a particular location in the file is 
  6522. reached or a specific time period has elapsed. The stream handler uses two 
  6523. methods for detecting how much time has elapsed: 
  6524.  
  6525.    1. Using DDCMD_CONTROL NOTIFY, the stream handler requests to be notified by 
  6526.       the PDD at a particular time and passes a pointer to the cue time. 
  6527.  
  6528.    2. The stream handler determines the time internally. This method is not as 
  6529.       precise as the first method, because only the PDD knows the real time. 
  6530.  
  6531.  For example, suppose the stream handler does a DDCMD_CONTROL NOTIFY at one 
  6532.  minute. If the PDD supports precise event detection, it must accept this 
  6533.  request and put it into a queue somewhere, preferably a linked list. This 
  6534.  linked list will have the time of one minute so that during the streaming 
  6535.  process, the PDD occasionally checks to see whether it is at the one minute 
  6536.  mark.  When this event occurs, the PDD calls back on an SHD_REPORT_EVENT. 
  6537.  Then, the programmer can free up that event detection linked list node. 
  6538.  
  6539.  Keep in mind that the PDD should have the capability to queue these requests 
  6540.  because there may additional requests. For example, an application might 
  6541.  request to be notified at the one-minute mark, next at a minute and a half, 
  6542.  and possibly every five minutes. 
  6543.  
  6544.  If the PDD does not support event detection, then when it gets called on a 
  6545.  DDCMD_CONTROL NOTIFY, he responds ERROR_INVALID_REQUEST.  This response tells 
  6546.  the stream handler that it must do the event detection itself. 
  6547.  
  6548.  Note:  Refer to the OS/2 Multimedia Programming Reference for the return codes 
  6549.         for the interfaces of the IDC. 
  6550.  
  6551.  
  6552. ΓòÉΓòÉΓòÉ 5.10. Performance-Tuning the Sync/Stream Manager ΓòÉΓòÉΓòÉ
  6553.  
  6554. The Sync/Stream Manager is comprised of two modules:  SSMDD.SYS and SSM.DLL. 
  6555. SSMDD.SYS is the Ring 0 device driver of the Sync/Stream Manager.  Its syntax 
  6556. is as follows: 
  6557.  
  6558. DEVICE=ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ SSMDD.SYS ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöñ
  6559.         ΓööΓöÇ drive ΓöÇΓöÿ  ΓööΓöÇ path ΓöÇΓöÿ               Γö£ΓöÇ /S:sss ΓöÇΓöñ
  6560.                                               Γö£ΓöÇ /P:ppp ΓöÇΓöñ
  6561.                                               Γö£ΓöÇ /H:hhh ΓöÇΓöñ
  6562.                                               Γö£ΓöÇ /Q:qqq ΓöÇΓöñ
  6563.                                               ΓööΓöÇ /E:eee ΓöÇΓöÿ
  6564.  
  6565. Parameters: 
  6566.  
  6567.  /S:sss           Specifies the number of streams that can be created at the 
  6568.                   same time.  Values range from 1 through 64. The default value 
  6569.                   for machines with more than 8MB of memory is 12. The default 
  6570.                   value for machines with 8MB of memory or less is 6. 
  6571.  
  6572.  /P:ppp           Specifies the number of processes that can create streams at 
  6573.                   the same time.  Values range from 1 through 64. The default 
  6574.                   value for machines with more than 8MB of memory is 12. The 
  6575.                   default value for machines with 8MB of memory or less is 6. 
  6576.  
  6577.  /H:hhh           Specifies the maximum amount of heap space (KB) that will be 
  6578.                   used.  Values range from 16 through 256; the default value is 
  6579.                   64. 
  6580.  
  6581.  /Q:qqq           Specifies the size of the event queue (per process).  Values 
  6582.                   range from 2 through 1024; the default value is 64. 
  6583.  
  6584.  /E:eee           Specifies the number of events that can be enabled (per 
  6585.                   stream).  Values range from 1 through 1024. The default value 
  6586.                   for machines with more than 8MB of memory is 32. The default 
  6587.                   value for machines with 8MB of memory or less is 20. 
  6588.  
  6589.  Note:  The DEVICE=SSMDD.SYS statement must appear as the first Ring 0 stream 
  6590.         handler statement in the CONFIG.SYS file. 
  6591.  
  6592.  Sync/Stream Resource Limits 
  6593.  
  6594.      The maximum number of streams is 64. 
  6595.  
  6596.      The maximum number of streams in a sync group is 64. 
  6597.  
  6598.      The maximum number of processes controlling streams is 64. 
  6599.  
  6600.      The maximum size of Sync/Stream Manager event queue per process is 1024 
  6601.       entries. 
  6602.  
  6603.  
  6604. ΓòÉΓòÉΓòÉ 6. I/O Procedures ΓòÉΓòÉΓòÉ
  6605.  
  6606. This section illustrates how to write a custom file format I/O procedure 
  6607. (IOProc).  Source code is provided for the following I/O procedures located in 
  6608. the \TOOLKIT\SAMPLES\MM subdirectory: 
  6609.  
  6610.  Case-Converter 
  6611.            Provides a simple example of how to write a file format I/O 
  6612.            procedure (without illustrating the use of data translation).  This 
  6613.            sample performs case conversion of text. See the 
  6614.            \TOOLKIT\SAMPLES\MM\CASECONV subdirectory. 
  6615.  
  6616.  M-Motion 
  6617.            Provides an example of how to write an I/O procedure for use with 
  6618.            image file formats.  This sample enables file format transparency 
  6619.            for M-Motion still video files and illustrates the use of data 
  6620.            translation. See the \TOOLKIT\SAMPLES\MM\MMIOPROC subdirectory. 
  6621.  
  6622.  Ultimotion* 
  6623.            Provides a detailed example of what you need to consider when 
  6624.            writing I/O procedures for software motion video file formats. 
  6625.            ULIOT includes CODEC support and illustrates how to integrate common 
  6626.            and file-format-specific code to support multiple I/O procedures. 
  6627.            See the \TOOLKIT\SAMPLES\MM\ULTIMOIO subdirectory. 
  6628.  
  6629.  The following discussion focuses on the messages the M-Motion I/O procedure 
  6630.  samples support, and what minimal processing is required for the messages. 
  6631.  Information is also provided on the Ultimotion I/O procedure, which 
  6632.  illustrates how to call and initialize a CODEC procedure. 
  6633.  
  6634.  
  6635. ΓòÉΓòÉΓòÉ 6.1. I/O Procedure Architecture ΓòÉΓòÉΓòÉ
  6636.  
  6637. The MMIO subsystem of OS/2 multimedia isolates applications, media control 
  6638. drivers, and stream handlers from data-specific processing in the same way that 
  6639. the media control interface buffers applications from device-specific 
  6640. processing.  Applications send MMIO functions through the MMIO Manager, which 
  6641. uses I/O procedures (IOProcs) to manipulate specific types of multimedia data. 
  6642. The following figure illustrates the procedures available with the installation 
  6643. of OS/2 multimedia. 
  6644.  
  6645. *
  6646.  
  6647.  
  6648. ΓòÉΓòÉΓòÉ 6.1.1. Message Handling ΓòÉΓòÉΓòÉ
  6649.  
  6650. An IOProc is a message-based handler.  Applications and the MMIO subsystem 
  6651. communicate to IOProcs through the use of MMIO messages.  When MMIO receives a 
  6652. request from an application, the MMIO Manager sends a message for that 
  6653. operation to the IOProc that is responsible for that particular file format or 
  6654. storage system.  In turn, the I/O procedure performs operations based on the 
  6655. messages it receives from the MMIO Manager or an application. 
  6656.  
  6657. MMIO messages can be either pre-defined or user-defined messages: 
  6658.  
  6659.  Pre-defined Message 
  6660.            This is a system message that is sent by the MMIO Manager for its 
  6661.            associated function.  For example, an application issuing an 
  6662.            mmioOpen function causes the MMIO Manager to send an MMIOM_OPEN 
  6663.            message to an I/O procedure to open a specific file.  These messages 
  6664.            enable applications to manage media files in a format-independent 
  6665.            manner.  The MMIO Manager determines the correct I/O procedure to 
  6666.            process the message, based on an I/O procedure identifier and I/O 
  6667.            procedure type specified in the function.  See I/O Procedure 
  6668.            Identifier (FOURCC) and I/O Procedure Type. 
  6669.  
  6670.  User-defined Message 
  6671.            This is a private message sent directly to an I/O procedure from an 
  6672.            application through the use of the mmioSendMessage function.  This 
  6673.            function enables a program to call an I/O procedure directly (unlike 
  6674.            system messages, which are sent by the MMIO Manager).  MMIOOS2.H in 
  6675.            the \TOOLKIT\H subdirectory defines the identifier MMIO_USER so that 
  6676.            you can create your own messages.  The mmioSendMessage function 
  6677.            requires that your custom messages be defined at or above the 
  6678.            MMIOM_USER value defined in the MMIOOS2.H file. 
  6679.  
  6680.  
  6681. ΓòÉΓòÉΓòÉ 6.1.2. I/O Procedure Identifier (FOURCC) ΓòÉΓòÉΓòÉ
  6682.  
  6683. A FOURCC is a 32-bit quantity representing a sequence of one to four ASCII 
  6684. alphanumeric characters (padded on the right with blank characters).  Each I/O 
  6685. procedure supports a specific file format.  The file format and IOProc are 
  6686. represented by a specific FOURCC code.  This permits the FOURCC to be used as 
  6687. an ID value, rather than the National Language Support (NLS) string-name of the 
  6688. file format or a file name extension. 
  6689.  
  6690. Formats that support multiple media types require a different FOURCC for each 
  6691. variation.  This appears as a different I/O procedure for each media type. 
  6692.  
  6693. Note:  Use the mmioIdentifyFile function to identify the four-character code if 
  6694.        it is not available. 
  6695.  
  6696.  
  6697. ΓòÉΓòÉΓòÉ 6.1.3. I/O Procedure Type ΓòÉΓòÉΓòÉ
  6698.  
  6699. Certain MMIO functions operate on a specific IOProc type.  There are two types 
  6700. of I/O procedures: file format and storage system.  A file format IOProc 
  6701. operates on the contents of a file, and calls other MMIO services when 
  6702. required.  In contrast, a storage system IOProc operates on the storage 
  6703. presentation of the media object, and calls base operating system services. 
  6704.  
  6705. To indicate an I/O procedure type during initialization, set the ulIOProcType 
  6706. field in the MMFORMATINFO structure to either MMIO_IOPROC_FILEFORMAT for file 
  6707. format IOProcs or MMIO_IOPROC_STORAGESYSTEM for storage system IOProcs.  You 
  6708. should also have a resource file, which specifies the NLS name used to describe 
  6709. the I/O procedure.  You must bind the RC file to the DLL if the I/O procedure 
  6710. is to be used in multiple countries.  The IOProc needs to handle the 
  6711. GETFORMATINFO and GETFORMATNAME messages to provide the above information. 
  6712. File Format I/O Procedure 
  6713.  
  6714. A file format IOProc should support all MMIO system messages (with the 
  6715. exception of RIFF compound file messages).  It should also handle any 
  6716. user-defined messages created by the application.  For example, a file format 
  6717. IOProc needs to support the MMIOM_GETFORMATINFO message, because the MMIO 
  6718. Manager internally issues this message to an IOProc when it is being installed. 
  6719. If the MMIOM_GETFORMATINFO message is not supported, a blank MMFORMATINFO 
  6720. structure is placed on the MMIO internal IOProc table for that specific IOProc, 
  6721. except for the FOURCC. 
  6722.  
  6723. In addition, system messages should be supported by a default message handler, 
  6724. which reports back to MMIO that the message is unsupported.  This message 
  6725. handler should attempt to pass any message it cannot support to a subsequent 
  6726. child IOProc.  For example, a message is passed from a file format IOProc to a 
  6727. storage system IOProc as shown in the following example. 
  6728.  
  6729. default:
  6730.     {
  6731.      /*
  6732.       * Declare Local Variables.
  6733.       */
  6734.      PMMFILESTATUS       pVidInfo;
  6735.      LONG                lRC;
  6736.      /************************************************************
  6737.       * Check for valid MMIOINFO block.
  6738.       ************************************************************/
  6739.      if (!pmmioinfo)
  6740.          return (MMIO_ERROR);
  6741.      /************************************************************
  6742.       * Set up our working variable MMFILESTATUS.
  6743.       ************************************************************/
  6744.      pVidInfo = (PMMFILESTATUS) pmmioinfo->pExtraInfoStruct;
  6745.  
  6746.      if (pVidInfo != NULL && pVidInfo->hmmioSS)
  6747.         {
  6748.          lRC = mmioSendMessage (pVidInfo->hmmioSS,
  6749.                                 usMsg,
  6750.                                 lParam1,
  6751.                                 lParam2);
  6752.          if (!lRC)
  6753.             pmmioinfo->ulErrorRet = mmioGetLastError (pVidInfo->hmmioSS);
  6754.          return (lRC);
  6755.         }
  6756.     else
  6757.        {
  6758.         if (pmmioinfo != NULL)
  6759.            pmmioinfo->ulErrorRet = MMIOERR_UNSUPPORTED_MESSAGE;
  6760.         return (MMIOERR_UNSUPPORTED_MESSAGE);
  6761.        }
  6762.  
  6763.     }   /* end case of Default */
  6764.  
  6765. If you write a custom IOProc that supports translation, the following messages 
  6766. need to consider the translate flags: 
  6767.  
  6768.      MMIOM_OPEN 
  6769.      MMIOM_READ 
  6770.      MMIOM_WRITE 
  6771.      MMIOM_SEEK 
  6772.      MMIOM_CLOSE 
  6773.      MMIOM_GETHEADER 
  6774.      MMIOM_SETHEADER 
  6775.      MMIOM_QUERYHEADER 
  6776.  
  6777.  Storage System I/O Procedure 
  6778.  
  6779.  A storage system IOProc typically handles a subset of the system-defined 
  6780.  messages that operate on the storage system.  For example, the DOS and MEM 
  6781.  IOProcs handle the following messages: 
  6782.  
  6783.      MMIOM_OPEN 
  6784.      MMIOM_READ 
  6785.      MMIOM_WRITE 
  6786.      MMIOM_SEEK 
  6787.      MMIOM_CLOSE 
  6788.      MMIOM_GETFORMATNAME 
  6789.      MMIOM_GETFORMATINFO 
  6790.      MMIOM_IDENTIFYFILE 
  6791.  
  6792.  A message specific to the storage system IOProc, such as extended attributes 
  6793.  of a file, would pass through the default handler of the file format IOProc to 
  6794.  the storage system IOProc for processing. 
  6795.  
  6796.  Note:  The RIFF compound file (CF) IOProc installed with OS/2 multimedia only 
  6797.         supports MMIOM_IDENTIFYFILE, MMIOM_GETFORMATINFO, and 
  6798.         MMIOM_GETFORMATNAME.  The compound file (CF) IOProc does not need to 
  6799.         support additional MMIO messages because the bundle ( BND) IOProc 
  6800.         performs the direct file I/O operations.  These two IOProcs can be 
  6801.         viewed as one logical compound file IOProc. 
  6802.  
  6803.  
  6804. ΓòÉΓòÉΓòÉ 6.2. Data Translation and File Conversion ΓòÉΓòÉΓòÉ
  6805.  
  6806. MMIO provides a set of options in its API to support two modes of file 
  6807. access-translated and untranslated.  These modes enable an application to 
  6808. access data in its pure, proprietary format, or in a standard presentation 
  6809. format when performing its I/O operations.  An IOProc can be written to 
  6810. optionally support both access methods. 
  6811.  
  6812. The default mode of access, untranslated, allows the caller to perform I/O of 
  6813. file data in its native format.  All header information and any data is written 
  6814. to a file or read from a file and presented at the caller level without 
  6815. modification. 
  6816.  
  6817. The optional mode of access, translated, is the method used to mask proprietary 
  6818. data formats and allow a caller to use standardized header and data formats for 
  6819. a specific media type (for example, audio, image, or MIDI).  A set of standard 
  6820. header formats and accompanying data formats have been defined as the standard 
  6821. presentation format for these purposes.  An IOProc can be written to optionally 
  6822. support the standard format.  It performs the translation of header 
  6823. information, data information, or both from its native format to the standard 
  6824. format for that media type during read and write type operations.  The 
  6825. translation is performed for the file header and data. 
  6826.  
  6827. With full translation capability enabled in pairs of IOProcs, it is possible to 
  6828. convert files from one format to another very easily. File conversion is simply 
  6829. a combination of loading from one file and saving to another. For example, an 
  6830. application can read from an AVC image file with translation enabled, to the 
  6831. standard presentation format, which is the OS/2 bitmap. The application can 
  6832. then use the bitmap as desired, including displaying it on the screen, image 
  6833. manipulating, and printing. Alternatively, the bitmap could be saved in a 
  6834. different file format such as M-Motion, by writing to the M-Motion IOProc with 
  6835. translation enabled. For example: 
  6836.  
  6837. I/O procedures and applications must use the same standard presentation format 
  6838. of data defined for each media type for conversion to be enabled.  (The media 
  6839. types defined are image, audio, MIDI, digital video, and movie.)  These 
  6840. standard formats apply to media descriptive (header) information and media 
  6841. content.  The standard description structures are supersets of the headers each 
  6842. file format normally uses.  This permits all formats to place the subset of 
  6843. their information into the standard form for other applications to access. 
  6844. Similarly, each specific format can retrieve only the subset that is necessary 
  6845. for its purpose.  The standard content format is a usable data format 
  6846. representation that maintains as much quality as possible. 
  6847.  
  6848. Translation functions assist these standard forms in helping to ensure that 
  6849. data is portable between applications, IOProcs, and the operating system 
  6850. services.  The structures containing descriptive information have fields that 
  6851. can be mapped to system structures, such as the OS/2 operating system's 
  6852. BITMAPINFOHEADER.  The content format must be directly usable by the operating 
  6853. system and services, or by standard hardware devices. 
  6854.  
  6855. The descriptive header and content formats are tightly coupled.  If a file 
  6856. contains a media item, an application can query the header describing the 
  6857. media.  The IOProc returns the header, which includes the supported content 
  6858. format most closely matching the information actually in the file.  For 
  6859. example, if an image file contains 21-bit YUV data, the IOProc for that file 
  6860. informs the application that it is providing 24-bit RGB.  The IOProc is 
  6861. responsible for translating all subsequent read operations from YUV to RGB.  In 
  6862. addition, when an application is creating a new media element, it can set the 
  6863. header for a new media item.  All subsequent translated write operations, which 
  6864. are sent from the application to the IOProc, must contain data in the content 
  6865. format described by the header. 
  6866.  
  6867. Each data type uses different description structures and content formats. The 
  6868. following table gives an overview of the standard presentation formats for 
  6869. supported media types. 
  6870.  
  6871. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6872. ΓöéMedia     ΓöéHeader    ΓöéData                                    Γöé
  6873. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6874. ΓöéAudio     ΓöéMMAUDIO   ΓöéPCM 11.025, 22.05, 33.1 Khz             Γöé
  6875. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6876. ΓöéImage     ΓöéMMIMAGE   ΓöéOS/2 1.3 bitmap (24 bit RGB, 1, 4, 8 bitΓöé
  6877. Γöé          Γöé          Γöépalette)                                Γöé
  6878. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6879. ΓöéMIDI      ΓöéMMMIDI    ΓöéFormat 0 or 1                           Γöé
  6880. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6881. ΓöéMOVIES    ΓöéMMMOVIE   ΓöéMulti-track video and audio             Γöé
  6882. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6883. ΓöéVIDEO     ΓöéMMVIDEO   Γöé16, 24 bit RGB, 4, 8 bit palette        Γöé
  6884. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6885.  
  6886. Note:  Data translation in compound multimedia files is only performed on media 
  6887.        elements in the file.  Translation is not performed on non-multimedia 
  6888.        files. 
  6889.  
  6890.  
  6891. ΓòÉΓòÉΓòÉ 6.2.1. MMFORMATINFO Data Structure ΓòÉΓòÉΓòÉ
  6892.  
  6893. Several MMIO functions use the MMFORMATINFO data structure for media 
  6894. conversions.  The mmioOpen function includes MMIO_TRANSLATEHEADER and 
  6895. MMIO_TRANSLATEDATA flags which are defined in the ulTranslate field of the 
  6896. MMIOINFO structure.  All subsequent read and write operations of multimedia 
  6897. files return data based on these flags.  Translation is currently defined only 
  6898. for image and audio.  The MMIOOS2.H header file defines the MMFORMATINFO 
  6899. structure as shown in the following example. 
  6900.  
  6901. typedef struct _MMFORMATINFO {         /* mmformatinfo                 */
  6902.                                                                        */
  6903.    ULONG    ulStructLen;               /* Length of this structure     */
  6904.    FOURCC   fccIOProc;                 /* IOProc identifier            */
  6905.    ULONG    ulIOProcType;              /* Type of IOProc               */
  6906.    ULONG    ulMediaType;               /* Media type                   */
  6907.    ULONG    ulFlags;                   /* IOProc capability flags      */
  6908.    CHAR     szDefaultFormatExt[sizeof(FOURCC) + 1];  */
  6909.                                        /* Default extension 4 + null   */
  6910.    ULONG    ulCodePage;                /* Code page                    */
  6911.    ULONG    ulLanguage;                /* Language                     */
  6912.    LONG     lNameLength;               /* Length of identifier string  */
  6913.    } MMFORMATINFO;
  6914.  
  6915.  
  6916. ΓòÉΓòÉΓòÉ 6.3. I/O Procedure Entry Point ΓòÉΓòÉΓòÉ
  6917.  
  6918. The following example illustrates the the entry point used to access the 
  6919. functionality of an I/O procedure. 
  6920.  
  6921. LONG APIENTRY IOProc_Entry ( PVOID   pmmioStr,
  6922.                              USHORT  usMessage,
  6923.                              LONG    lParam1,
  6924.                              LONG    lParam2)
  6925.  
  6926. Associated parameters include the following. 
  6927.  
  6928. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6929. ΓöéParameter      ΓöéDescription                                  Γöé
  6930. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6931. ΓöéPVOID pmmioStr ΓöéSpecifies a pointer to an MMIOINFO data      Γöé
  6932. Γöé               Γöéstructure that contains information about theΓöé
  6933. Γöé               Γöéopen file.                                   Γöé
  6934. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6935. ΓöéUSHORT usMsg   ΓöéSpecifies the message that the file I/O      Γöé
  6936. Γöé               Γöéprocedure is being asked to process.         Γöé
  6937. Γöé               Γöé(User-defined messages must have messages    Γöé
  6938. Γöé               Γöédefined above MMIOM_USER.)                   Γöé
  6939. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6940. ΓöéLONG lParam1   ΓöéSpecifies message-dependent information such Γöé
  6941. Γöé               Γöéas a file name.                              Γöé
  6942. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6943. ΓöéLONG lParam2   ΓöéSpecifies additional message-dependent       Γöé
  6944. Γöé               Γöéinformation.  (Used with some messages as    Γöé
  6945. Γöé               Γöévalues.)                                     Γöé
  6946. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6947.  
  6948. Note:  The return value is message-dependent.  If the I/O procedure does not 
  6949.        recognize a message passed in by usMsg, and the default message handler 
  6950.        does not recognize usMsg, then it must return 
  6951.        MMIOERR_UNSUPPORTED_MESSAGE. 
  6952.  
  6953.  
  6954. ΓòÉΓòÉΓòÉ 6.4. Supported Messages ΓòÉΓòÉΓòÉ
  6955.  
  6956. The following figure illustrates the messages supported by the M-Motion I/O 
  6957. procedure (MMOTTK.DLL).  Following the figure are descriptions and code 
  6958. examples of the messages file format I/O procedures must support. 
  6959.  
  6960.  
  6961. ΓòÉΓòÉΓòÉ 6.4.1. MMIOM_OPEN ΓòÉΓòÉΓòÉ
  6962.  
  6963. Each IOProc must be able to process the MMIOM_OPEN message, which requests that 
  6964. a file be opened.  Once the application knows which IOProc is associated with 
  6965. the selected file, it can open the file using mmioOpen.  The application 
  6966. references the appropriate IOProc using the FOURCC provided by the 
  6967. identification process. 
  6968.  
  6969. A file format IOProc must check for the following items when the MMIO Manager 
  6970. issues an MMIOM_OPEN message. 
  6971.  
  6972.      File format IOProcs use the fccChildIOProc field from the pmmioinfo 
  6973.       structure and perform another mmioOpen.  The MMIO_NOIDENTIFY flag must be 
  6974.       set in this case. 
  6975.  
  6976.      The lLogicalFilePos of the MMIOINFO structure should be set to either 0 
  6977.       or at the first byte of data following the header, if any.  This example 
  6978.       has a header and lLogicalFilePos is set using the return code from 
  6979.       mmioSeek. 
  6980.  
  6981.      A file format IOProc must check to see if the MMIO_TRANSLATEDATA or 
  6982.       MMIO_TRANSLATEHEADER flag is set.  If a translate flag is set, it 
  6983.       processes the data according to a set of defined interchange formats 
  6984.       (refer to the OS/2 Multimedia Programming Reference for details). If a 
  6985.       translate flag is not set, it allows the data to pass through the IOProc 
  6986.       with application-specific modifications.  Translation support is required 
  6987.       if the IOProc is to be supported under the Multimedia Data Converter 
  6988.       program. 
  6989.  
  6990.  If the OPEN was successful, the application can obtain information about the 
  6991.  media in the file using the mmioGetHeaderInfo message. 
  6992.  
  6993.  The following example illustrates how to handle the MMIOM_OPEN message for a 
  6994.  file format IOProc.  The MMIOM_OPEN message handler uses the mmioOpen function 
  6995.  to locate a media data object using an MMIO-supported storage system IOProc. 
  6996.  Upon opening the data object, an hmmio handle (H1) is returned to the file 
  6997.  format IOProc.  This handle is saved in the aulInfo[1] field of MMIOINFO for 
  6998.  the file format IOProc.  Upon the return to the mmioOpen function issued by 
  6999.  the application, you will notice that another handle (H2) was already 
  7000.  generated and returned to the application.  These handles allow access to the 
  7001.  data object.  The application will use H2, and the file format IOProc will use 
  7002.  H1 with MMIO function calls to the storage system IOProc. 
  7003.  
  7004.  The following example shows an example of how the M-Motion IOProc supports the 
  7005.  MMIOM_OPEN message. 
  7006.  
  7007.   case MMIOM_OPEN:
  7008.       {
  7009.       /************************************************************
  7010.        * Declare local variables
  7011.        ************************************************************/
  7012.       PMMFILESTATUS   pVidInfo;   /* pointer to an M-Motion file    */
  7013.                                   /* status structure that we will*/
  7014.                                   /* use for this file instance   */
  7015.       MMIMAGEHEADER   MMImgHdr;
  7016.       ULONG           ulRequiredFileLength;
  7017.       ULONG           ulActualFileLength;
  7018.       ULONG           ulWidth;
  7019.       ULONG           ulHeight;
  7020.       PBYTE           lpYUVBuf;
  7021.       ULONG           ulRowCount;
  7022.       ULONG           ulRGBBytesPerLine;
  7023.       ULONG           ulYUVBytesPerLine;
  7024.       LONG            rc;
  7025.       HMMIO           hmmioSS;
  7026.       PBYTE           lpRGBBufPtr;
  7027.       FOURCC          fccStorageSystem;   /* SS I/O Proc FOURCC       */
  7028.       MMIOINFO        mmioinfoSS;         /* I/O info block for SS ref*/
  7029.       PSZ pszFileName = (CHAR *)lParam1;  /* get the filename from    */
  7030.                                           /* parameter                */
  7031.       /************************************************************
  7032.        * Check for valid MMIOINFO block.
  7033.        ************************************************************/
  7034.       if (!pmmioinfo)
  7035.           return (MMIO_ERROR);
  7036.       /************************************************************
  7037.        * If flags show read and write then send back an error.  We
  7038.        * only support reading or writing but not both at the same
  7039.        * time on the same file.
  7040.        ************************************************************/
  7041.       if ((pmmioinfo->ulFlags & MMIO_READWRITE) &&
  7042.           ((pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA) ||
  7043.            (pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER)))
  7044.           {
  7045.           return (MMIO_ERROR);
  7046.           }
  7047.       /*********************************************************
  7048.        *   Determine the storage system/child IOProc that actually
  7049.        *   obtains the data for us.  The M-Motion data may be contained
  7050.        *   in a memory (RAM) file, as a component in a database or
  7051.        *   library (a Compound file), or as a stand-alone disk file.
  7052.        *
  7053.        *   While the application uses this M-Motion IOProc to obtain
  7054.        *   untranslated (M-Motion) or translated (bitmap) data,
  7055.        *   the IOProc must obtain it's data from something that
  7056.        *   reads and writes to a storage media.  The exact storage
  7057.        *   media is immaterial - so long as the read and write
  7058.        *   operations generate data that LOOKS like it is part
  7059.        *   of a standard file.
  7060.        *********************************************************/
  7061.       if (!pmmioinfo->fccChildIOProc)
  7062.          {
  7063.          /* Need to determine SS if create from pmmioinfo and filename. */
  7064.          if (pmmioinfo->ulFlags & MMIO_CREATE)
  7065.             {
  7066.             if (mmioDetermineSSIOProc( pszFileName,
  7067.                                        pmmioinfo,
  7068.                                        &fccStorageSystem,
  7069.                                        NULL ))
  7070.                {
  7071.                fccStorageSystem = FOURCC_DOS;
  7072.                }
  7073.             }
  7074.          else
  7075.             {
  7076.             if (mmioIdentifyStorageSystem( pszFileName,
  7077.                                            pmmioinfo,
  7078.                                            &fccStorageSystem ))
  7079.                {
  7080.                return (MMIO_ERROR);
  7081.                }
  7082.  
  7083.             }
  7084.  
  7085.          if (!fccStorageSystem)
  7086.             {
  7087.             return (MMIO_ERROR);
  7088.             }
  7089.          else
  7090.             {
  7091.             pmmioinfo->fccChildIOProc = fccStorageSystem;
  7092.             }
  7093.          } /* end storage system identification block */
  7094.       /**************************************************************
  7095.        * Direct the open to the specific storage system necessary
  7096.        **************************************************************/
  7097.       memset( &mmioinfoSS, '\0', sizeof(MMIOINFO));
  7098.       memmove( &mmioinfoSS, pmmioinfo, sizeof(MMIOINFO));
  7099.       mmioinfoSS.pIOProc = NULL;
  7100.       mmioinfoSS.fccIOProc = pmmioinfo->fccChildIOProc;
  7101.       mmioinfoSS.ulFlags |= MMIO_NOIDENTIFY;
  7102.       /************************************************************
  7103.        * Try to open the file.  Add the NO IDENTIFY flag to
  7104.        *    ENSURE THAT WE DON'T LOOP RECURSIVELY!!!
  7105.        ************************************************************/
  7106.       hmmioSS = mmioOpen (pszFileName,
  7107.                           &mmioinfoSS,
  7108.                           mmioinfoSS.ulFlags);
  7109.       /************************************************************
  7110.        * Check if a DELETE was requested - mmioOpen returns a 1,
  7111.        *    so we much check this separately
  7112.        ************************************************************/
  7113.       if (pmmioinfo->ulFlags & MMIO_DELETE)
  7114.          {
  7115.          /* was the delete successful?         */
  7116.          if (!hmmioSS)
  7117.             {
  7118.             pmmioinfo->ulErrorRet = MMIOERR_DELETE_FAILED;
  7119.             return (MMIO_ERROR);
  7120.             }
  7121.          else
  7122.             {
  7123.             return (MMIO_SUCCESS);
  7124.             }
  7125.          }
  7126.       /************************************************************
  7127.        * Check the return code from the open call for an error.
  7128.        *    If not delete, then the open should have worked.
  7129.        ************************************************************/
  7130.       if (!hmmioSS)
  7131.           return (MMIO_ERROR);
  7132.       /************************************************************
  7133.        * Allocate memory for one M-Motion FileStatus structures
  7134.        ************************************************************/
  7135.       DosAllocMem ((PPVOID) &pVidInfo,
  7136.                             sizeof (MMFILESTATUS),
  7137.                             fALLOC);
  7138.       /************************************************************
  7139.        * Ensure the allocate was successful.  If not, then
  7140.        *   close the file and return open as unsuccessful...
  7141.        ************************************************************/
  7142.       if (!pVidInfo)
  7143.          {
  7144.          mmioClose (hmmioSS, 0);
  7145.          return (MMIO_ERROR);
  7146.       pVidInfo->hmmioSS = hmmioSS;
  7147.       /************************************************************
  7148.        * Store pointer to our MMFILESTATUS structure in
  7149.        * pExtraInfoStruct field that is provided for our use.
  7150.        ************************************************************/
  7151.       pmmioinfo->pExtraInfoStruct = (PVOID)pVidInfo;
  7152.       /************************************************************
  7153.        * Set the fields of the FileStatus structure that the
  7154.        * IOProc is responsible for.
  7155.        ************************************************************/
  7156.       InitFileStruct (pVidInfo);
  7157.       /*********************************************************
  7158.        * If this is a read, we need to check that is a M-Motion
  7159.        *    file and perhaps get the data.
  7160.        *********************************************************/
  7161.       if (pmmioinfo->ulFlags & MMIO_READ)
  7162.          {
  7163.          /*********************************************************
  7164.           * First we must get some basic information from the file
  7165.           * Read in data to fill up the MMOTIONHEADER structure.
  7166.           *
  7167.           * If the read is unsuccessful, this is not a M-Motion file
  7168.           * and we should return a failure on the open
  7169.           *********************************************************/
  7170.          if (sizeof (MMOTIONHEADER) !=
  7171.                              mmioRead (pVidInfo->hmmioSS,
  7172.                                        (PVOID) &pVidInfo->mmotHeader,
  7173.                                        (ULONG) sizeof (MMOTIONHEADER)))
  7174.              {
  7175.              mmioClose (pVidInfo->hmmioSS, 0);
  7176.              DosFreeMem ((PVOID) pVidInfo);
  7177.              return (MMIO_ERROR);
  7178.              }
  7179.          /* Ensure this IS an M-Motion file header before we continue  */
  7180.          if (strcmp (pVidInfo->mmotHeader.mmID, "YUV12C"))
  7181.              {
  7182.              mmioClose (pVidInfo->hmmioSS, 0);
  7183.              DosFreeMem ((PVOID) pVidInfo);
  7184.              return (MMIO_ERROR);
  7185.              }
  7186.          /********************************************************
  7187.           * Set up width and height of image.
  7188.           ********************************************************/
  7189.          ulWidth  = (ULONG)pVidInfo->mmotHeader.mmXlen;
  7190.          ulHeight = (ULONG)pVidInfo->mmotHeader.mmYlen;
  7191.          /* Calculate what the length of the file SHOULD be based on the */
  7192.          /*   header contents                                            */
  7193.          ulRequiredFileLength = (((ulWidth >> 2) * 6) * ulHeight) +
  7194.                                                 sizeof (MMOTIONHEADER);
  7195.  
  7196.          /* Query what the ACTUAL length of the file is,                 */
  7197.          /*   then move back to just after the header.                   */
  7198.          ulActualFileLength = (ULONG)mmioSeek (pVidInfo->hmmioSS,
  7199.                                               0, SEEK_END);
  7200.  
  7201.          mmioSeek (pVidInfo->hmmioSS, sizeof (MMOTIONHEADER), SEEK_SET);
  7202.          /* If these don't match, then it isn't a VALID M-Motion file    */
  7203.          /*    - regardless of what the header says.                     */
  7204.          if (ulRequiredFileLength != ulActualFileLength)
  7205.              {
  7206.              mmioClose (pVidInfo->hmmioSS, 0);
  7207.              DosFreeMem ((PVOID) pVidInfo);
  7208.              return (MMIO_ERROR);
  7209.              }
  7210.  
  7211.          /************************************************************
  7212.           * If the app intends to read in translation mode, we must
  7213.           * allocate and set-up the buffer that will contain the RGB data.
  7214.           *
  7215.           * We must also read in the data to insure that the first
  7216.           * read, seek, or get-header operation will have data
  7217.           * to use.  This is ONLY NECESSARY FOR TRANSLATED MODE
  7218.           * operations, since we must process reads/writes pretending
  7219.           * the image is stored from the bottom-up.
  7220.           *
  7221.           ************************************************************
  7222.           ************************************************************
  7223.           * Fill out the MMIMAGEHEADER structure.
  7224.           ************************************************************/
  7225.          MMImgHdr.ulHeaderLength = sizeof (MMIMAGEHEADER);
  7226.          MMImgHdr.ulContentType  = MMIO_IMAGE_PHOTO;
  7227.          MMImgHdr.ulMediaType    = MMIO_MEDIATYPE_IMAGE;
  7228.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbFix =
  7229.                      sizeof (BITMAPINFOHEADER2);
  7230.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cx              = ulWidth;
  7231.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cy              = ulHeight;
  7232.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cPlanes         = 1;
  7233.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount       = 24;
  7234.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulCompression   =
  7235.              BCA_UNCOMP;
  7236.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cbImage         =
  7237.              ulWidth * ulHeight * 3;
  7238.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cxResolution    = 0L;
  7239.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cyResolution    = 0L;
  7240.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrUsed        = 0L;
  7241.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cclrImportant   = 0L;
  7242.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usUnits         = 0L;
  7243.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usReserved      = 0L;
  7244.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usRecording     =
  7245.              BRA_BOTTOMUP;
  7246.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.usRendering     =
  7247.              BRH_NOTHALFTONED;
  7248.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cSize1          = 0L;
  7249.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.cSize2          = 0L;
  7250.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulColorEncoding = 0L;
  7251.          MMImgHdr.mmXDIBHeader.BMPInfoHeader2.ulIdentifier    = 0L;
  7252.          /************************************************************
  7253.           * Copy the image header into private area for later use.
  7254.           * This will be returned on a mmioGetHeader () call
  7255.           ************************************************************/
  7256.          pVidInfo->mmImgHdr = MMImgHdr;
  7257.          /********************************************************
  7258.           * YUV Bytes/Line are = 1 1/2 times the number of pels
  7259.           ********************************************************/
  7260.          ulYUVBytesPerLine = ulWidth + (ulWidth >> 1);
  7261.  
  7262.          /********************************************************
  7263.           * RGB Bytes/Line are = 2* YUV bytes/line
  7264.           ********************************************************/
  7265.          ulRGBBytesPerLine = (ulYUVBytesPerLine << 1);
  7266.  
  7267.          /********************************************************
  7268.           * Determine total bytes in image
  7269.           ********************************************************/
  7270.          pVidInfo->ulRGBTotalBytes = ulWidth * ulHeight * 3;
  7271.  
  7272.          /********************************************************
  7273.           * M-Motion images are always on 4-pel boundaries, which also
  7274.           * makes them on 4-byte/LONG boundaries, which is used for
  7275.           * bitmaps.  Therefore, there are no extra pad bytes necessary.
  7276.           ********************************************************/
  7277.          pVidInfo->ulImgPaddedBytesPerLine = ulWidth * 3;
  7278.          pVidInfo->ulImgTotalBytes = pVidInfo->ulRGBTotalBytes;
  7279.          /*********************************************************
  7280.           * For translated data READ mode, we must allocate a buffer,
  7281.           * get the YUV data from the file, and load the RGB buffer.
  7282.           * Place format-specific code here to load the image into the
  7283.           * buffer.  The code below is M-Motion format specific.
  7284.           *********************************************************/
  7285.          if (pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA)
  7286.             {
  7287.             /********************************************************
  7288.              * Get space for full image buffer.
  7289.              * This will be retained until the file is closed.
  7290.              ********************************************************/
  7291.             if (DosAllocMem ((PPVOID) &(pVidInfo->lpRGBBuf),
  7292.                               pVidInfo->ulRGBTotalBytes,
  7293.                               fALLOC))
  7294.                 {
  7295.                 mmioClose (pVidInfo->hmmioSS, 0);
  7296.                 DosFreeMem ((PVOID) pVidInfo);
  7297.                 return (MMIO_ERROR);
  7298.                 }
  7299.  
  7300.             /********************************************************
  7301.              * Get temporary space for one line YUV buffer.
  7302.              ********************************************************/
  7303.             if (DosAllocMem ((PPVOID) &lpYUVBuf,
  7304.                              ulYUVBytesPerLine,
  7305.                              fALLOC))
  7306.                 {
  7307.                 mmioClose (pVidInfo->hmmioSS, 0);
  7308.                 DosFreeMem ((PVOID) pVidInfo);
  7309.                 return (MMIO_ERROR);
  7310.                 }
  7311.             /********************************************************
  7312.              * Initialize the beginning buffer position.
  7313.              ********************************************************/
  7314.             lpRGBBufPtr = pVidInfo->lpRGBBuf;
  7315.  
  7316.             /********************************************************
  7317.              * Read in YUV data one line at a time, converting
  7318.              * from YUV to RGB, then placing in the image buffer.
  7319.              ********************************************************/
  7320.             for (ulRowCount = 0;
  7321.                  ulRowCount < ulHeight;
  7322.                  ulRowCount++)
  7323.  
  7324.                 {
  7325.                 /****************************************************
  7326.                  * Read in one line.
  7327.                  ****************************************************/
  7328.                 rc = mmioRead (pVidInfo->hmmioSS,
  7329.                                (PVOID) lpYUVBuf,
  7330.                                (ULONG) ulYUVBytesPerLine);
  7331.  
  7332.                 /****************************************************
  7333.                  * Convert one line at a time.
  7334.                  ****************************************************/
  7335.                 ConvertOneLineYUVtoRGB (lpYUVBuf,
  7336.                                         lpRGBBufPtr,
  7337.                                         ulYUVBytesPerLine);
  7338.  
  7339.                 /****************************************************
  7340.                  * Make sure buffer ptr is correct for the next convert.
  7341.                  ****************************************************/
  7342.                 lpRGBBufPtr += (LONG)ulRGBBytesPerLine;
  7343.                 }   /* end of FOR loop to read YUV data */
  7344.             DosFreeMem (lpYUVBuf);
  7345.  
  7346.             /********************************************************
  7347.              * This changes from M-Motion's top-down form to OS/2
  7348.              * PM's bottom-up bitmap form.
  7349.              ********************************************************/
  7350.             ImgBufferFlip (pVidInfo->lpRGBBuf,
  7351.                            pVidInfo->ulImgPaddedBytesPerLine,
  7352.                            ulHeight);
  7353.             /********************************************************
  7354.              * RGB buffer now full, set position pointers to the
  7355.              * beginning of the buffer.
  7356.              ********************************************************/
  7357.             pVidInfo->lImgBytePos =  0;
  7358.             }   /*  end IF TRANSLATED block */
  7359.          } /* end IF READ block */
  7360.       return (MMIO_SUCCESS);
  7361.       } /* end case of MMIOM_OPEN */
  7362.  
  7363.  
  7364. ΓòÉΓòÉΓòÉ 6.4.2. MMIOM_READ and MMIOM_WRITE ΓòÉΓòÉΓòÉ
  7365.  
  7366. The MMIOM_READ message requests that bytes be read from an open file; 
  7367. MMIOM_WRITE message requests that bytes be written to an open file.  These 
  7368. messages should be handled differently for each IOProc, depending on the 
  7369. requirements imposed by the file's data.  Because a file might be using 
  7370. buffered I/O, mmioRead and mmioWrite maintain the lBufOffset and the 
  7371. lDiskOffset fields.  The IOProc should not modify these fields.  If these 
  7372. fields are needed by the IOProc, the IOProc can use the aulInfo array to 
  7373. maintain.  Additionally, the pExtraInfoStruct can be used for any user-defined 
  7374. structure that the IOProc requires.  The sample IOProc stores its header in 
  7375. this field to demonstrate this capability.  If the IOProc is a file format 
  7376. IOProc, it should use mmioRead or mmioWrite calls to the storage system IOProc, 
  7377. using the internal handle generated during the open processing.  A storage 
  7378. system IOProc might simply issue calls to DosRead or DosWrite. 
  7379.  
  7380. To implement a file format IOProc for translation mode, and provide support for 
  7381. the MMIO_TRANSLATEDATA flag, additional code is required for the MMIOM_READ and 
  7382. MMIOM_WRITE message processing. During read processing, after data is read from 
  7383. the file to a private buffer in its native encoding format, the data must be 
  7384. translated from its native encoding scheme to the standard presentation format 
  7385. encoding scheme for its media type.  The translated data is then presented to 
  7386. the application in its read buffer.  Likewise, for write processing, data is 
  7387. received from the application in the standard presentation format, and must be 
  7388. translated to its native encoding scheme before being written to the file. 
  7389.  
  7390. The following example shows an example of how the M-Motion IOProc supports the 
  7391. MMIOM_READ and MMIOM_WRITE messages. 
  7392.  
  7393. case MMIOM_READ:
  7394.      {
  7395.      /************************************************************
  7396.       * Declare Local Variables
  7397.       ************************************************************/
  7398.      PMMFILESTATUS   pVidInfo;
  7399.      LONG            rc;
  7400.      LONG            lBytesToRead;
  7401.  
  7402.      /************************************************************
  7403.       * Check for valid MMIOINFO block.
  7404.       ************************************************************/
  7405.      if (!pmmioinfo)
  7406.          return (MMIO_ERROR);
  7407.  
  7408.      /************************************************************
  7409.       * Set up our working file status variable.
  7410.       ************************************************************/
  7411.      pVidInfo = (PMMFILESTATUS)pmmioinfo->pExtraInfoStruct;
  7412.  
  7413.      /************************************************************
  7414.       * Is Translate Data off?
  7415.       ************************************************************/
  7416.      if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA))
  7417.          {
  7418.          /********************************************************
  7419.           * Since no translation, provide exact number of bytes req.
  7420.           ********************************************************/
  7421.          if (!lParam1)
  7422.              return (MMIO_ERROR);
  7423.  
  7424.          rc = mmioRead (pVidInfo->hmmioSS,
  7425.                         (PVOID) lParam1,
  7426.                         (ULONG) lParam2);
  7427.  
  7428.          return (rc);
  7429.          }
  7430.  
  7431.      /************************************************************
  7432.       * Otherwise, Translate Data is on...
  7433.       ************************************************************/
  7434.  
  7435.      /************************************************************
  7436.       * Ensure we do NOT write more data out than is remaining
  7437.       *    in the buffer.  The length of read was requested in
  7438.       *    image bytes, so confirm that there are that many of
  7439.       *    virtual bytes remaining.
  7440.       ************************************************************/
  7441.      if ((ULONG)(pVidInfo->lImgBytePos + lParam2) >
  7442.           pVidInfo->ulImgTotalBytes)
  7443.         lBytesToRead =
  7444.             pVidInfo->ulImgTotalBytes - pVidInfo->lImgBytePos;
  7445.      else
  7446.         lBytesToRead = (ULONG)lParam2;
  7447.  
  7448.      /************************************************************
  7449.       * Perform this block on ALL reads.  The image data should
  7450.       * be in the RGB buffer at this point, and can be handed
  7451.       * to the application.
  7452.       *
  7453.       * Conveniently, the virtual image position is the same
  7454.       *    as the RGB buffer position, since both are 24 bit-RGB
  7455.       ************************************************************/
  7456.      memcpy ((PVOID)lParam1,
  7457.              &(pVidInfo->lpRGBBuf[pVidInfo->lImgBytePos]),
  7458.              lBytesToRead);
  7459.  
  7460.      /************************************************************
  7461.       * Move RGB buffer pointer forward by number of bytes read.
  7462.       * The Img buffer pos is identical since both are 24 bits.
  7463.       ************************************************************/
  7464.      pVidInfo->lImgBytePos += lBytesToRead;
  7465.  
  7466.      return (lBytesToRead);
  7467.      }   /* end case  of MMIOM_READ */
  7468.  
  7469.  case MMIOM_WRITE:
  7470.       {
  7471.       /************************************************************
  7472.        * Declare Local Variables.
  7473.        ************************************************************/
  7474.       PMMFILESTATUS       pVidInfo;
  7475.       USHORT              usBitCount;
  7476.       LONG                lBytesWritten;
  7477.       ULONG               ulImgBytesToWrite;
  7478.  
  7479.       /************************************************************
  7480.        * Check for valid MMIOINFO block.
  7481.        ************************************************************/
  7482.       if (!pmmioinfo)
  7483.           return (MMIO_ERROR);
  7484.  
  7485.       /************************************************************
  7486.        * Set up our working variable MMFILESTATUS.
  7487.        ************************************************************/
  7488.       pVidInfo = (PMMFILESTATUS) pmmioinfo->pExtraInfoStruct;
  7489.  
  7490.       /************************************************************
  7491.        * See if a SetHeader has been done on this file.
  7492.        ************************************************************/
  7493.       if ((!pVidInfo) || (!pVidInfo->bSetHeader))
  7494.           {
  7495.           return (MMIO_ERROR);
  7496.           }
  7497.  
  7498.       if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA))
  7499.           {
  7500.           /********************************************************
  7501.            * Translation is off, take amount of bytes sent and
  7502.            * write to the file.
  7503.            ********************************************************
  7504.            * Ensure that there is a data buffer to write from.
  7505.            ********************************************************/
  7506.           if (!lParam1)
  7507.               return (MMIO_ERROR);
  7508.  
  7509.           lBytesWritten = mmioWrite (pVidInfo->hmmioSS,
  7510.                                      (PVOID) lParam1,
  7511.                                      (ULONG) lParam2);
  7512.  
  7513.           return (lBytesWritten);
  7514.           }
  7515.  
  7516.       /************************************************************
  7517.        * Translation is on.
  7518.        ************************************************************
  7519.        * Set up local variables.
  7520.        ************************************************************/
  7521.       usBitCount =
  7522.          pVidInfo->mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
  7523.  
  7524.  
  7525.       /************************************************************
  7526.        * Ensure we do not attempt to write past the end of the
  7527.        *    buffer...
  7528.        ************************************************************/
  7529.       if ((ULONG)(pVidInfo->lImgBytePos + lParam2) >
  7530.          pVidInfo->ulImgTotalBytes)
  7531.          ulImgBytesToWrite =
  7532.              pVidInfo->ulImgTotalBytes - pVidInfo->lImgBytePos;
  7533.       else
  7534.          ulImgBytesToWrite = (ULONG)lParam2;
  7535.  
  7536.       /************************************************************
  7537.        * Write the data into the image buffer.  It will be converted to
  7538.        *   RGB, then YUV  when the file is closed.  This allows the
  7539.        *   application to seek to arbitrary  positions within the
  7540.        *   image in terms of the bits/pel, etc they are writing.
  7541.        ************************************************************/
  7542.       memcpy (&(pVidInfo->lpImgBuf[pVidInfo->lImgBytePos]),
  7543.               (PVOID)lParam1,
  7544.               ulImgBytesToWrite);
  7545.  
  7546.       /* Update current position in the image buffer */
  7547.       pVidInfo->lImgBytePos += ulImgBytesToWrite;
  7548.  
  7549.       return (ulImgBytesToWrite);
  7550.       }   /* end case of MMIOM_WRITE */
  7551.  
  7552.   /*
  7553.    * If the IOProc has a child IOProc, then pass the message
  7554.    *  on to the Child, otherwise return Unsupported Message
  7555.    */
  7556.   default:
  7557.       {
  7558.        /*
  7559.         * Declare Local Variables.
  7560.         */
  7561.        PMMFILESTATUS       pVidInfo;
  7562.        LONG                lRC;
  7563.  
  7564.        /************************************************************
  7565.         * Check for valid MMIOINFO block.
  7566.         ************************************************************/
  7567.        if (!pmmioinfo)
  7568.            return (MMIO_ERROR);
  7569.  
  7570.        /************************************************************
  7571.         * Set up our working variable MMFILESTATUS.
  7572.         ************************************************************/
  7573.        pVidInfo = (PMMFILESTATUS) pmmioinfo->pExtraInfoStruct;
  7574.  
  7575.        if (pVidInfo != NULL && pVidInfo->hmmioSS)
  7576.           {
  7577.            lRC = mmioSendMessage (pVidInfo->hmmioSS,
  7578.                                   usMsg,
  7579.                                   lParam1,
  7580.                                   lParam2);
  7581.            if (!lRC)
  7582.               pmmioinfo->ulErrorRet = mmioGetLastError (pVidInfo->hmmioSS);
  7583.            return (lRC);
  7584.           }
  7585.       else
  7586.          {
  7587.           if (pmmioinfo != NULL)
  7588.              pmmioinfo->ulErrorRet = MMIOERR_UNSUPPORTED_MESSAGE;
  7589.           return (MMIOERR_UNSUPPORTED_MESSAGE);
  7590.          }
  7591.  
  7592.       }   /* end case of Default */
  7593.  
  7594.   } /* end SWITCH statement for MMIO messages */
  7595.  
  7596. return (0);
  7597. }      /* end of window procedure */
  7598.  
  7599.  
  7600. ΓòÉΓòÉΓòÉ 6.4.3. MMIOM_SEEK ΓòÉΓòÉΓòÉ
  7601.  
  7602. This message is handled differently by each IOProc.  Because of the 
  7603. requirements of different file formats, you will need to determine if this 
  7604. message can be supported, and if so, how to implement the three different types 
  7605. of seeks.  A file format IOProc can use some type of calculation to determine 
  7606. the seek distance, and what those distance units are.  The file format IOProc 
  7607. should use mmioSeek to call the storage system IOProc.  A storage system IOProc 
  7608. can call the DOSSetFilePtr function to set the file's position.  The bounds 
  7609. checking that must occur for compound file elements is handled by the mmioSeek 
  7610. function for BND file elements.  Any other compound file IOProcs of this nature 
  7611. need to implement this checking in its own code. 
  7612.  
  7613. The following example shows an example of how the M-Motion IOProc supports the 
  7614. MMIOM_SEEK message. 
  7615.  
  7616. case MMIOM_SEEK:
  7617.      {
  7618.      /************************************************************
  7619.       * Set up locals.
  7620.       ************************************************************/
  7621.      PMMFILESTATUS   pVidInfo;
  7622.      LONG            lNewFilePosition;
  7623.      LONG            lPosDesired;
  7624.      SHORT           sSeekMode;
  7625.  
  7626.      /************************************************************
  7627.       * Check to make sure MMIOINFO block is valid.
  7628.       ************************************************************/
  7629.      if (!pmmioinfo)
  7630.          return (MMIO_ERROR);
  7631.  
  7632.      /************************************************************
  7633.       * Set up our working file status variable.
  7634.       ************************************************************/
  7635.      pVidInfo = (PMMFILESTATUS)pmmioinfo->pExtraInfoStruct;
  7636.  
  7637.      lPosDesired = lParam1;
  7638.      sSeekMode = (SHORT)lParam2;
  7639.  
  7640.      /************************************************************
  7641.       * Is Translate Data on?
  7642.       ************************************************************/
  7643.      if (pmmioinfo->ulTranslate & MMIO_TRANSLATEDATA)
  7644.          {
  7645.          /********************************************************
  7646.           * Attempt to move the Image buffer pointer to the
  7647.           * desired location.  App sends SEEK requests in
  7648.           * positions relative to the image planes & bits/pel
  7649.           * We must also convert this to RGB positions
  7650.           ********************************************************/
  7651.          switch (sSeekMode)
  7652.              {
  7653.              case SEEK_SET:
  7654.                  {
  7655.                  lNewFilePosition = lPosDesired;
  7656.                  break;
  7657.                  }
  7658.              case SEEK_CUR:
  7659.                  {
  7660.                  lNewFilePosition = pVidInfo->lImgBytePos + lPosDesired;
  7661.                  break;
  7662.                  }
  7663.              case SEEK_END:
  7664.                  {
  7665.  
  7666.                  lNewFilePosition =
  7667.                               pVidInfo->ulImgTotalBytes += lPosDesired;
  7668.                  break;
  7669.                  }
  7670.  
  7671.              default :
  7672.                 return (MMIO_ERROR);
  7673.              }
  7674.  
  7675.          /********************************************************
  7676.           * Make sure seek did not go before start of file.
  7677.           * If so, then don't change anything, just return an error
  7678.           ********************************************************/
  7679.          if (lNewFilePosition < 0)
  7680.             {
  7681.             return (MMIO_ERROR);
  7682.             }
  7683.  
  7684.          /********************************************************
  7685.           * Make sure seek did not go past the end of file.
  7686.           ********************************************************/
  7687.          if (lNewFilePosition > (LONG)pVidInfo->ulImgTotalBytes)
  7688.              lNewFilePosition = pVidInfo->ulImgTotalBytes;
  7689.  
  7690.          pVidInfo->lImgBytePos = lNewFilePosition;
  7691.  
  7692.          return (pVidInfo->lImgBytePos);
  7693.          } /* end  IF DATA TRANSLATED */
  7694.  
  7695.      /************************************************************
  7696.       * Translate Data is OFF...
  7697.       ************************************************************
  7698.       * if this is a seek from the beginning of the file,
  7699.       *    we must account for and pass the header
  7700.       ************************************************************/
  7701.      if (lParam2==SEEK_SET)
  7702.         lPosDesired += MMOTION_HEADER_SIZE;
  7703.  
  7704.      lNewFilePosition = mmioSeek (pVidInfo->hmmioSS,
  7705.                                   lPosDesired,
  7706.                                   sSeekMode);
  7707.  
  7708.      /********************************************
  7709.       * Ensure we did not move to within the header
  7710.       ********************************************/
  7711.      if ((lNewFilePosition != MMIO_ERROR) &&
  7712.          (lNewFilePosition < MMOTION_HEADER_SIZE))
  7713.         {
  7714.         lNewFilePosition = mmioSeek (pVidInfo->hmmioSS,
  7715.                                       (LONG)MMOTION_HEADER_SIZE,
  7716.                                       SEEK_SET);
  7717.         }
  7718.  
  7719.      /************************************************************
  7720.       * Return new position.  Always remove the length of the
  7721.       *    header from the this position value
  7722.       ************************************************************/
  7723.      if (lNewFilePosition != MMIO_ERROR)
  7724.         lNewFilePosition -= MMOTION_HEADER_SIZE;
  7725.  
  7726.      return (lNewFilePosition);
  7727.      }  /* end case of MMIOM_SEEK */
  7728.  
  7729.  
  7730. ΓòÉΓòÉΓòÉ 6.4.4. MMIOM_CLOSE ΓòÉΓòÉΓòÉ
  7731.  
  7732. This message must be implemented by file format IOProcs to be able to properly 
  7733. close the file.  Note that the mmioClose function will call the mmioFlush 
  7734. function to empty the file I/O buffers (so this does not need to be performed 
  7735. by the IOProc message handler). 
  7736.  
  7737. A file format IOProc will call mmioClose with its internal HMMIO handle to 
  7738. close the file, unless it chooses to recognize the MMIO_FHOPEN flag available 
  7739. on mmioClose.  This flag allows the close processing to occur, but still allow 
  7740. the file handle to remain open.  If the file is an element of a compound file, 
  7741. it will need to possibly update the compound file header to reflect any changes 
  7742. that have been made to the file. 
  7743.  
  7744. The following example shows an example of how the M-Motion IOProc supports the 
  7745. MMIOM_CLOSE message. 
  7746.  
  7747. case MMIOM_CLOSE:
  7748.     {
  7749.     /************************************************************
  7750.      * Declare local variables.
  7751.      ************************************************************/
  7752.     PMMFILESTATUS   pVidInfo;         /* MMotion IOProc instance data */
  7753.  
  7754.     ULONG           ulHeight;         /* Image height                */
  7755.     USHORT          usBitCount;
  7756.     /* Image width, including overflow in 1bpp & 4bpp                */
  7757.     ULONG           ulImgPelWidth;
  7758.     PBYTE           lpYUVLine;        /* One line of packed YUV      */
  7759.     LONG            lYUVBytesPerLine;
  7760.  
  7761.     ULONG           ulMaxPelWidth;    /* # pels on 4-pel boundaries  */
  7762.     /* # pels on a YUV line in the output file                       */
  7763.     ULONG           ulYUVPelWidth;
  7764.     ULONG           ulRGBMaxBytesPerLine; /* #bytes on 4-pel bounds  */
  7765.     PBYTE           lpRGBLine;        /* One line of 24bit RGB       */
  7766.  
  7767.     PBYTE           lpImgBufPtr;      /* Current loc in RGB image buf*/
  7768.     LONG            lRGBBytesPerLine; /* #bytes on a line in image   */
  7769.     ULONG           ulRowCount;       /* loop counter                */
  7770.     LONG            lBytesWritten;    /* #bytes output on a write    */
  7771.     LONG            lRetCode;
  7772.     USHORT          rc;
  7773.  
  7774.     /***********************************************************
  7775.      * Check for valid MMIOINFO block.
  7776.      ***********************************************************/
  7777.     if (!pmmioinfo)
  7778.         return (MMIO_ERROR);
  7779.  
  7780.     /***********************************************************
  7781.      * Set up our working file status variable.
  7782.      ***********************************************************/
  7783.     pVidInfo = (PMMFILESTATUS)pmmioinfo->pExtraInfoStruct;
  7784.  
  7785.     /***********************************************************
  7786.      * Assume success for the moment....
  7787.      ***********************************************************/
  7788.     lRetCode = MMIO_SUCCESS;
  7789.  
  7790.     /************************************************************
  7791.      * see if we are in Write mode and have a buffer to write out.
  7792.      *    We have no image buffer in UNTRANSLATED mode.
  7793.      ************************************************************/
  7794.     if ((pmmioinfo->ulFlags & MMIO_WRITE) && (pVidInfo->lpImgBuf))
  7795.         {
  7796.         /*******************************************************
  7797.          * The buffer should be in palettized or 24-bit RGB
  7798.          * We must convert it to YUV to be written to the file.
  7799.          *******************************************************
  7800.          * The buffer should be complete.  If not, then we
  7801.          * should still close, but can flag an error to the
  7802.          * user that the data may be corrupted.  The only way
  7803.          * we can estimate if this is true is to check the final
  7804.          * position.  If not at the end...
  7805.          *******************************************************/
  7806.         if (pVidInfo->lImgBytePos !=
  7807.                                   (LONG)pVidInfo->ulImgTotalBytes)
  7808.             {
  7809.             lRetCode = MMIO_WARNING;
  7810.             }
  7811.         /*******************************************************
  7812.          * Set up width and height of image in the buffer.
  7813.          *******************************************************/
  7814.         ulHeight = pVidInfo->mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy;
  7815.         usBitCount =
  7816.             pVidInfo->mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;
  7817.  
  7818.         /*******************************************************
  7819.          * Get the line width in YUV pels and packed bytes.
  7820.          *******************************************************/
  7821.         ulYUVPelWidth = pVidInfo->mmotHeader.mmXlen;
  7822.         lYUVBytesPerLine = (LONG)(ulYUVPelWidth * 3) >> 1;
  7823.  
  7824.         /*******************************************************
  7825.          * This changes from OS/2 PM bottom-up bitmap form
  7826.          *    to M-Motion's top-down form.  Flip all pad, boundary
  7827.          *    bytes as well
  7828.          *******************************************************/
  7829.         ImgBufferFlip ((PBYTE)pVidInfo->lpImgBuf,
  7830.                                 pVidInfo->ulImgPaddedBytesPerLine,
  7831.                                 ulHeight);
  7832.  
  7833.         /*******************************************************
  7834.          * Determine number of POSSIBLE pels on a line, though
  7835.          *   some may be overflow in 1bpp and 4bpp modes.
  7836.          *
  7837.          * From that, we can calc the number of RGB pels we will
  7838.          *   create to represent this line.
  7839.          *******************************************************/
  7840.         ulImgPelWidth = (pVidInfo->ulImgPelBytesPerLine << 3) /
  7841.                                      usBitCount;
  7842.         lRGBBytesPerLine = ulImgPelWidth * 3;
  7843.  
  7844.         /*******************************************************
  7845.          * Ensure the width is on a 4-pel boundary, necessary for
  7846.          *     M-Motion.  We will buffer with black
  7847.          *    *** THIS IS ONLY NECESSARY FOR M-MOTION IMAGES
  7848.          *******************************************************/
  7849.         if (ulImgPelWidth % 4)
  7850.             ulMaxPelWidth = (((ulImgPelWidth >> 2) + 1) << 2);
  7851.         else
  7852.             ulMaxPelWidth = ulImgPelWidth;
  7853.  
  7854.         /* #RGB bytes/line = #pels * 3 bytes/pel */
  7855.         ulRGBMaxBytesPerLine = ulMaxPelWidth * 3;
  7856.  
  7857.  
  7858.         /*******************************************************
  7859.          * Create a buffer for one line of RGB data, accounting for
  7860.          *   the 4-pel boundary required.  Extra bytes won't be used.
  7861.          *******************************************************/
  7862.         if (DosAllocMem ((PPVOID) &lpRGBLine,
  7863.                          ulRGBMaxBytesPerLine,
  7864.                          fALLOC))
  7865.             return (MMIO_ERROR);
  7866.  
  7867.         /*******************************************************
  7868.          * Create a buffer for one line of YUV data.
  7869.          *******************************************************/
  7870.         if (DosAllocMem ((PPVOID) &lpYUVLine,
  7871.                          lYUVBytesPerLine,
  7872.                          fALLOC))
  7873.             return (MMIO_ERROR);
  7874.  
  7875.         /*******************************************************
  7876.          * Zero out RGB buffer to cover for any extra black pels
  7877.          * needed at the end.
  7878.          *******************************************************/
  7879.         memset (lpRGBLine, 0, ulRGBMaxBytesPerLine);
  7880.  
  7881.         /*******************************************************
  7882.          * Initialize start position of RGB buffer.
  7883.          *******************************************************/
  7884.         lpImgBufPtr = pVidInfo->lpImgBuf;
  7885.  
  7886.         /*******************************************************
  7887.          * Process Image Buffer - Save to file
  7888.          * Place "your" processing code here, if full image
  7889.          *      buffering is performed.
  7890.          * For M-Motion:
  7891.          *    Loop
  7892.          *       1.Convert and copy a line of 1bpp, 4bpp, 8 bpp or
  7893.          *            24bpp data into a temporary 24 bpp RGB line.
  7894.          *            This line may contain overflow garbage
  7895.          *            pels from 1bpp and 4bpp modes (where
  7896.          *            width does not fall on even byte boundaries.)
  7897.          *       2.Convert the temporary RGB line contents into a
  7898.          *           YUV line.  ONLY that data necessary converted.
  7899.          *           Overflow from bitmap data ignored.
  7900.          *       3.Write the YUV line to the file
  7901.          *******************************************************/
  7902.         for (ulRowCount = 0;
  7903.              ulRowCount < ulHeight;
  7904.              ulRowCount++)
  7905.             {
  7906.             /***************************************************
  7907.              * Convert 1 line of Image data into RGB data
  7908.              ***************************************************/
  7909.            switch (usBitCount)
  7910.                {
  7911.                case 1:
  7912.                    {
  7913.                    /* Convert 1bpp padded image buffer into 24-bit */
  7914.                    /*    RGB line buffer, w/pads                   */
  7915.                    Convert1BitTo24Bit (
  7916.                            (PBYTE)lpImgBufPtr,
  7917.                            (PRGB) lpRGBLine,
  7918.                            (PRGB) &(pVidInfo->rgbPalette),
  7919.                            pVidInfo->ulImgPelBytesPerLine);
  7920.                    break;
  7921.                    }
  7922.  
  7923.                case 4:
  7924.                    {
  7925.                    /* Convert data from app buffer into 24-bit and */
  7926.                    /*    copy into image buffer                    */
  7927.                    Convert4BitTo24Bit (
  7928.                            (PBYTE)lpImgBufPtr,
  7929.                            (PRGB) lpRGBLine,
  7930.                            (PRGB) &(pVidInfo->rgbPalette),
  7931.                            pVidInfo->ulImgPelBytesPerLine);
  7932.                    break;
  7933.                    }
  7934.  
  7935.                case 8:
  7936.                    {
  7937.                    /* Convert data from app buffer into 24-bit and */
  7938.                    /*    copy into image buffer                    */
  7939.                    Convert8BitTo24Bit (
  7940.                            (PBYTE)lpImgBufPtr,
  7941.                            (PRGB) lpRGBLine,
  7942.                            (PRGB) &(pVidInfo->rgbPalette),
  7943.                            pVidInfo->ulImgPelBytesPerLine);
  7944.                    break;
  7945.                    }
  7946.  
  7947.                case 24:
  7948.                    {
  7949.                    /* Copy raw RGB data from the image buffer into */
  7950.                    /*    the temporary                             */
  7951.                    /*   RGB line.  Only copy those pels necessary. */
  7952.                    /*    No conversion required                    */
  7953.                    memcpy ((PVOID) lpRGBLine,
  7954.                                   (PVOID) lpImgBufPtr,
  7955.                                   ulYUVPelWidth * 3);
  7956.                    break;
  7957.                    }
  7958.  
  7959.                }   /* end of Switch for Bit Conversion block */
  7960.  
  7961.             /***************************************************
  7962.              * Convert one line at a time from RGB to YUV.
  7963.              ***************************************************/
  7964.             ConvertOneLineRGBtoYUV (lpRGBLine,
  7965.                                     lpYUVLine,
  7966.                                     ulYUVPelWidth);
  7967.  
  7968.             /***************************************************
  7969.              * Write out line of YUV data to the file.
  7970.              ***************************************************/
  7971.             lBytesWritten  = mmioWrite (pVidInfo->hmmioSS,
  7972.                                         (PVOID) lpYUVLine,
  7973.                                         lYUVBytesPerLine);
  7974.  
  7975.             /* Check if error or EOF  */
  7976.             if (lBytesWritten != lYUVBytesPerLine)
  7977.                {
  7978.                lRetCode = lBytesWritten;
  7979.                break;
  7980.                }
  7981.  
  7982.             /***************************************************
  7983.              * Make sure bitmap image buffer pointer is correct
  7984.              *    for next line to be converted.  Move forward ALL
  7985.              *    the bytes in the bitmap line, including overflow
  7986.              *    and pad bytes.
  7987.              ***************************************************/
  7988.             lpImgBufPtr += pVidInfo->ulImgPaddedBytesPerLine;
  7989.             }
  7990.  
  7991.         /*******************************************************
  7992.          * Free temp buffers.
  7993.          *******************************************************/
  7994.         if (lpRGBLine)
  7995.            {
  7996.            DosFreeMem ((PVOID) lpRGBLine);
  7997.            }
  7998.  
  7999.         if (lpYUVLine)
  8000.            {
  8001.            DosFreeMem ((PVOID) lpYUVLine);
  8002.            }
  8003.         }  /* end IF WRITE & IMAGE BUFFER block */
  8004.  
  8005.     /***********************************************************
  8006.      * Free the RGB buffer, if it exists, that was created
  8007.      * for the translated READ operations.
  8008.      ***********************************************************/
  8009.     if (pVidInfo->lpRGBBuf)
  8010.        {
  8011.        DosFreeMem ((PVOID) pVidInfo->lpRGBBuf);
  8012.        }
  8013.  
  8014.     /***********************************************************
  8015.      * Free the IMG buffer, if it exists, that was created
  8016.      * for the translated  WRITE operations.
  8017.      ***********************************************************/
  8018.     if (pVidInfo->lpImgBuf)
  8019.        {
  8020.        DosFreeMem ((PVOID) pVidInfo->lpImgBuf);
  8021.        }
  8022.  
  8023.     /***********************************************************
  8024.      * Close the file with mmioClose.
  8025.      ***********************************************************/
  8026.     rc = mmioClose (pVidInfo->hmmioSS, 0);
  8027.  
  8028.     DosFreeMem ((PVOID) pVidInfo);
  8029.  
  8030.     if (rc != MMIO_SUCCESS)
  8031.        return (rc);
  8032.  
  8033.     return (lRetCode);
  8034.     }  /* end case of MMIOM_CLOSE */
  8035.  
  8036.  
  8037. ΓòÉΓòÉΓòÉ 6.4.5. MMIOM_IDENTIFYFILE ΓòÉΓòÉΓòÉ
  8038.  
  8039. The IOProc determines how to handle this message.  All IOProcs must support 
  8040. this message because mmioOpen sends MMIOM_IDENTIFYFILE when it attempts to 
  8041. automatically identify a file. 
  8042.  
  8043. For file format IOProcs, the header needs to be read and checked to see if it 
  8044. matches with what the IOProc expects.  The lParm2 field contains the handle 
  8045. used for the mmioRead function.  In the following example, the header is a 
  8046. M-Motion file that is compared with the expected string defined in the IOProc. 
  8047. If it compares correctly, the message returns TRUE; otherwise FALSE is 
  8048. returned. 
  8049.  
  8050. case MMIOM_IDENTIFYFILE:
  8051.     {
  8052.     /************************************************************
  8053.      * Declare local variables.
  8054.      ************************************************************/
  8055.     MMOTIONHEADER   mmotHeader;   /* M-Motion structure variable */
  8056.     HMMIO           hmmioTemp;    /* MMIO File Handle            */
  8057.     ULONG           ulWidth;
  8058.     ULONG           ulHeight;
  8059.     ULONG           ulRequiredFileLength;
  8060.     ULONG           ulActualFileLength;
  8061.     BOOL             fValidMMotionFile = FALSE;
  8062.  
  8063.     ULONG           ulTempFlags = MMIO_READ | MMIO_DENYWRITE |
  8064. MMIO_NOIDENTIFY;
  8065.                                    /* Flags used for temp open  */
  8066.                                    /* and close                 */
  8067.  
  8068.     /************************************************************
  8069.      * We need either a file name (lParam1) or file handle (lParam2)
  8070.      ************************************************************/
  8071.     if (!lParam1 && !lParam2)
  8072.         return (MMIO_ERROR);
  8073.  
  8074.     /* Copy the file handle, assuming one was provided... */
  8075.     hmmioTemp = (HMMIO)lParam2;
  8076.  
  8077.     /************************************************************
  8078.      * If no handle, then open the file using the string name
  8079.      ************************************************************/
  8080.     if (!hmmioTemp)
  8081.        {
  8082.        if (!(hmmioTemp = mmioOpen ((PSZ) lParam1,
  8083.                                   NULL,
  8084.                                   ulTempFlags)))
  8085.            {
  8086.            return (MMIO_ERROR);
  8087.            }
  8088.        }
  8089.  
  8090.     /************************************************************
  8091.      * Read in enough bytes to check out file.
  8092.      ************************************************************/
  8093.     if (sizeof (MMOTIONHEADER) !=
  8094.                     mmioRead (hmmioTemp,
  8095.                               (PVOID) &mmotHeader,
  8096.                               (ULONG) sizeof (MMOTIONHEADER)))
  8097.         {
  8098.         /********************************************************
  8099.          * Fail so close file and then return.
  8100.          ********************************************************/
  8101.         if (!lParam2) /* Don't close handle if provided to us  */
  8102.            mmioClose (hmmioTemp, 0);
  8103.         return (MMIO_ERROR);
  8104.         }
  8105.  
  8106.     /************************************************************
  8107.      * Close file before returning.
  8108.      ************************************************************/
  8109.     if (!lParam2) /* Don't close handle if provided to us  */
  8110.        mmioClose (hmmioTemp, 0);
  8111.  
  8112.     /************************************************************
  8113.      * Check validity of file and return result.
  8114.      ************************************************************/
  8115.     if (memcmp (mmotHeader.mmID, "YUV12C", 6) == 0)
  8116.         {
  8117.         ulWidth = mmotHeader.mmXlen;
  8118.         ulHeight = mmotHeader.mmYlen;
  8119.  
  8120.         /* Calculate what the length of the file SHOULD be based on the */
  8121.         /*   header contents                                            */
  8122.         ulRequiredFileLength = (((ulWidth >> 2) * 6) * ulHeight) +
  8123.                                                sizeof (MMOTIONHEADER);
  8124.  
  8125.         /* Query what the ACTUAL length of the file is                  */
  8126.         ulActualFileLength = (ULONG)mmioSeek (hmmioTemp, 0, SEEK_END);
  8127.  
  8128.         /* If these don't match, then it isn't a VALID M-Motion file    */
  8129.         /*     - regardless of what the header says.                    */
  8130.         if (ulRequiredFileLength == ulActualFileLength)
  8131.            fValidMMotionFile = TRUE;
  8132.         else
  8133.            fValidMMotionFile = FALSE;
  8134.         }  /* end header check block */
  8135.  
  8136.     /************************************************************
  8137.      * Close file before returning.
  8138.      ************************************************************/
  8139.     if (!lParam2)  /* Don't close handle if provided to us      */
  8140.        mmioClose (hmmioTemp, 0);
  8141.  
  8142.     if (fValidMMotionFile)
  8143.        return (MMIO_SUCCESS);
  8144.     else
  8145.        return (MMIO_ERROR);
  8146.     } /* end case of MMIOM_IDENTIFYFILE */
  8147.  
  8148.  
  8149. ΓòÉΓòÉΓòÉ 6.4.6. MMIOM_GETFORMATINFO ΓòÉΓòÉΓòÉ
  8150.  
  8151. This message requests information about the format of the IOProc.  MMIO 
  8152. provides a list of MMFORMATINFO structures containing descriptive information 
  8153. about the formats supported by currently installed IOProcs; for example, the 
  8154. format name, the FOURCC identifier, and related information.  If this message 
  8155. is not defined in the IOProc or the IOProc does not handle the request 
  8156. successfully, mmioGetFormatInfo creates a blank MMFORMATINFO structure and 
  8157. attaches it to the internal list.  It is recommended to hard-code the actual 
  8158. format information in the IOProc message handler code for the ulStructLen, 
  8159. fccIOProc, ulMediaType, and ulFlags fields.  In addition, store other 
  8160. information (ulCodePage, ulLanguage, lNameLength, and aulDefaultFormatExt if 
  8161. any) in a resource file for NLS considerations. 
  8162.  
  8163. The following example shows an example of how the M-Motion IOProc supports the 
  8164. MMIOM_GETFORMATINFO message. 
  8165.  
  8166. case MMIOM_GETFORMATINFO:
  8167.     {
  8168.     /***********************************************************
  8169.      * Declare local variables.
  8170.      ***********************************************************/
  8171.     PMMFORMATINFO       pmmformatinfo;
  8172.  
  8173.     /************************************************************
  8174.      * Set pointer to MMFORMATINFO structure.
  8175.      ************************************************************/
  8176.     pmmformatinfo = (PMMFORMATINFO) lParam1;
  8177.  
  8178.     /************************************************************
  8179.      * Fill in the values for the MMFORMATINFO structure.
  8180.      ************************************************************/
  8181.     pmmformatinfo->ulStructLen  = sizeof (MMFORMATINFO);
  8182.     pmmformatinfo->fccIOProc    = FOURCC_MMOT;
  8183.     pmmformatinfo->ulIOProcType = MMIO_IOPROC_FILEFORMAT;
  8184.     pmmformatinfo->ulMediaType  = MMIO_MEDIATYPE_IMAGE;
  8185.  
  8186.     pmmformatinfo->ulFlags      = MMIO_CANREADTRANSLATED        |
  8187.                                   MMIO_CANREADUNTRANSLATED      |
  8188.                                   MMIO_CANWRITETRANSLATED       |
  8189.                                   MMIO_CANWRITEUNTRANSLATED     |
  8190.                                   MMIO_CANREADWRITEUNTRANSLATED |
  8191.                                   MMIO_CANSEEKTRANSLATED        |
  8192.                                   MMIO_CANSEEKUNTRANSLATED;
  8193.  
  8194.     strcpy ((PSZ) pmmformatinfo->szDefaultFormatExt, pszMotionExt);
  8195.     if (GetNLSData( &pmmformatinfo->ulCodePage,
  8196.                     &pmmformatinfo->ulLanguage ))
  8197.        {
  8198.        return( -1L );
  8199.        }
  8200.  
  8201.     if (GetFormatStringLength( FOURCC_MMOT,
  8202.                                &(pmmformatinfo->lNameLength) ))
  8203.        {
  8204.        return( -1L );
  8205.        }
  8206.  
  8207.  
  8208.     /************************************************************
  8209.      * Return success back to the application.
  8210.      ************************************************************/
  8211.     return (MMIO_SUCCESS);
  8212.     } /* end case of MMIOM_GETFORMATINFO */
  8213.  
  8214.  
  8215. ΓòÉΓòÉΓòÉ 6.4.7. MMIOM_GETFORMATNAME ΓòÉΓòÉΓòÉ
  8216.  
  8217. This message requests the descriptive format name supported by the IOProc. It 
  8218. is recommended to contain the strings in resource files for NLS considerations. 
  8219.  
  8220. The following example shows an example of how the M-Motion IOProc supports the 
  8221. MMIOM_GETFORMATNAME message. 
  8222.  
  8223. case MMIOM_GETFORMATNAME:
  8224.     {
  8225.     LONG lBytesCopied;
  8226.  
  8227.     /************************************************************
  8228.      * Copy the M-Motion format string into buffer supplied by
  8229.      * lParam1.  Only put in the amount of my string up to the
  8230.      * allocated amount which is in lParam2.  Leave enough room
  8231.      * for the NULL termination.
  8232.      ************************************************************/
  8233.     lBytesCopied = GetFormatString( FOURCC_MMOT,
  8234.                                     (char *)lParam1,
  8235.                                     lParam2 );
  8236.  
  8237.     return (lBytesCopied);
  8238.     } /* end case of MMIOM_GETFORMATNAME */
  8239.  
  8240.  
  8241. ΓòÉΓòÉΓòÉ 6.4.8. MMIOM_QUERYHEADERLENGTH ΓòÉΓòÉΓòÉ
  8242.  
  8243. This message requests the IOProc to return the size of the header for the 
  8244. current file or file element opened by mmioOpen.  The mmioQueryHeaderLength 
  8245. function issues a MMIOM_QUERYHEADERLENGTH message to determine the buffer size 
  8246. that is needed by mmioGetHeader to obtain header data.  This is necessary 
  8247. because headers vary in length. 
  8248.  
  8249. To implement this message, save the current file position by using mmioSeek, 
  8250. then issue a call to mmioRead to read the size of the header into a buffer. 
  8251. The read can be done without a seek because mmioQueryHeaderLength saves the 
  8252. current file position when the call is issued.  It seeks the file to its 
  8253. beginning, then seeks it back to the saved file position after the IOProc is 
  8254. called.  The use of mmioRead is important here if the file is using buffered 
  8255. I/O so that all of MMIO's internal data fields are properly maintained 
  8256. throughout the message processing.  It will allow subsequent file reads after 
  8257. this message is called to occur at the proper place in the file. 
  8258.  
  8259. The following example shows an example of how the M-Motion IOProc supports the 
  8260. MMIOM_QUERYHEADERLENGTH message. 
  8261.  
  8262. case MMIOM_QUERYHEADERLENGTH:
  8263.     {
  8264.     /************************************************************
  8265.      * If there is no MMIOINFO block then return an error.
  8266.      ************************************************************/
  8267.     if (!pmmioinfo)
  8268.         return (0);
  8269.  
  8270.     /************************************************************
  8271.      * If header is in translated mode then return the media
  8272.      * type specific structure size.
  8273.      ************************************************************/
  8274.     if (pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER)
  8275.         return (sizeof (MMIMAGEHEADER));
  8276.  
  8277.     else
  8278.         /********************************************************
  8279.          * Header is not in translated mode so return the size
  8280.          * of the M-Motion header.
  8281.          ********************************************************/
  8282.         return (sizeof (MMOTIONHEADER));
  8283.  
  8284.     break;
  8285.     } /* end case of MMIOM_QUERYHEADERLENGTH */
  8286.  
  8287.  
  8288. ΓòÉΓòÉΓòÉ 6.4.9. MMIOM_GETHEADER ΓòÉΓòÉΓòÉ
  8289.  
  8290. This message requests the IOProc to return header-specific information about 
  8291. the current file or file element opened for reading by mmioOpen; for example, 
  8292. media type, media structure, and the size of the media structure.  When you 
  8293. call mmioRead to read in the file header, use the size of the header, which is 
  8294. passed in by the lParam2 parameter. 
  8295.  
  8296. When the translate header is TRUE, the IOProc is expected to return the 
  8297. standard presentation header structure for that media type.  The IOProc must 
  8298. transpose the file's native header data into that structure. 
  8299.  
  8300. The following example shows an example of how the M-Motion IOProc supports the 
  8301. MMIOM_GETHEADER message. 
  8302.  
  8303. case MMIOM_GETHEADER:
  8304.     {
  8305.     /************************************************************
  8306.      * Declare local variables.
  8307.      ************************************************************/
  8308.     PMMFILESTATUS       pVidInfo;
  8309.  
  8310.     /************************************************************
  8311.      * Check for valid MMIOINFO block.
  8312.      ************************************************************/
  8313.     if (!pmmioinfo)
  8314.         return (0);
  8315.  
  8316.     /************************************************************
  8317.      * Set up our working file status variable.
  8318.      ************************************************************/
  8319.     pVidInfo = (PMMFILESTATUS)pmmioinfo->pExtraInfoStruct;
  8320.  
  8321.     /**************************************************
  8322.      * Getheader only valid in READ or READ/WRITE mode.
  8323.      * There is no header to get in WRITE mode.  We
  8324.      * must also have a valid file handle to read from
  8325.      **************************************************/
  8326.     if ((pmmioinfo->ulFlags & MMIO_WRITE) ||
  8327.         (!(pVidInfo->hmmioSS)))
  8328.        return (0);
  8329.  
  8330.     /************************************************************
  8331.      * Check for Translation mode.
  8332.      ************************************************************/
  8333.     if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER))
  8334.         {
  8335.         /********************************************************
  8336.          * Translation is off.
  8337.          ********************************************************/
  8338.         if (lParam2 < sizeof (MMOTIONHEADER))
  8339.             {
  8340.             pmmioinfo->ulErrorRet = MMIOERR_INVALID_BUFFER_LENGTH;
  8341.             return (0);
  8342.             }
  8343.  
  8344.         if (!lParam1)
  8345.             {
  8346.             pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
  8347.             return (0);
  8348.             }
  8349.  
  8350.         /********************************************************
  8351.          * Read in first 16 bytes to fill up M-Motion header.
  8352.          ********************************************************/
  8353.         memcpy ((PVOID) lParam1,
  8354.                 (PVOID)&pVidInfo->mmotHeader,
  8355.                 sizeof (MMOTIONHEADER));
  8356.  
  8357.         /* Indicate that the header has been set, which    */
  8358.         /* is meaningless in read mode, but allows the     */
  8359.         /* application to do writes in read/write mode     */
  8360.         pVidInfo->bSetHeader = TRUE;
  8361.  
  8362.         return (sizeof (MMOTIONHEADER));
  8363.         }   /* end IF NOT TRANSLATED block */
  8364.  
  8365.     /******************
  8366.      * TRANSLATION IS ON
  8367.      ******************/
  8368.     if (lParam2 < sizeof (MMIMAGEHEADER))
  8369.         {
  8370.         pmmioinfo->ulErrorRet = MMIOERR_INVALID_BUFFER_LENGTH;
  8371.         return (0);
  8372.         }
  8373.  
  8374.     if (!lParam1)
  8375.         {
  8376.         pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
  8377.         return (0);
  8378.         }
  8379.  
  8380.     memcpy ((PVOID)lParam1,
  8381.             (PVOID)&pVidInfo->mmImgHdr,
  8382.             sizeof (MMIMAGEHEADER));
  8383.  
  8384.     return (sizeof (MMIMAGEHEADER));
  8385.     } /* end case of MMIOM_GETHEADER */
  8386.  
  8387.  
  8388. ΓòÉΓòÉΓòÉ 6.4.10. MMIOM_SETHEADER ΓòÉΓòÉΓòÉ
  8389.  
  8390. This message requests the IOProc to set header-specific information in a file 
  8391. opened for writing by mmioOpen.  This would include data such as resolution and 
  8392. colors for images, and duration and sample rate for audio. 
  8393.  
  8394. When the translate header is TRUE, the IOProc should expect to be passed the 
  8395. standard presentation header for that media type.  The IOProc is expected to 
  8396. transpose the data from that structure into its native header structure before 
  8397. writing the header to the file. 
  8398.  
  8399. The following example shows an example of how the M-Motion IOProc supports the 
  8400. MMIOM_SETHEADER message. 
  8401.  
  8402. case MMIOM_SETHEADER:
  8403.      {
  8404.      /************************************************************
  8405.       * Declare local variables.
  8406.       ************************************************************/
  8407.      PMMIMAGEHEADER          pMMImgHdr;
  8408.      PMMFILESTATUS           pVidInfo;
  8409.      USHORT                  usNumColors;
  8410.      ULONG                   ulImgBitsPerLine;
  8411.      ULONG                   ulImgBytesPerLine;
  8412.      ULONG                   ulBytesWritten;
  8413.      ULONG                   ulWidth;
  8414.      ULONG                   ul4PelWidth;
  8415.      ULONG                   ulHeight;
  8416.      USHORT                  usPlanes;
  8417.      USHORT                  usBitCount;
  8418.      USHORT                  usPadBytes;
  8419.  
  8420.      /************************************************************
  8421.       * Check for valid MMIOINFO block.
  8422.       ************************************************************/
  8423.      if (!pmmioinfo)
  8424.          return (MMIO_ERROR);
  8425.  
  8426.      /************************************************************
  8427.       * Set up our working variable MMFILESTATUS.
  8428.       ************************************************************/
  8429.      pVidInfo = (PMMFILESTATUS) pmmioinfo->pExtraInfoStruct;
  8430.  
  8431.      /************************************************************
  8432.       * Only allow this function if we are in WRITE mode
  8433.       * And only if we have not already set the header
  8434.       ************************************************************/
  8435.      if ((!(pmmioinfo->ulFlags & MMIO_WRITE)) ||
  8436.          (!(pVidInfo->hmmioSS)) ||
  8437.          (pVidInfo->bSetHeader))
  8438.          return (0);
  8439.  
  8440.      /********************************************************
  8441.       * Make sure lParam1 is a valid pointer
  8442.       ********************************************************/
  8443.      if (!lParam1)
  8444.          {
  8445.          pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
  8446.          return (0);
  8447.          }
  8448.  
  8449.      /************************************************************
  8450.       * Header is not in translated mode.
  8451.       ************************************************************/
  8452.      if (!(pmmioinfo->ulTranslate & MMIO_TRANSLATEHEADER))
  8453.          {
  8454.          /********************************************************
  8455.           * Make sure lParam2 is correct size
  8456.           ********************************************************/
  8457.          if (lParam2 != MMOTION_HEADER_SIZE)
  8458.              {
  8459.              pmmioinfo->ulErrorRet = MMIOERR_INVALID_BUFFER_LENGTH;
  8460.              return (0);
  8461.              }
  8462.  
  8463.          /********************************************************
  8464.           * Ensure that the header at least begins with "YUV12C"
  8465.           ********************************************************/
  8466.          if (strncmp ((char *)lParam1, "YUV12C", 6))
  8467.             {
  8468.             pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
  8469.             return (0);
  8470.             }
  8471.  
  8472.          /********************************************************
  8473.           * Take 16 byte buffer (lParam1), write to file and .
  8474.           *    copy to internal structure.
  8475.           ********************************************************/
  8476.          memcpy ((PVOID)&pVidInfo->mmotHeader,
  8477.                  (PVOID)lParam1, (ULONG) MMOTION_HEADER_SIZE);
  8478.          ulBytesWritten = mmioWrite (pVidInfo->hmmioSS,
  8479.                                      (PVOID) lParam1,
  8480.                                      (ULONG) MMOTION_HEADER_SIZE);
  8481.  
  8482.          /*********************************
  8483.           * Check for an error on the write..
  8484.           *********************************/
  8485.          if (ulBytesWritten != MMOTION_HEADER_SIZE)
  8486.              return (0);   /* 0 indicates error */
  8487.  
  8488.          /*********************************
  8489.           * Success...
  8490.           *********************************/
  8491.          pVidInfo->bSetHeader = TRUE;
  8492.          return (sizeof (MMOTIONHEADER));
  8493.          }  /* end IF NOT TRANSLATED block */
  8494.  
  8495.      /************************************************************
  8496.       * Header is translated.
  8497.       ************************************************************/
  8498.  
  8499.      /************************************************************
  8500.       * Create local pointer media specific structure.
  8501.       ************************************************************/
  8502.      pMMImgHdr = (PMMIMAGEHEADER) lParam1;
  8503.  
  8504.  
  8505.      /************************************************************
  8506.       * Check for validity of header contents supplied
  8507.       ************************************************************
  8508.       *  --  Length must be that of the standard header
  8509.       *  --  NO Compression
  8510.       *      1 plane
  8511.       *      24, 8, 4 or 1 bpp
  8512.       ************************************************************/
  8513.      usBitCount = pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cBitCount;
  8514.      if ((pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.ulCompression !=
  8515.           BCA_UNCOMP) ||
  8516.          (pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cPlanes != 1) ||
  8517.          (! ((usBitCount == 24) || (usBitCount == 8) ||
  8518.              (usBitCount == 4) || (usBitCount == 1)))
  8519.         )
  8520.          {
  8521.          pmmioinfo->ulErrorRet = MMIOERR_INVALID_STRUCTURE;
  8522.          return (0);
  8523.          }
  8524.  
  8525.      if (lParam2 != sizeof (MMIMAGEHEADER))
  8526.         {
  8527.         pmmioinfo->ulErrorRet = MMIOERR_INVALID_BUFFER_LENGTH;
  8528.         return (0);
  8529.         }
  8530.  
  8531.      /************************************************************
  8532.       * Complete MMOTIONHEADER.
  8533.       ************************************************************/
  8534.      memcpy ((PVOID)&pVidInfo->mmotHeader.mmID, "YUV12C", 6);
  8535.      pVidInfo->mmotHeader.mmXorg  = 0;
  8536.      pVidInfo->mmotHeader.mmYorg  = 0;
  8537.  
  8538.      /********************************************************
  8539.       * Ensure we will save stuff on 4-pel boundaries when
  8540.       * we actually convert to YUV and pack the bits.
  8541.       * We don't change what the user is actually going to
  8542.       * give us.  The user thinks he is on 1-pel boundaries,
  8543.       * and that is how we buffer the RGB data.
  8544.       ********************************************************/
  8545.      ulWidth  = pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cx;
  8546.      ulHeight = pMMImgHdr->mmXDIBHeader.BMPInfoHeader2.cy;
  8547.      if (ulWidth % 4)
  8548.          ul4PelWidth = (((ulWidth >> 2) + 1) << 2);
  8549.      else
  8550.          ul4PelWidth = ulWidth;
  8551.      pVidInfo->mmotHeader.mmXlen  = (USHORT) ul4PelWidth;
  8552.      pVidInfo->mmotHeader.mmYlen  = (USHORT) ulHeight;
  8553.  
  8554.      /************************************************************
  8555.       * Write the M-Motion Header.
  8556.       ************************************************************/
  8557.      ulBytesWritten = mmioWrite (pVidInfo->hmmioSS,
  8558.                                  (PVOID) &pVidInfo->mmotHeader,
  8559.                                  (ULONG) MMOTION_HEADER_SIZE);
  8560.  
  8561.      /***************************************
  8562.       * Check for an error on the write...
  8563.       ***************************************/
  8564.      if (ulBytesWritten != MMOTION_HEADER_SIZE)
  8565.          return (0);
  8566.  
  8567.      /************************************************************
  8568.       * Flag that MMIOM_SETHEADER has been done.  It can only
  8569.       * be done ONCE for a file.  All future attempts will
  8570.       * be flagged as errors.
  8571.       ************************************************************/
  8572.      pVidInfo->bSetHeader = TRUE;
  8573.  
  8574.      /************************************************************
  8575.       * Create copy of MMIMAGEHEADER for future use.
  8576.       ************************************************************/
  8577.      pVidInfo->mmImgHdr = *pMMImgHdr;
  8578.  
  8579.      /************************************************************
  8580.       * Check bitcount, set palette if less than 24.
  8581.       ************************************************************/
  8582.      if (usBitCount < 24)
  8583.         {
  8584.         /*********************************************************
  8585.          * Find out how many colors are in the palette.
  8586.          *********************************************************/
  8587.         usNumColors = (USHORT)(1 << usBitCount);
  8588.  
  8589.         /*********************************************************
  8590.          * Take the RGB2 palette and convert it to an RGB palette
  8591.          *    Place the converted palette in MMFILESTATUS struct
  8592.          *********************************************************/
  8593.         RGB2_To_RGB (pVidInfo->mmImgHdr.bmiColors,
  8594.                      (PRGB) &(pVidInfo->rgbPalette),
  8595.                      usNumColors);
  8596.         }
  8597.  
  8598.      /*********************************************************
  8599.       * We must allocate the buffer.  The app will load the
  8600.       * buffer on subsequent write calls.
  8601.       *********************************************************/
  8602.      usPlanes = pVidInfo->mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cPlanes;
  8603.  
  8604.      /********************************************************
  8605.       * Determine total Image size
  8606.       ********************************************************
  8607.       * Find bits-per-line BEFORE padding and 1bpp or 4bpp pel overflow
  8608.       ********************************************************/
  8609.      ulImgBitsPerLine = ulWidth * usPlanes * usBitCount;
  8610.      ulImgBytesPerLine = ulImgBitsPerLine >> 3;
  8611.  
  8612.      /********************************************************
  8613.       * Account for extra pels not on an even byte boundary
  8614.       *   for 1bpp and 4bpp
  8615.       ********************************************************/
  8616.      if (ulImgBitsPerLine % 8)
  8617.         ulImgBytesPerLine ++;
  8618.  
  8619.      pVidInfo->ulImgPelBytesPerLine = ulImgBytesPerLine;
  8620.  
  8621.      /********************************************************
  8622.       * Ensure the row length in bytes accounts for byte padding.
  8623.       *   All bitmap data rows are aligned on LONG/4-BYTE boundaries.
  8624.       *   The data FROM an application should always appear in this form
  8625.       ********************************************************/
  8626.      usPadBytes = (USHORT)(ulImgBytesPerLine % 4);
  8627.      if (usPadBytes)
  8628.         ulImgBytesPerLine += 4 - usPadBytes;
  8629.  
  8630.      pVidInfo->ulImgPaddedBytesPerLine  = ulImgBytesPerLine;
  8631.      pVidInfo->ulImgTotalBytes = ulImgBytesPerLine * ulHeight;
  8632.  
  8633.      /********************************************************
  8634.       * Get space for full image buffer.
  8635.       ********************************************************/
  8636.      if (DosAllocMem ((PPVOID) &(pVidInfo->lpImgBuf),
  8637.                        pVidInfo->ulImgTotalBytes,
  8638.                        fALLOC))
  8639.          return (MMIO_ERROR);
  8640.  
  8641.      /********************************************************
  8642.       * Set up initial pointer value within RGB buffer & image
  8643.       ********************************************************/
  8644.      pVidInfo->lImgBytePos = 0;
  8645.  
  8646.      return (sizeof (MMIMAGEHEADER));
  8647.      }  /* end case of MMIOM_SETHEADER */
  8648.  
  8649.  
  8650. ΓòÉΓòÉΓòÉ 6.5. CODEC Support ΓòÉΓòÉΓòÉ
  8651.  
  8652. The following sections examine the Ultimotion IOProc (ULIOT) sample (located in 
  8653. the \TOOLKIT\SAMPLES\MM\ULTIMOIO subdirectory), which includes source code to 
  8654. compress or decompress a data object.  The ULIOT I/O procedure calls the 
  8655. Ultimotion CODEC procedure to compress raw digital images into a smaller form 
  8656. so they can use less storage space.  To play motion video, the ULIOT sample can 
  8657. also call the decompressor part of the CODEC procedure to reconstruct the 
  8658. original image from the compressed data. 
  8659.  
  8660.  
  8661. ΓòÉΓòÉΓòÉ 6.5.1. Decompression ΓòÉΓòÉΓòÉ
  8662.  
  8663. The following section illustrates how to decompress an image to play motion 
  8664. video.  Follow these steps for decompression support: 
  8665.  
  8666.    1. Open the file and determine which CODEC(s) are required. 
  8667.    2. Load the CODEC DLL file. 
  8668.    3. Load and initialize the CODEC procedure. 
  8669.    4. Call the CODEC to decompress data. 
  8670.    5. Close the CODEC and release resources after use. 
  8671.  
  8672.  
  8673. ΓòÉΓòÉΓòÉ 6.5.1.1. Opening an Image Object ΓòÉΓòÉΓòÉ
  8674.  
  8675. To play back or decompress an image object, you must first open the movie file 
  8676. to find the four-character code (FOURCC) of the compression type and initiate 
  8677. the track information (as shown in the following example). The open routine 
  8678. allows for multiple compression types per stream. 
  8679.  
  8680. LONG IOProcOpen (PMMIOINFO pmmioinfo, PSZ pszFileName) {
  8681.    LONG            rc = MMIO_SUCCESS;        /* Return code.           */
  8682.    LONG            lFilePosition;            /* Logical file position. */
  8683.    MMIOINFO        Localmmioinfo;            /* For locally used.      */
  8684.    PINSTANCE       pinstance;                /* Local work structure.  */
  8685.  
  8686.    if (pmmioinfo == NULL) return MMIO_ERROR;
  8687.  
  8688.    if (CheckMem((PVOID)pmmioinfo, sizeof(MMIOINFO), PAG_WRITE))
  8689.       return MMIO_ERROR;
  8690.  
  8691.    /********************************************************************/
  8692.    /* Validate the open flags for this File Format IOProc              */
  8693.    /* (INVALID_OPEN_FLAGS should be defined in the ff.h - file format  */
  8694.    /*  specific header file.)                                          */
  8695.    /********************************************************************/
  8696.  
  8697.    if (pmmioinfo->ulFlags  & INVALID_OPEN_FLAGS) {
  8698.        pmmioinfo->ulErrorRet = MMIOERR_INVALID_ACCESS_FLAG;
  8699.        return(MMIO_ERROR);
  8700.    }
  8701.  
  8702.    ENTERCRITX;
  8703.    if ((pinstance = (PINSTANCE)HhpAllocMem(hheap,sizeof(INSTANCE)))
  8704.          == NULL) {
  8705.        EXITCRIT;
  8706.        pmmioinfo->ulErrorRet = MMIOERR_OUTOFMEMORY;
  8707.        return(MMIO_ERROR);                  /* Allocate work struct. */
  8708.    }
  8709.    EXITCRIT;
  8710.  
  8711.    pmmioinfo->pExtraInfoStruct = (PVOID) pinstance;
  8712.    pmmioinfo->fccIOProc = HEX_FOURCC_FFIO; /* Set for CODEC loading. */
  8713.    ioInstanceInit(pinstance);
  8714.  
  8715.    /* Validate read flags before doing read initialization */
  8716.  
  8717.    if (( pmmioinfo->ulFlags & MMIO_READ ) &&
  8718.                 !( pmmioinfo->ulFlags & INVALID_READ_FLAGS )) {
  8719.  
  8720.       /* IOProc identifies Storage System */
  8721.  
  8722.       memcpy (&Localmmioinfo, pmmioinfo, sizeof(MMIOINFO));
  8723.       Localmmioinfo.pIOProc = NULL;
  8724.       Localmmioinfo.fccIOProc = pmmioinfo->fccChildIOProc;
  8725.       Localmmioinfo.ulFlags |= MMIO_NOIDENTIFY; /* Eliminate callbacks */
  8726.       Localmmioinfo.ulFlags &= ~MMIO_ALLOCBUF;  /* Force non-buffered open */
  8727.  
  8728.       rc = ioIdentifyStorageSystem(&Localmmioinfo,pszFileName);
  8729.  
  8730.       if (rc != MMIO_SUCCESS) {        /* if error,                  */
  8731.          ioCleanUp(pmmioinfo);
  8732.          return(rc);
  8733.       }
  8734.  
  8735.       /******************************************************/
  8736.       /* Allocate memory for pTempBuffer which is used when */
  8737.       /* IOProcReadInterLeaved is called.                   */
  8738.       /******************************************************/
  8739.  
  8740.       if (ENTERCRIT(rc)) {
  8741.          ioCleanUp(pmmioinfo);
  8742.          return(rc);
  8743.       }
  8744.  
  8745.       if ((pinstance->pTempBuffer = HhpAllocMem(hheap, DEFAULTBUFFERSIZE))
  8746.          == NULL) {
  8747.          EXITCRIT;
  8748.          ioCleanUp(pmmioinfo);
  8749.          return(MMIOERR_OUTOFMEMORY);
  8750.       }
  8751.       EXITCRIT;
  8752.       pinstance->ulTempBufferSize = DEFAULTBUFFERSIZE;
  8753.  
  8754.       /*****************************************************/
  8755.       /* Open Movie file                                   */
  8756.       /*****************************************************/
  8757.  
  8758.       if ( pmmioinfo->fccChildIOProc != FOURCC_MEM ) {
  8759.          Localmmioinfo.cchBuffer = 0;
  8760.          Localmmioinfo.pchBuffer = NULL;
  8761.       }
  8762.       pinstance->hmmioFileHandle = mmioOpen(pszFileName,
  8763.          &Localmmioinfo,MMIO_NOIDENTIFY);
  8764.            /* Test file open error.*/
  8765.       if (pinstance->hmmioFileHandle <= (HMMIO)0L) {
  8766.          rc = Localmmioinfo.ulErrorRet;
  8767.       }
  8768.  
  8769.       /*****************************************************/
  8770.       /* Call file format specific open routine            */
  8771.       /*****************************************************/
  8772.  
  8773.       else if (!(rc = ffOpenRead(pmmioinfo, pinstance))) {
  8774.          if(!(rc = ioAddTracksToMovieHeader(pinstance))) {
  8775.  
  8776.             /*********************************************************/
  8777.             /* Set lLogicalFilePos to a position pass the header     */
  8778.             /* block to allow read occurring at the first byte of    */
  8779.             /* non-header data.                                      */
  8780.             /*********************************************************/
  8781.             lFilePosition = ffSeekToDataBegin(pmmioinfo,pinstance);
  8782.             if (lFilePosition < MMIO_SUCCESS)
  8783.                rc = MMIO_ERROR;
  8784.             else
  8785.                pinstance->lFileCurrentPosition = lFilePosition;
  8786.          }
  8787.       }
  8788.  
  8789.       if (rc) {
  8790.          ioCleanUp(pmmioinfo);
  8791.          return(rc);
  8792.       }
  8793.    }
  8794.  
  8795.    /* Validate Write flags before doing initialization */
  8796.  
  8797. #ifndef WORKSHOP
  8798.  
  8799.    if ((pmmioinfo->ulFlags & (MMIO_READWRITE | MMIO_WRITE)) &&
  8800.                 !(pmmioinfo->ulFlags & INVALID_WRITE_FLAGS)) {
  8801.  
  8802.       /* Open the movie file */
  8803.  
  8804.       memset (&Localmmioinfo, '\0', sizeof(MMIOINFO));
  8805.       Localmmioinfo.pIOProc   = NULL;
  8806.       Localmmioinfo.fccIOProc = pmmioinfo->fccChildIOProc;
  8807.  
  8808.       if (pmmioinfo->fccChildIOProc != FOURCC_MEM) {
  8809.          Localmmioinfo.cchBuffer = 0;
  8810.          Localmmioinfo.pchBuffer = NULL;
  8811.       }
  8812.  
  8813.       Localmmioinfo.ulFlags |= MMIO_NOIDENTIFY; /* Eliminate callbacks */
  8814.       Localmmioinfo.ulFlags &= ~MMIO_ALLOCBUF;  /* Force non-buffered open. */
  8815.                                                 /* MMIO may do buffering. */
  8816.  
  8817.       pinstance->hmmioFileHandle = mmioOpen(pszFileName, &Localmmioinfo,
  8818.                                          MMIO_READWRITE | MMIO_NOIDENTIFY);
  8819.  
  8820.       if (pinstance->hmmioFileHandle <= (HMMIO)0L) /* Test file open error. */
  8821.          rc = Localmmioinfo.ulErrorRet;
  8822.       else
  8823.          /* Call file format specific open routine */
  8824.          rc = ffOpenWrite(pmmioinfo, pinstance);
  8825.  
  8826.       if (rc != 0) {
  8827.          ioCleanUp(pmmioinfo);
  8828.          return(rc);
  8829.       }
  8830.    }
  8831.  
  8832. #else    /* WORKSHOP next */
  8833.  
  8834.    if ((pmmioinfo->ulFlags & (MMIO_READWRITE | MMIO_WRITE)) &&
  8835.                 !(pmmioinfo->ulFlags & INVALID_WRITE_FLAGS)) {
  8836.  
  8837.       /* Open the movie file */
  8838.  
  8839.       memset (&Localmmioinfo, '\0', sizeof(MMIOINFO));
  8840.       Localmmioinfo.pIOProc   = NULL;
  8841.       Localmmioinfo.fccIOProc = pmmioinfo->fccChildIOProc;
  8842.       Localmmioinfo.ulFlags  = pmmioinfo->ulFlags;
  8843.       Localmmioinfo.ulFlags |= MMIO_NOIDENTIFY; /* Eliminate callbacks */
  8844.       Localmmioinfo.ulFlags &= ~MMIO_ALLOCBUF;  /* Force non-buffered open. */
  8845.                                                 /* MMIO may do buffering. */
  8846.  
  8847.       if (!(pmmioinfo->ulFlags & MMIO_CREATE)) {
  8848.          rc = ioIdentifyStorageSystem(&Localmmioinfo, pszFileName);
  8849.  
  8850.          if (rc != MMIO_SUCCESS) {        /* if error */
  8851.             pmmioinfo->ulErrorRet = rc;   /* see IdentifyStorageSystem */
  8852.             ioCleanUp(pmmioinfo);
  8853.             return(MMIO_ERROR);
  8854.          }
  8855.  
  8856.          /* Allocate memory for pTempBuffer which is used when */
  8857.          /* IOProcReadInterLeaved is called. */
  8858.  
  8859.          if (ENTERCRIT(rc)) {
  8860.             ioCleanUp(pmmioinfo);
  8861.             return MMIO_ERROR;
  8862.          }
  8863.  
  8864.          pinstance->pTempBuffer = HhpAllocMem(hheap, DEFAULTBUFFERSIZE);
  8865.          if (pinstance->pTempBuffer == NULL) {
  8866.             EXITCRIT;
  8867.             pmmioinfo->ulErrorRet = MMIOERR_OUTOFMEMORY;
  8868.             ioCleanUp(pmmioinfo);
  8869.             return MMIO_ERROR;
  8870.          }
  8871.          EXITCRIT;
  8872.  
  8873.          pinstance->ulTempBufferSize = DEFAULTBUFFERSIZE;
  8874.       }
  8875.  
  8876.       pinstance->lFileCurrentPosition = 0;
  8877.  
  8878.       pinstance->hmmioFileHandle = mmioOpen(pszFileName, &Localmmioinfo,
  8879.           Localmmioinfo.ulFlags);
  8880.  
  8881.       if (pinstance->hmmioFileHandle <= (HMMIO)0L) /* Test file open error. */
  8882.          rc = Localmmioinfo.ulErrorRet;
  8883.       else {
  8884.               /* Call file format specific open routine */
  8885.          rc = ffOpenWrite(pmmioinfo, pinstance);
  8886.  
  8887.          if (rc == 0) {
  8888.             if (!(pmmioinfo->ulFlags & MMIO_CREATE)) {
  8889.                rc = ioAddTracksToMovieHeader(pinstance);
  8890.  
  8891.                if (rc == 0) {
  8892.  
  8893.                   /* Set lLogicalFilePos to a position pass the header */
  8894.                   /* block to allow read occurring at the first byte */
  8895.                   /* of non-header data. */
  8896.  
  8897.                   lFilePosition = ffSeekToDataBegin(pmmioinfo, pinstance);
  8898.                   if (lFilePosition < MMIO_SUCCESS) rc = MMIO_ERROR;
  8899.                   else pinstance->lFileCurrentPosition = lFilePosition;
  8900.                }
  8901.             }
  8902.          }
  8903.       }
  8904.  
  8905.       if (rc != 0) {
  8906.          pmmioinfo->ulErrorRet = rc;
  8907.          ioCleanUp(pmmioinfo);
  8908.          return MMIO_ERROR;
  8909.       }
  8910.    }
  8911.  
  8912.    /* Set up the pathname in the instance structure */
  8913.  
  8914.    if (strlen(pszFileName) < CCHMAXPATH) {
  8915.       strcpy((PSZ)&(pinstance->szFileName), pszFileName);
  8916.       if ((pinstance->szFileName)[1] == ':')
  8917.          pinstance->ulEditFlags |= FULLY_QUALIFIED_PATH;
  8918.    }
  8919.  
  8920. #endif
  8921.  
  8922.    return MMIO_SUCCESS;
  8923. }
  8924.  
  8925.  
  8926. ΓòÉΓòÉΓòÉ 6.5.1.2. Determining the CODEC Procedure ΓòÉΓòÉΓòÉ
  8927.  
  8928. Once the FOURCC is obtained, the appropriate CODEC procedure is determined and 
  8929. loaded. The following example illustrates the ioDetermineCodec routine, which 
  8930. determines which CODEC procedure to load.  This routine first queries the 
  8931. hardware to determine what CODEC mode the hardware requires. Next, it queries 
  8932. the MMPMMMIO.INI file to determine if there is a CODEC procedure that matches 
  8933. the FOURCC, compression type, and capability flags received from the open 
  8934. routine.  If no default CODEC is found, this routine queries the MMPMMMIO.INI 
  8935. file to find a compression type that works for this particular hardware.  If 
  8936. there is no CODEC procedure known to the INI file that will match the FOURCC, 
  8937. the code searches internal CODEC tables for the necessary CODEC to load.  The 
  8938. ULIOT sample provides an internal CODEC table located in the ULGDAT.C file 
  8939. (shown in the following example). This table is hard coded in the IOProc to 
  8940. specify what CODEC procedure to call. 
  8941.  
  8942. LONG ioDetermineCodec ( PINSTANCE pinstance,
  8943.                         ULONG ulSearchFlags,
  8944.                         PCODECINIFILEINFO pcifi )
  8945.  
  8946. {
  8947.    LONG              rc = MMIO_SUCCESS; /* Return code of IOProcs call */
  8948.    USHORT            i;                 /* Loop index                   */
  8949.    ULONG             ulFlags;
  8950.    HPS               hps;               /* Use to query color support   */
  8951.    HAB               hab;               /* anchor block                 */
  8952.    HMQ               hmq;               /* anchor block                 */
  8953.  
  8954.  
  8955.    if (pcifi->ulCapsFlags & CODEC_DECOMPRESS) {
  8956.       /* Query the display mode */
  8957.       if (ulNumColors == 0) {       /* Get this info once per process */
  8958.          hab  = WinInitialize(0);
  8959. //       hmq  = WinCreateMsgQueue( hab, 0L );
  8960.  
  8961.          hps  = WinGetPS(HWND_DESKTOP);
  8962.          DevQueryCaps ( GpiQueryDevice(hps),
  8963.                         CAPS_COLORS,
  8964.                         1L,
  8965.                         (PLONG)&ulNumColors);
  8966.  
  8967.          WinReleasePS (hps);
  8968. //       WinDestroyMsgQueue( hmq );
  8969.          WinTerminate (hab);
  8970.          }
  8971.  
  8972.       /* Set the color depth for the CODEC we want */
  8973.       if (ulNumColors == 16)
  8974.          pcifi->ulCapsFlags |= CODEC_4_BIT_COLOR;
  8975.       else if (ulNumColors > 256)
  8976.          pcifi->ulCapsFlags |= CODEC_16_BIT_COLOR;
  8977.       else  /* 256 and anything else */
  8978.          pcifi->ulCapsFlags |= CODEC_8_BIT_COLOR;
  8979.       }
  8980.  
  8981.    /********************************************************************/
  8982.    /* Search for the DEFAULT CODEC of this type from the MMIO INI file */
  8983.    /********************************************************************/
  8984.    pcifi->ulCapsFlags |= CODEC_DEFAULT;   /* Pick default */
  8985.    ulFlags = ulSearchFlags |
  8986.              MMIO_MATCHFOURCC |
  8987.              MMIO_MATCHCOMPRESSTYPE |
  8988.              MMIO_MATCHCAPSFLAGS |
  8989.              MMIO_MATCHFIRST |
  8990.              MMIO_FINDPROC;
  8991.  
  8992.    if (!(rc = mmioIniFileCODEC(pcifi,ulFlags))) {
  8993.       return(MMIO_SUCCESS);
  8994.       }
  8995.  
  8996.    /********************************************************************/
  8997.    /* If no default, find first one and use it from the MMIO INI file  */
  8998.    /********************************************************************/
  8999.    pcifi->ulCapsFlags &= ~CODEC_DEFAULT;
  9000.    ulFlags = ulSearchFlags |
  9001.              MMIO_MATCHFOURCC |
  9002.              MMIO_MATCHCOMPRESSTYPE |
  9003.              MMIO_MATCHCAPSFLAGS |
  9004.              MMIO_MATCHFIRST |
  9005.              MMIO_FINDPROC;
  9006.  
  9007.    /* Match the fourcc, compress type, caps flags */
  9008.    if (!(rc = mmioIniFileCODEC(pcifi,ulFlags))) {
  9009.       return(MMIO_SUCCESS);
  9010.       }
  9011.  
  9012.    /*********************************************************************/
  9013.    /* Search any internal CODEC tables for the necessary CODEC to load. */
  9014.    /* Note: This is used for debugging new CODECs that have not been    */
  9015.    /* added to the MMPMMMIO.INI file.                                   */
  9016.    /*********************************************************************/
  9017.    for (i = 0; i < NUMBER_CODEC_TABLE; i++) {
  9018.  
  9019.       if ((acifiTable[i].ulCompressType == pcifi->ulCompressType) &&
  9020.           ((acifiTable[i].ulCapsFlags & pcifi->ulCapsFlags)
  9021.               == pcifi->ulCapsFlags)) {
  9022.  
  9023.          *pcifi = acifiTable[i];         /* Copy contents */
  9024.          return(MMIO_SUCCESS);
  9025.          }
  9026.       }
  9027.  
  9028.  
  9029.    return(MMIOERR_CODEC_NOT_SUPPORTED);
  9030. }
  9031.  
  9032. The following example illustrates how to hardcode a CODEC INI file information 
  9033. structure in an IOProc if the table is not represented in the MMPMMMIO.INI 
  9034. file. 
  9035.  
  9036. CODECINIFILEINFO acifiTable[] = {
  9037.    {
  9038.       sizeof(CODECINIFILEINFO),
  9039.       FOURCC_FFIO,
  9040.       "ULBDC4",
  9041.        /* szDCIODLLName[]-Decompression IOProc DLL name */
  9042.       "CodecEntry",
  9043.        /* szDCIOProcName[]-Decomp IOProc entry pt proc name */
  9044.       UM_VIDEO_COMPRESSION_TYPE_BH146,
  9045.        /* ulDecompressionType - ID of each decompression type */
  9046.       0L,
  9047.       MMIO_MEDIATYPE_DIGITALVIDEO,
  9048.       CODEC_DECOMPRESS+           /* ulCapsFlags - Capabilities Flag */
  9049.          CODEC_SELFHEAL+          /* ulCapsFlags - Capabilities Flag */
  9050.          CODEC_ORIGIN_UPPERLEFT+  /* ulCapsFlags - Capabilities Flag */
  9051.          CODEC_4_BIT_COLOR,       /* ulCapsFlags - Capabilities Flag */
  9052.       0,
  9053.       0,
  9054.       0,
  9055.       0,
  9056.       0,
  9057.       8,
  9058.       8,
  9059.       0,
  9060.    },
  9061.    {
  9062.       sizeof(CODECINIFILEINFO),
  9063.       FOURCC_FFIO,
  9064.       "ULBDC8",
  9065.         /* szDCIODLLName[]-Decompression IOProc DLL name */
  9066.       "CodecEntry",
  9067.         /* szDCIOProcName[]-Decomp IOProc entry pt proc name */
  9068.       UM_VIDEO_COMPRESSION_TYPE_BH146,
  9069.         /* ulDecompressionType - ID of each decompression type */
  9070.       0L,
  9071.       MMIO_MEDIATYPE_DIGITALVIDEO,
  9072.       CODEC_DECOMPRESS+              /* ulCapsFlags - Capabilities Flag */
  9073.          CODEC_SELFHEAL+             /* ulCapsFlags - Capabilities Flag */
  9074.          CODEC_ORIGIN_UPPERLEFT+     /* ulCapsFlags - Capabilities Flag */
  9075.          CODEC_MULAPERTURE+          /* ulCapsFlags - Capabilities Flag */
  9076.          CODEC_DIRECT_DISPLAY+       /* ulCapsFlags - Capabilities Flag */
  9077.          CODEC_8_BIT_COLOR,          /* ulCapsFlags - Capabilities Flag */
  9078.       0,
  9079.       0,
  9080.       0,
  9081.       0,
  9082.       0,
  9083.       8,
  9084.       8,
  9085.       0,
  9086.    },
  9087.  
  9088.    {
  9089.       sizeof(CODECINIFILEINFO),
  9090.       FOURCC_FFIO,
  9091.       "ULBDC16",
  9092.           /* szDCIODLLName[]-Decompression IOProc DLL name */
  9093.       "CodecEntry",
  9094.           /* szDCIOProcName[]-Decomp IOProc entry point proc name */
  9095.       UM_VIDEO_COMPRESSION_TYPE_BH146,
  9096.           /* ulDecompressionType - ID of each decompression type */
  9097.       0L,
  9098.       MMIO_MEDIATYPE_DIGITALVIDEO,
  9099.       CODEC_DECOMPRESS+              /* ulCapsFlags - Capabilities Flag */
  9100.          CODEC_SELFHEAL+             /* ulCapsFlags - Capabilities Flag */
  9101.          CODEC_ORIGIN_UPPERLEFT+     /* ulCapsFlags - Capabilities Flag */
  9102.          CODEC_DIRECT_DISPLAY+       /* ulCapsFlags - Capabilities Flag */
  9103.          CODEC_16_BIT_COLOR,         /* ulCapsFlags - Capabilities Flag */
  9104.       0,
  9105.       0,
  9106.       0,
  9107.       0,
  9108.       0,
  9109.       8,
  9110.       8,
  9111.       0,
  9112.    },
  9113. };
  9114.  
  9115.  
  9116. ΓòÉΓòÉΓòÉ 6.5.1.3. Loading the CODEC Procedure ΓòÉΓòÉΓòÉ
  9117.  
  9118. Once a CODEC procedure is determined, the CODEC DLL is loaded and added to the 
  9119. linked list of CODECs currently loaded for this movie instance.  The 
  9120. ioLoadCodecDLL routine shown in the following example first checks to see that 
  9121. the CODEC procedure is not already loaded in the list.  If it is not loaded in 
  9122. the list, it sends a DOSLoadModule function to load the DLL and find the entry. 
  9123. Next, it initializes the CODEC procedure in the ffOpenCodec routine shown in 
  9124. the following example. 
  9125.  
  9126. Note:  Refer to the OS/2 Presentation Manager Guide and Reference for more 
  9127.        information on the DosLoadModule function. 
  9128.  
  9129.  
  9130.   PCCB ioLoadCodecDLL ( PINSTANCE pinstance,
  9131.                         PCODECINIFILEINFO pcifi,
  9132.                         PULONG phCodec )
  9133.  
  9134.   {
  9135.      LONG      rc = MMIO_SUCCESS;     /* Return code of IOProc's call. */
  9136.      SZ        szLoadError[260];            /* Error returns. */
  9137.      PCCB      pccbNew;
  9138.      PCCB      pccb;
  9139.      HMODULE   hmod = 0L;
  9140.      PMMIOPROC pmmioproc;
  9141.      ULONG     hCodec = 0L;
  9142.  
  9143.  
  9144.      /********************************************************************/
  9145.      /* Search if the CCB entry has been created for the passed in       */
  9146.      /* pszDLLName and pszProcName,if yes, then sets pccb pointer of     */
  9147.      /* ptracki to that node.(different track may share a same CCB)      */
  9148.      /********************************************************************/
  9149.      for (pccb = pinstance->pccbList; pccb; pccb = pccb->pccbNext) {
  9150.  
  9151.         if (!stricmp(pcifi->szDLLName,pccb->cifi.szDLLName)) {
  9152.            hCodec = pccb->hCodec;
  9153.  
  9154.            if (!stricmp(pcifi->szProcName,pccb->cifi.szProcName)) {
  9155.               /* Proc entry names match */
  9156.               return(pccb);
  9157.               }
  9158.            }
  9159.         } /* end loop */
  9160.  
  9161.  
  9162.      /*******************************************************************/
  9163.      /* The above searching cannot find the DCIO node; if a same        */
  9164.      /* DLLName was found, query IOProc address directly, else load     */
  9165.      /* module then query I/O address before allocates a new pccb node. */
  9166.      /*******************************************************************/
  9167.      if (DosLoadModule(szLoadError,
  9168.                        (ULONG)sizeof(szLoadError),
  9169.                        pcifi->szDLLName,
  9170.                        &hmod))   {
  9171.         /* Load Error - MMIOERR_INVALID_DLLNAME */
  9172.         return(NULL);
  9173.         }
  9174.  
  9175.      if (DosQueryProcAddr(hmod,
  9176.                           0L,
  9177.                           pcifi->szProcName,
  9178.                           (PFN *)&pmmioproc))   {
  9179.         /* Query Error - MMIOERR_INVALID_PROCEDURENAME */
  9180.         return(NULL);
  9181.         }
  9182.  
  9183.      /********************************************************************/
  9184.      /* The above loading and querying was successful; then create a new */
  9185.      /* node for the DCIO.  If HhpAllocMem fails, call DosFreeModule to  */
  9186.      /* free DCIO module before returning error.                         */
  9187.      /********************************************************************/
  9188.      if (ENTERCRIT(rc)) {
  9189.         return(NULL);
  9190.         }
  9191.  
  9192.      pccbNew = (PCCB)HhpAllocMem(hheap,(ULONG)sizeof(CCB));
  9193.  
  9194.      EXITCRIT;
  9195.  
  9196.      if(!pccbNew) {
  9197.         DosFreeModule(hmod);
  9198.         /* Allocate error - MMIOERR_OUTOFMEMORY */
  9199.         return(NULL);
  9200.         }
  9201.  
  9202.      /*********************************************************************/
  9203.      /* Assigns the Decompress IOProc information, which is in record map */
  9204.      /* table, to the new DCIO node.                                      */
  9205.      /*********************************************************************/
  9206.      pccbNew->cifi = *pcifi;
  9207.      pccbNew->hmodule = hmod;
  9208.      pccbNew->pmmioproc = pmmioproc;
  9209.      pccbNew->hCodec = 0L;
  9210.      pccbNew->ulLastSrcBuf = 0L;
  9211.      pccbNew->ulMisc1 = 0L;
  9212.      pccbNew->ulMisc2 = 0L;
  9213.  
  9214.      /******************************************************************/
  9215.      /* Adds new node to the beginning of ccb list.                    */
  9216.      /******************************************************************/
  9217.      pccbNew->pccbNext = pinstance->pccbList;
  9218.      pinstance->pccbList = pccbNew;
  9219.  
  9220.      *phCodec = hCodec;
  9221.      return(pccbNew);
  9222.   }
  9223.  
  9224.  
  9225.  
  9226.   /************************** START OF SPECIFICATIONS *****************/
  9227.   /*                                                                  */
  9228.   /* SUBROUTINE NAME:  ioLoadCodec                                    */
  9229.   /*                                                                  */
  9230.   /* DESCRIPTIVE NAME: Load a CODEC IOProc and add it the PCCB list   */
  9231.   /*                                                                  */
  9232.   /* FUNCTION: This function loads a CODEC IOProc and adds it to the  */
  9233.   /*  linked list of CODECs currently loaded for this movie instance. */
  9234.   /*                                                                  */
  9235.   /* NOTES:                                                           */
  9236.   /*                                                                  */
  9237.   /* ENTRY POINT: ioLoadCodec                                         */
  9238.   /*   LINKAGE:   CALL FAR (00:32)                                    */
  9239.   /*                                                                  */
  9240.   /* INPUT:                                                           */
  9241.   /*             PINSTANCE pinstance     - Instant structure          */
  9242.   /*             PTRACKI ptracki         - Track specific information */
  9243.   /*             PCODECINIFILEINFO pcifi - CODEC INI file information */
  9244.   /*                                                                  */
  9245.   /* EXIT-NORMAL:                                                     */
  9246.   /*              pccb                                                */
  9247.   /*                                                                  */
  9248.   /* EXIT-ERROR:                                                      */
  9249.   /*              0L                                                  */
  9250.   /*                                                                  */
  9251.   /* SIDE EFFECTS:                                                    */
  9252.   /*                                                                  */
  9253.   /*************************** END OF SPECIFICATIONS ******************/
  9254.   PCCB ioLoadCodec ( PINSTANCE pinstance,
  9255.                      PTRACKI ptracki,
  9256.                      PCODECINIFILEINFO pcifi )
  9257.  
  9258.   {
  9259.      LONG      rc = MMIO_SUCCESS; /* Return code of IOProc's call.*/
  9260.      PCCB      pccbNew;
  9261.      ULONG     hCodec = 0L;
  9262.  
  9263.  
  9264.  
  9265.      if (pccbNew = ioLoadCodecDLL(pinstance,pcifi,&hCodec)) {
  9266.  
  9267.         /*******************************************************************/
  9268.         /* Open the Codec IOProc and save the hCodec in the pccb structure */
  9269.         /*******************************************************************/
  9270.         if (rc = ffOpenCodec(pinstance, pccbNew, hCodec, ptracki)) {
  9271.  
  9272.            pinstance->pccbList = pccbNew->pccbNext;   /* unlink from list */
  9273.            ioCloseCodec(pccbNew);
  9274.            pccbNew = NULL;  /* return error condition */
  9275.            }
  9276.         }
  9277.  
  9278.      return(pccbNew);
  9279.   }
  9280.  
  9281.  
  9282.  
  9283.   /************************** START OF SPECIFICATIONS ****************/
  9284.   /*                                                                 */
  9285.   /* SUBROUTINE NAME:  ioFindCodec                                   */
  9286.   /*                                                                 */
  9287.   /* DESCRIPTIVE NAME:                                               */
  9288.   /*                                                                 */
  9289.   /* FUNCTION: This function finds a compression/decompression       */
  9290.   /* control block for this compression type.                        */
  9291.   /*                                                                 */
  9292.   /* NOTES: None                                                     */
  9293.   /*                                                                 */
  9294.   /* ENTRY POINT: ioFindCodec                                        */
  9295.   /*   LINKAGE:   CALL FAR (00:32)                                   */
  9296.   /*                                                                 */
  9297.   /* INPUT:                                                          */
  9298.   /*           PINSTANCE   pinstance  - Movie instance structure     */
  9299.   /*           ULONG       ulCompressType - Compression type         */
  9300.   /*                                                                 */
  9301.   /*                                                                 */
  9302.   /* EXIT-NORMAL:                                                    */
  9303.   /*              pccb                                               */
  9304.   /*                                                                 */
  9305.   /* EXIT-ERROR:                                                     */
  9306.   /*              NULL - 0L                                          */
  9307.   /*                                                                 */
  9308.   /*                                                                 */
  9309.   /* SIDE EFFECTS:                                                   */
  9310.   /*                                                                 */
  9311.   /*************************** END OF SPECIFICATIONS *****************/
  9312.   PCCB ioFindCodec ( PINSTANCE pinstance,
  9313.                      ULONG ulCompressType )
  9314.  
  9315.   {
  9316.      PCCB   pccb;
  9317.  
  9318.      for (pccb = pinstance->pccbList; pccb; pccb = pccb->pccbNext) {
  9319.         if (pccb->cifi.ulCompressType == ulCompressType)
  9320.            return(pccb);
  9321.         }
  9322.      return(NULL);  /* not found */
  9323.   }
  9324.  
  9325.  The ffOpenCodec routine shown in the following example opens a CODEC instance 
  9326.  for a movie instance and creates file format specific header information 
  9327.  (including a source video header and a destination video header).  Next, it 
  9328.  calls MMIO services to open the CODEC. 
  9329.  
  9330.   LONG ffOpenCodec ( PINSTANCE pinstance,
  9331.                      PCCB pccb,
  9332.                      ULONG hCodec,
  9333.                      PTRACKI ptracki)
  9334.  
  9335.   {
  9336.      LONG              rc = MMIO_SUCCESS;/* Return code of IOProc's call. */
  9337.      PMMVIDEOHEADER     pmmVideoHdr;     /* Video header node.      */
  9338.      PCODECVIDEOHEADER  pcodecvidhdr;
  9339.  
  9340.      /****************************************************************/
  9341.      /* Fill in necessary information for DC IOProc.                 */
  9342.      /****************************************************************/
  9343.           /* Get standard track header */
  9344.      pmmVideoHdr = (PMMVIDEOHEADER)ptracki->pTrackHeader;
  9345.      pccb->codecopen.pControlHdr = NULL;
  9346.        // FOR AVI, fill in from CODEC SPECIFIC DATA SECTION OF HEADER!
  9347.      pccb->codecopen.pOtherInfo = NULL;
  9348.  
  9349.      ENTERCRITX;
  9350.      /********************************************/
  9351.      /* Create Source Video Header               */
  9352.      /********************************************/
  9353.      if (pcodecvidhdr = (PCODECVIDEOHEADER)HhpAllocMem(hheap,(ULONG)
  9354.         sizeof(CODECVIDEOHEADER))) {
  9355.         pccb->codecopen.pSrcHdr = (PVOID)pcodecvidhdr;
  9356.  
  9357.         pcodecvidhdr->ulStructLen = sizeof(CODECVIDEOHEADER);
  9358.         pcodecvidhdr->cx = pmmVideoHdr->ulWidth;
  9359.         pcodecvidhdr->cy = pmmVideoHdr->ulHeight;
  9360.         pcodecvidhdr->cPlanes = 1;                        /* Hardcoded  */
  9361.         pcodecvidhdr->cBitCount = 16;                     /* Hardcoded  */
  9362.         pcodecvidhdr->ulColorEncoding = MMIO_COMPRESSED;  /* Hardcoded  */
  9363.  
  9364.         /********************************************/
  9365.         /* Create Destination Video Header          */
  9366.         /********************************************/
  9367.         if (pcodecvidhdr = (PCODECVIDEOHEADER)HhpAllocMem(hheap,(ULONG)
  9368.            sizeof(CODECVIDEOHEADER))) {
  9369.            pccb->codecopen.pDstHdr = (PVOID)pcodecvidhdr;
  9370.  
  9371.            pcodecvidhdr->ulStructLen = sizeof(CODECVIDEOHEADER);
  9372.            pcodecvidhdr->cx = pmmVideoHdr->ulWidth;
  9373.            pcodecvidhdr->cy = pmmVideoHdr->ulHeight;
  9374.            pcodecvidhdr->cPlanes = 1;                          // Hardcoded
  9375.  
  9376.            /********************************************/
  9377.            /* Initialize the Flags and color encoding  */
  9378.            /********************************************/
  9379.            pccb->codecopen.ulFlags = pccb->cifi.ulCapsFlags &
  9380.                  (VALID_CODECOPEN_INPUTFLAGS);
  9381.  
  9382.            /* Set the color depth for the CODEC we want */
  9383.            if (ulNumColors == 16) {
  9384.               pccb->codecopen.ulFlags |= CODEC_4_BIT_COLOR;
  9385.               pcodecvidhdr->cBitCount = 16;
  9386.               pcodecvidhdr->ulColorEncoding = MMIO_PALETTIZED;
  9387.               }
  9388.            else if (ulNumColors > 256) {
  9389.               pccb->codecopen.ulFlags |= CODEC_16_BIT_COLOR;
  9390.               pcodecvidhdr->cBitCount = 256;
  9391.               pcodecvidhdr->ulColorEncoding = MMIO_RGB_5_6_5;
  9392.               }
  9393.            else { /* 256 and anything else */
  9394.               pccb->codecopen.ulFlags |= CODEC_8_BIT_COLOR;
  9395.               pcodecvidhdr->cBitCount = 8;
  9396.               pcodecvidhdr->ulColorEncoding = MMIO_PALETTIZED;
  9397.               }
  9398.  
  9399.            /*****************/
  9400.            /* Open the CODEC
  9401.            /*****************/
  9402.            rc = pccb->pmmioproc(&hCodec,
  9403.                                 MMIOM_CODEC_OPEN,
  9404.                                 (LONG)&pccb->codecopen,
  9405.                                 0L);
  9406.            if (!rc) {
  9407.               pccb->hCodec = hCodec;
  9408.               }
  9409.            }
  9410.         }
  9411.  
  9412.      EXITCRIT;
  9413.      return(rc);
  9414.   }
  9415.  
  9416.  
  9417.   LONG ffAssociateCodec ( PINSTANCE pinstance,
  9418.                           PMMEXTENDINFO pmmextendinfo )
  9419.   {
  9420.      LONG  rc = MMIO_SUCCESS;
  9421.  
  9422.      return(rc);
  9423.   }
  9424.  
  9425.  
  9426. ΓòÉΓòÉΓòÉ 6.5.2. Compression ΓòÉΓòÉΓòÉ
  9427.  
  9428. The following section illustrates how to compress raw digital images into a 
  9429. smaller form so they can use less storage space.  Follow these steps for 
  9430. compression support: 
  9431.  
  9432.    1. Determine which CODEC procedure to use. 
  9433.    2. Load the CODEC DLL file. 
  9434.    3. Load and initialize the CODEC procedure. 
  9435.    4. Call the CODEC to compress the data. 
  9436.    5. Close the CODEC and release resources after use. 
  9437.  
  9438.  The IOSET.C file shown in the following example uses the MMEXTENDINFO data 
  9439.  structure to set values for the source header, destination header, and other 
  9440.  information. 
  9441.  
  9442.  Note:  You can only associate one stream or track. 
  9443.  
  9444.   /*************************START OF SPECIFICATIONS ****************/
  9445.   /* SOURCE FILE NAME:  IOSET.C                                    */
  9446.   /*                                                               */
  9447.   /* DESCRIPTIVE NAME: File Format IOProc routine for MMIOM_SET    */
  9448.   /*                                                               */
  9449.   /* COPYRIGHT:     IBM - International Business Machines          */
  9450.   /*            Copyright (c) IBM Corporation  1991, 1992, 1993    */
  9451.   /*                        All Rights Reserved                    */
  9452.   /*                                                               */
  9453.   /* STATUS: OS/2 Release 2.0                                      */
  9454.   /*                                                               */
  9455.   /* FUNCTION: This source module contains the set functions.      */
  9456.   /* NOTES:                                                        */
  9457.   /*    DEPENDENCIES: none                                         */
  9458.   /*    RESTRICTIONS: Runs in 32-bit protect mode (OS/2 2.0)       */
  9459.   /*                                                               */
  9460.   /* ENTRY POINTS:                                                 */
  9461.   /*              IOProcSet                                        */
  9462.   /*                                                               */
  9463.   /************************* END OF SPECIFICATIONS *****************/
  9464.  
  9465.   #include        <stdio.h>
  9466.   #include        <string.h>
  9467.   #include        <stdlib.h>
  9468.   #include        <memory.h>
  9469.  
  9470.   #define         INCL_DOS             /* #define  INCL_DOSPROCESS.*/
  9471.   #define         INCL_ERRORS
  9472.   #define         INCL_WIN
  9473.   #define         INCL_GPI
  9474.  
  9475.   #include        <os2.h>              /* OS/2 headers.            */
  9476.   #include        <pmbitmap.h>
  9477.  
  9478.   #define         INCL_OS2MM
  9479.   #define         INCL_MMIO_CODEC
  9480.   #define         INCL_MMIO_DOSIOPROC
  9481.  
  9482.   #include        <os2me.h>            /* Multimedia IO extensions. */
  9483.   #include        <hhpheap.h>
  9484.   #include        <ioi.h>
  9485.  
  9486.   /************************** START OF SPECIFICATIONS **********/
  9487.   /*                                                           */
  9488.   /* SUBROUTINE NAME: IOProcSet                                */
  9489.   /*                                                           */
  9490.   /* DESCRIPTIVE NAME: Set various conditions in IOProc        */
  9491.   /*                                                           */
  9492.   /* FUNCTION:                                                 */
  9493.   /*                                                           */
  9494.   /* NOTES: None                                               */
  9495.   /*                                                           */
  9496.   /* ENTRY POINT: IOProcSet                                    */
  9497.   /*   LINKAGE:   CALL FAR (00:32)                             */
  9498.   /*                                                           */
  9499.   /* INPUT:                                                    */
  9500.   /*   PMMIOINFO   pmmioinfo - ptr to instance structure       */
  9501.   /*   LONG        lParam1  - first parameter                  */
  9502.   /*   LONG        lParam2  - Second parameter                 */
  9503.   /*                                                           */
  9504.   /*                                                           */
  9505.   /* EXIT-NORMAL:                                              */
  9506.   /*              MMIO_SUCCESS                                 */
  9507.   /*                                                           */
  9508.   /* EXIT-ERROR:                                               */
  9509.   /*              MMIO_ERROR                                   */
  9510.   /*                                                           */
  9511.   /* SIDE EFFECTS:                                             */
  9512.   /*                                                           */
  9513.   /*************************** END OF SPECIFICATIONS ***********/
  9514.   LONG IOProcSet ( PMMIOINFO pmmioinfo,
  9515.                    LONG lParam1,
  9516.                    LONG lParam2 )
  9517.  
  9518.   {
  9519.      PINSTANCE       pinstance;
  9520.      LONG            rc = MMIO_SUCCESS;
  9521.      PMMEXTENDINFO   pmmextendinfo = (PMMEXTENDINFO)lParam1;
  9522.      PCCB            pccb;
  9523.      ULONG           ulCCBCount;
  9524.      PCODECASSOC     pcodecassoc;
  9525.      ULONG           ulSize;
  9526.      PVOID           PtrNextAvail;
  9527.  
  9528.      if (rc = ioGetPtrInstance(pmmioinfo,&pinstance))
  9529.         return(rc);
  9530.  
  9531.      switch(lParam2){
  9532.         /*************************/
  9533.         /* SET INFO              */
  9534.         /*************************/
  9535.         case MMIO_SET_EXTENDEDINFO:   /* Set extended information */
  9536.            if (pmmextendinfo) {     /* error check */
  9537.  
  9538.               /********************/
  9539.               /* Set active track */
  9540.               /********************/
  9541.               if (pmmextendinfo->ulFlags & MMIO_TRACK) {
  9542.  
  9543.                  if (pmmextendinfo->ulTrackID == (ULONG)MMIO_RESETTRACKS) {
  9544.                     pinstance->lCurrentTrack = pmmextendinfo->ulTrackID;
  9545.                     }
  9546.                  else {
  9547.                    if (pinstance->ulFlags & OPENED_READONLY) {
  9548.                      if (ioFindTracki(pinstance,pmmextendinfo->ulTrackID)) {
  9549.                         pinstance->lCurrentTrack = pmmextendinfo->ulTrackID;
  9550.                          }
  9551.                        else {
  9552.                           pmmioinfo->ulErrorRet = MMIOERR_INVALID_PARAMETER;
  9553.                           rc = MMIO_ERROR;
  9554.                           break;
  9555.                           }
  9556.                        }
  9557.  
  9558.                     else if (pinstance->ulFlags &
  9559.                             (OPENED_READWRITE | OPENED_WRITECREATE)) {
  9560.                        pinstance->lCurrentTrack = pmmextendinfo->ulTrackID;
  9561.                        }
  9562.  
  9563.                     else {
  9564.                        pmmioinfo->ulErrorRet = MMIOERR_INVALID_PARAMETER;
  9565.                        rc = MMIO_ERROR;
  9566.                        break;
  9567.                        }
  9568.                     } /* else */
  9569.                  }  /* MMIO_TRACK */
  9570.  
  9571.               /**********************************************************/
  9572.               /* Reset all Non-normal reading modes.  All request audio */
  9573.               /* and video frames are returned.                         */
  9574.               /**********************************************************/
  9575.               if (pmmextendinfo->ulFlags & MMIO_NORMAL_READ) {
  9576.                  pinstance->ulMode = MODE_NORMALREAD;
  9577.                  } /* MMIO_NORMAL_READ */
  9578.  
  9579.               /***********************************************************/
  9580.               /* Set IOProc into SCAN mode for the active track. Reading */
  9581.               /* will now be done, but only Key frames are returned for  */
  9582.               /* video.                                                  */
  9583.               /***********************************************************/
  9584.               else if (pmmextendinfo->ulFlags & MMIO_SCAN_READ) {
  9585.                  pinstance->ulMode = MODE_SCANREAD;
  9586.                  } /* MMIO_SCAN_READ */
  9587.  
  9588.               /***********************************************************/
  9589.               /* Set IOProc into REVERSE mode for the active track.      */
  9590.               /* Reading will now be done, but only Key frames are       */
  9591.               /* returned for video                                      */
  9592.               /***********************************************************/
  9593.               else if (pmmextendinfo->ulFlags & MMIO_REVERSE_READ) {
  9594.                  pinstance->ulMode = MODE_REVERSEREAD;
  9595.                  } /* MMIO_REVERSE_READ */
  9596.  
  9597.               /****************************************************/
  9598.               /* Associate CODEC information for recording        */
  9599.               /****************************************************/
  9600.               if (pmmextendinfo->ulFlags & MMIO_CODEC_ASSOC) {
  9601.  
  9602.                  /* Don't alow a CODEC association for read only files */
  9603.                  if (pinstance->ulFlags & OPENED_READONLY) {
  9604.                     pmmioinfo->ulErrorRet = MMIOERR_INVALID_PARAMETER;
  9605.                     rc = MMIO_ERROR;
  9606.                     break;
  9607.                     }
  9608.  
  9609.                  /* Can only associate 1 CODEC for record */
  9610.                  if (pmmextendinfo->ulNumCODECs == 1) {
  9611.                     if (rc = ioAssociateCodec(pmmioinfo,
  9612.                                               pinstance,
  9613.                                               pmmextendinfo->pCODECAssoc)) {
  9614.                        pmmioinfo->ulErrorRet = rc;
  9615.                        rc = MMIO_ERROR;
  9616.                        }
  9617.                     }
  9618.                  else {
  9619.                     pmmioinfo->ulErrorRet = MMIOERR_INVALID_PARAMETER;
  9620.                     rc = MMIO_ERROR;
  9621.                     }
  9622.                  } /* MMIO_CODEC_ASSOC */
  9623.               } /* pmmextendedinfo */
  9624.  
  9625.            else { /* error - data structure missing */
  9626.               pmmioinfo->ulErrorRet = MMIOERR_INVALID_PARAMETER;
  9627.               rc = MMIO_ERROR;
  9628.               }
  9629.            break;
  9630.         /********************************/
  9631.         /* QUERY BASE AND CODEC INFO    */
  9632.         /********************************/
  9633.         case MMIO_QUERY_EXTENDEDINFO_ALL:
  9634.           /* Query Also CODEC associated info */
  9635.  
  9636.          /* Create the array of codecassoc structures to return to caller */
  9637.          pcodecassoc = pmmextendinfo->pCODECAssoc;  /* Point to beginning */
  9638.          for (pccb = pinstance->pccbList; pccb; pccb = pccb->pccbNext) {
  9639.             pcodecassoc->pCodecOpen = NULL;
  9640.             pcodecassoc->pCODECIniFileInfo = NULL;
  9641.             pcodecassoc++;
  9642.             }
  9643.           PtrNextAvail = (PVOID)pcodecassoc;
  9644.  
  9645.           /* Fill in pointers to the CODECIniFileInfo structures to follow */
  9646.           ulSize = 0L;
  9647.           pcodecassoc = pmmextendinfo->pCODECAssoc;  /* Point to beginning */
  9648.           for (pccb = pinstance->pccbList; pccb; pccb = pccb->pccbNext) {
  9649.  
  9650.             /* Create and copy CODECINIFILEINFO structure */
  9651.             pcodecassoc->pCODECIniFileInfo = (PCODECINIFILEINFO)PtrNextAvail;
  9652.             memcpy(pcodecassoc->pCODECIniFileInfo,&pccb->
  9653.                cifi,sizeof(CODECINIFILEINFO));
  9654.             PtrNextAvail = (PVOID) (((ULONG)PtrNextAvail)
  9655.                + sizeof(CODECINIFILEINFO));
  9656.  
  9657.              /* Create and copy CODECOPEN structure */
  9658.              pcodecassoc->pCodecOpen = PtrNextAvail;
  9659.              memcpy(pcodecassoc->pCodecOpen,&pccb->codecopen,
  9660.                 sizeof(CODECOPEN));
  9661.              PtrNextAvail = (PVOID) (((ULONG)PtrNextAvail)
  9662.                 + sizeof(CODECOPEN));
  9663.  
  9664.               /* Create and copy Pointers to structures   */
  9665.               /* in the CODECOPEN structure.              */
  9666.               if (pccb->codecopen.pControlHdr) {
  9667.                  ulSize = *((PULONG)pccb->codecopen.pControlHdr);
  9668.                  ((PCODECOPEN)pcodecassoc->pCodecOpen)->pControlHdr =
  9669.                     (PVOID)PtrNextAvail;
  9670.                  memcpy(((PCODECOPEN)pcodecassoc->pCodecOpen)->pControlHdr,
  9671.                         pccb->codecopen.pControlHdr,
  9672.                         ulSize);
  9673.                  PtrNextAvail = (PVOID) (((ULONG)PtrNextAvail) + ulSize);
  9674.                  }
  9675.               if (pccb->codecopen.pSrcHdr) {
  9676.                  ulSize = *((PULONG)pccb->codecopen.pSrcHdr);
  9677.                  ((PCODECOPEN)pcodecassoc->pCodecOpen)->pSrcHdr
  9678.                      = PtrNextAvail;
  9679.                  memcpy(((PCODECOPEN)pcodecassoc->pCodecOpen)->pSrcHdr,
  9680.                         pccb->codecopen.pSrcHdr,
  9681.                         ulSize);
  9682.                  PtrNextAvail = (PVOID) (((ULONG)PtrNextAvail) + ulSize);
  9683.                  }
  9684.  
  9685.               if (pccb->codecopen.pDstHdr) {
  9686.                  ulSize = *((PULONG)pccb->codecopen.pDstHdr);
  9687.                  ((PCODECOPEN)pcodecassoc->pCodecOpen)->pDstHdr
  9688.                      = PtrNextAvail;
  9689.                  memcpy(((PCODECOPEN)pcodecassoc->pCodecOpen)->pDstHdr,
  9690.                         pccb->codecopen.pDstHdr,
  9691.                         ulSize);
  9692.                  PtrNextAvail = (PVOID) (((ULONG)PtrNextAvail) + ulSize);
  9693.                  }
  9694.  
  9695.               if (pccb->codecopen.pOtherInfo) {
  9696.                  ulSize = *((PULONG)pccb->codecopen.pOtherInfo);
  9697.                  ((PCODECOPEN)pcodecassoc->pCodecOpen)->pOtherInfo
  9698.                       = PtrNextAvail;
  9699.                  memcpy(((PCODECOPEN)pcodecassoc->pCodecOpen)->pOtherInfo,
  9700.                         pccb->codecopen.pOtherInfo,
  9701.                         ulSize);
  9702.                  PtrNextAvail = (PVOID) (((ULONG)PtrNextAvail) + ulSize);
  9703.                  }
  9704.               pcodecassoc++;
  9705.               }
  9706.  
  9707.         /*************************************************/
  9708.         /* QUERY BASE INFO  (NOTE: Fall through    */
  9709.         /* from previous case!)                          */
  9710.         /*************************************************/
  9711.         case MMIO_QUERY_EXTENDEDINFO_BASE: /* Query only MMEXTENDINFO info */
  9712.            pmmextendinfo->ulStructLen = sizeof(MMEXTENDINFO);
  9713.            pmmextendinfo->ulTrackID = (ULONG)pinstance->lCurrentTrack;
  9714.            /* pmmextendinfo->pCODECAssoc = NULL;  */
  9715.  
  9716.            /* Compute ulBufSize for complete information return */
  9717.            ulSize = 0L;
  9718.            for (pccb = pinstance->pccbList, ulCCBCount = 0; /* Count CCB's */
  9719.                 pccb;
  9720.                 ulCCBCount++, pccb = pccb->pccbNext) {
  9721.               ulSize += sizeof(CODECASSOC)+sizeof(CODECOPEN)
  9722.                   +sizeof(CODECINIFILEINFO); /* static stuff */
  9723.  
  9724.               /* Extract ulStructLen as first field of structure  */
  9725.               /* that ptr points to.                              */
  9726.               if (pccb->codecopen.pControlHdr) {
  9727.                  ulSize += *((PULONG)pccb->codecopen.pControlHdr);
  9728.                  }
  9729.               if (pccb->codecopen.pSrcHdr) {
  9730.                  ulSize += *((PULONG)pccb->codecopen.pSrcHdr);
  9731.                  }
  9732.               if (pccb->codecopen.pDstHdr) {
  9733.                  ulSize += *((PULONG)pccb->codecopen.pDstHdr);
  9734.                  }
  9735.               if (pccb->codecopen.pOtherInfo) {
  9736.                  ulSize += *((PULONG)pccb->codecopen.pOtherInfo);
  9737.                  }
  9738.               }
  9739.  
  9740.            pmmextendinfo->ulNumCODECs = ulCCBCount;
  9741.            pmmextendinfo->ulBufSize = ulSize;
  9742.            break;
  9743.  
  9744.         /*********/
  9745.         /* ERROR */
  9746.         /*********/
  9747.         default:
  9748.            pmmioinfo->ulErrorRet = MMIOERR_INVALID_PARAMETER;
  9749.            rc = MMIO_ERROR;
  9750.            break;
  9751.         }/* end switch */
  9752.  
  9753.      return(rc);
  9754.   }
  9755.  
  9756.  
  9757. ΓòÉΓòÉΓòÉ 6.5.2.1. Associating a CODEC with a File ΓòÉΓòÉΓòÉ
  9758.  
  9759. The following example illustrates how to associate a CODEC procedure with a 
  9760. file (track). 
  9761.  
  9762. LONG ioAssociateCodec ( PMMIOINFO pmmioinfo,
  9763.                         PINSTANCE pinstance,
  9764.                         PCODECASSOC pcodecassoc )
  9765.  
  9766. {
  9767.    LONG              rc = MMIO_SUCCESS; /* Return code of IOProc's call.*/
  9768.    PCCB              pccb;
  9769.    ULONG             hCodec;  /* Possibly returned from ioLoadCodecDLL */
  9770.  
  9771.    /* Check for NULL pointers */
  9772.    if (!pcodecassoc->pCodecOpen || !pcodecassoc->pCODECIniFileInfo) {
  9773.       return (MMIOERR_INVALID_PARAMETER);
  9774.       }
  9775.  
  9776.    /* Force the correct values into the CODECINIFILEINFO structure */
  9777.    pcodecassoc->pCODECIniFileInfo->ulStructLen = sizeof(CODECINIFILEINFO);
  9778.    pcodecassoc->pCODECIniFileInfo->fcc = pmmioinfo->fccIOProc;
  9779.    pcodecassoc->pCODECIniFileInfo->ulCapsFlags |= CODEC_COMPRESS;
  9780.  
  9781.    /* Find the codec to load */
  9782.    if (rc = ioDetermineCodec(pinstance, 0, pcodecassoc->pCODECIniFileInfo))
  9783.       {
  9784.       return(rc); /* return error */
  9785.       }
  9786.  
  9787.    else { /* load and open the compression CODEC */
  9788.  
  9789.       /***********************************************/
  9790.       /* Check for previously installed CODECs.      */
  9791.       /* De-install any loaded.  Load new one.       */
  9792.       /* Allows only 1 CODEC to be loaded at a time. */
  9793.       /***********************************************/
  9794.       if (pinstance->pccbList) {
  9795.          pccb = pinstance->pccbList;
  9796.          pinstance->pccbList = pccb->pccbNext;   /* unlink from list */
  9797.          ioCloseCodec(pccb);
  9798.          }
  9799.  
  9800.       /* Load the CODEC DLL */
  9801.       if (pccb = ioLoadCodecDLL(pinstance,
  9802.                                 pcodecassoc->pCODECIniFileInfo,
  9803.                                 &hCodec)) {
  9804.  
  9805.          /* Save the CODEC open information in the ccb */
  9806.          ((PCODECOPEN)pcodecassoc->pCodecOpen)->ulFlags |= CODEC_COMPRESS;
  9807.          /* Force open of compressor */
  9808.  
  9809.          if (!(rc = ioInitCodecopen(pccb,(PCODECOPEN)pcodecassoc->
  9810.             pCodecOpen))) {
  9811.  
  9812.             /* Open the CODEC */
  9813.             if (!(rc = pccb->pmmioproc(&hCodec,
  9814.                                        MMIOM_CODEC_OPEN,
  9815.                                        (LONG)&pccb->codecopen,
  9816.                                        0L)))  {
  9817.                pccb->hCodec = hCodec;       /* save handle to CODEC */
  9818.                }
  9819.             }
  9820.  
  9821.          /* handle error conditions */
  9822.          if (rc) {
  9823.             pinstance->pccbList = pccb->pccbNext;   /* unlink from list */
  9824.             ioCloseCodec(pccb);
  9825.             }
  9826.          }
  9827.       else {
  9828.          rc = MMIO_ERROR;
  9829.          }
  9830.       }
  9831.    return(rc);
  9832. }
  9833.  
  9834.  
  9835. ΓòÉΓòÉΓòÉ 6.5.2.2. Allocating Memory for Compression ΓòÉΓòÉΓòÉ
  9836.  
  9837. The ioAssociateCodec routine shown in the following example calls the 
  9838. ioInitCodecopen routine to allocate memory. The next example illustrates how 
  9839. the ioInitCodecopen routine allocates memory and initializes a CODECOPEN 
  9840. structure to be saved in the CODEC control block (CCB). 
  9841.  
  9842. LONG ioInitCodecopen ( PCCB pccb,
  9843.                        PCODECOPEN pcodecopen)
  9844.  
  9845. {
  9846.    ULONG             ulSize;
  9847.  
  9848.  
  9849.    ENTERCRITX;
  9850.    pccb->codecopen.ulFlags = pcodecopen->ulFlags;
  9851.  
  9852.    /* Create and copy Pointers to structures in CODECOPEN structure */
  9853.    if (pcodecopen->pControlHdr) {
  9854.      ulSize = *((PULONG)pcodecopen->pControlHdr);
  9855.      if (!(pccb->codecopen.pControlHdr = (PVOID)HhpAllocMem(hheap,ulSize)))
  9856.         {
  9857.          return(MMIO_ERROR);
  9858.          }
  9859.       memcpy(pccb->codecopen.pControlHdr, pcodecopen->pControlHdr, ulSize);
  9860.       }
  9861.  
  9862.    if (pcodecopen->pSrcHdr) {
  9863.       ulSize = *((PULONG)pcodecopen->pSrcHdr);
  9864.       if (!(pccb->codecopen.pSrcHdr = (PVOID)HhpAllocMem(hheap,ulSize)))
  9865.          {
  9866.          return(MMIO_ERROR);
  9867.          }
  9868.       memcpy(pccb->codecopen.pSrcHdr, pcodecopen->pSrcHdr, ulSize);
  9869.       }
  9870.  
  9871.    if (pcodecopen->pDstHdr) {
  9872.       ulSize = *((PULONG)pcodecopen->pDstHdr);
  9873.       if (!(pccb->codecopen.pDstHdr = (PVOID)HhpAllocMem(hheap,ulSize)))
  9874.          {
  9875.          return(MMIO_ERROR);
  9876.          }
  9877.       memcpy(pccb->codecopen.pDstHdr, pcodecopen->pDstHdr, ulSize);
  9878.       }
  9879.  
  9880.    if (pcodecopen->pOtherInfo) {
  9881.       ulSize = *((PULONG)pcodecopen->pOtherInfo);
  9882.       if (!(pccb->codecopen.pOtherInfo = (PVOID)HhpAllocMem(hheap,ulSize)))
  9883.       {
  9884.          return(MMIO_ERROR);
  9885.          }
  9886.       memcpy(pccb->codecopen.pOtherInfo, pcodecopen->pOtherInfo, ulSize);
  9887.       }
  9888.  
  9889.    EXITCRIT;
  9890.    return(MMIO_SUCCESS);
  9891. }
  9892.  
  9893.  
  9894. ΓòÉΓòÉΓòÉ 6.5.2.3. Closing the CODEC Procedure ΓòÉΓòÉΓòÉ
  9895.  
  9896. The following example shows an example of how to close a CODEC instance.  The 
  9897. ioCloseCodec routine frees memory associated with the CODEC. 
  9898.  
  9899. LONG ioCloseCodec ( PCCB pccb )
  9900.  
  9901. {
  9902.    LONG       rc = MMIO_SUCCESS; /* Return code of IOProc's call. */
  9903.  
  9904.    ENTERCRITX;
  9905.    if (pccb->codecopen.pSrcHdr) {
  9906.       HhpFreeMem(hheap,(PVOID)pccb->codecopen.pSrcHdr);
  9907.       }
  9908.  
  9909.    if (pccb->codecopen.pDstHdr) {
  9910.       HhpFreeMem(hheap,(PVOID)pccb->codecopen.pDstHdr);
  9911.       }
  9912.  
  9913.    if (pccb->codecopen.pControlHdr) {
  9914.       HhpFreeMem(hheap,(PVOID)pccb->codecopen.pControlHdr);
  9915.       }
  9916.  
  9917.    if (pccb->codecopen.pOtherInfo) {
  9918.       HhpFreeMem(hheap,(PVOID)pccb->codecopen.pOtherInfo);
  9919.       }
  9920.  
  9921.    if (pccb->hCodec) {
  9922.       rc = pccb->pmmioproc(&pccb->hCodec,
  9923.                            MMIOM_CODEC_CLOSE,
  9924.                            0L,
  9925.                            0L);
  9926.  
  9927.       if (!rc) {
  9928.          pccb->hCodec = 0L;
  9929.          }
  9930.       }
  9931.  
  9932.    if (pccb->hmodule) {
  9933. //----DosFreeModule(pccb->hmodule);
  9934.       pccb->hmodule = 0;
  9935.       }
  9936.  
  9937.    HhpFreeMem(hheap,(PVOID)pccb);
  9938.    pccb = NULL;
  9939.    EXITCRIT;
  9940.  
  9941.    return(rc);
  9942. }
  9943.  
  9944.  
  9945. ΓòÉΓòÉΓòÉ 7. Installation Requirements ΓòÉΓòÉΓòÉ
  9946.  
  9947. This section describes how to install the following OS/2 multimedia subsystems 
  9948. using the multimedia installation program (MINSTALL): 
  9949.  
  9950.      Media control driver (MCD) 
  9951.      Stream handler 
  9952.      I/O procedure 
  9953.  
  9954.  You can prepare script control files and if necessary, create an installation 
  9955.  DLL file to install a subsystem.  MINSTALL updates the appropriate INI files 
  9956.  and CONFIG.SYS statements, providing a consistent installation process. 
  9957.  
  9958.  Most developers will use control files with the MINSTALL program to install a 
  9959.  subsystem.  MINSTALL is hardware independent and does not prompt the operating 
  9960.  system for hardware information.  Therefore, if information is required from 
  9961.  the operating system or specific hardware, you need to write an installation 
  9962.  DLL to use (in addition to control files).  See Writing an Installation DLL 
  9963.  for further information. 
  9964.  
  9965.  
  9966. ΓòÉΓòÉΓòÉ 7.1. Master Control File ΓòÉΓòÉΓòÉ
  9967.  
  9968. The MINSTALL program (MINSTALL.EXE) requires specific file information to 
  9969. install each subsystem.  This file information is provided by the master 
  9970. control file CONTROL.SCR.  The master control file, CONTROL.SCR, tells the 
  9971. installation program what to install, where to install it, how to display it to 
  9972. the user, and what system files need to be updated.  CONTROL.SCR uses keywords 
  9973. to specify these instructions to MINSTALL. 
  9974.  
  9975. This control file must be named CONTROL.SCR and must reside on the first media 
  9976. unit (diskette or CD) of the installation package.  During installation, if any 
  9977. errors are detected in the master control file, the errors are logged in the 
  9978. MINSTALL.LOG file.  (See Installation LOG File.) 
  9979.  
  9980. The CONTROL.SCR file consists of a header section and a subsystem definition 
  9981. section.  The header section comes first and provides general information for 
  9982. the installation procedure.  The subsystem definition section comes next and 
  9983. provides information about the subsystems in the installation package. 
  9984.  
  9985.  
  9986. ΓòÉΓòÉΓòÉ 7.1.1. CONTROL.SCR Header ΓòÉΓòÉΓòÉ
  9987.  
  9988. The header section of the CONTROL.SCR file contains the following information: 
  9989.  
  9990.      Name of the installation package 
  9991.      Code page used when creating the file 
  9992.      Name of the file list control file 
  9993.      Number of subsystems in the installation package 
  9994.      Number of media units required for installation 
  9995.      Names of the media units required for installation 
  9996.      Source and destination directory names (optional) 
  9997.  
  9998.  The following is an example of the CONTROL.SCR header located in the 
  9999.  \TOOLKIT\SAMPLES\MM\CF subdirectory. 
  10000.  
  10001.   /*  control.scr */
  10002.  
  10003.   package   ="IBM Multimedia Presentation Manager Toolkit/2"
  10004.   codepage  =437
  10005.   filelist  ="filelist.tlk"
  10006.   groupcount=12
  10007.   munitcount=6
  10008.  
  10009.   medianame="IBM Multimedia Presentation Manager Toolkit/2 Installation
  10010.   Diskette 1"
  10011.   medianame="IBM Multimedia Presentation Manager Toolkit/2 Installation
  10012.   Diskette 2"
  10013.   .
  10014.   .
  10015.   .
  10016.  
  10017.   sourcedir="\\"                     = 0
  10018.   sourcedir="\\lib\\"                = 1
  10019.   .
  10020.   .
  10021.   .
  10022.  
  10023.   destindir="\\mmos2\\"                                = 0
  10024.   destindir="\\mmos2\\mmtoolkt\\lib\\"                 = 1
  10025.   .
  10026.   .
  10027.   .
  10028.  
  10029.  The following table describes the keywords used in the CONTROL.SCR header. 
  10030.  
  10031.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10032.   ΓöéKeyword        ΓöéDescription                                  Γöé
  10033.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10034.   ΓöéPACKAGE        ΓöéThis required keyword specifies the name of  Γöé
  10035.   Γöé               Γöéthe installation package in the form of a    Γöé
  10036.   Γöé               Γöéquoted string.  For example:                 Γöé
  10037.   Γöé               ΓöéPACKAGE="IBM Multimedia Presentation Manager Γöé
  10038.   Γöé               ΓöéToolkit/2"                                   Γöé
  10039.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10040.   ΓöéCODEPAGE       ΓöéThis required keyword specifies the code pageΓöé
  10041.   Γöé               Γöéthat the file was created under.  For        Γöé
  10042.   Γöé               Γöéexample:                                     Γöé
  10043.   Γöé               ΓöéCODEPAGE = 437                               Γöé
  10044.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10045.   ΓöéFILELIST       ΓöéThis required keyword specifies the name of  Γöé
  10046.   Γöé               Γöéthe file list control file. This control fileΓöé
  10047.   Γöé               Γöécontains a list of files that make up each   Γöé
  10048.   Γöé               Γöéfeature, identifies on which media units theyΓöé
  10049.   Γöé               Γöéreside in the installation package, and      Γöé
  10050.   Γöé               Γöéspecifies the destination to which they will Γöé
  10051.   Γöé               Γöébe copied.  For example:                     Γöé
  10052.   Γöé               ΓöéFILELIST = "FILELIST.TLK"                    Γöé
  10053.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10054.   ΓöéGROUPCOUNT     ΓöéThis required keyword specifies the number ofΓöé
  10055.   Γöé               Γöésubsystems in the installation package.  All Γöé
  10056.   Γöé               Γöégroups are counted, including group 0 (if    Γöé
  10057.   Γöé               Γöépresent).  For example:                      Γöé
  10058.   Γöé               ΓöéGROUPCOUNT = 10                              Γöé
  10059.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10060.   ΓöéMUNITCOUNT     ΓöéThis required keyword specifies the number ofΓöé
  10061.   Γöé               Γöémedia units (diskettes, CDs) that will be    Γöé
  10062.   Γöé               Γöéused if all subsystems are installed.  This  Γöé
  10063.   Γöé               Γöénumber must be greater than 0.  This is the  Γöé
  10064.   Γöé               Γöénumber of diskettes or CDs on which the      Γöé
  10065.   Γöé               Γöéinstallation package resides.  For example:  Γöé
  10066.   Γöé               ΓöéMUNITCOUNT = 6                               Γöé
  10067.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10068.   ΓöéMEDIANAME      ΓöéThis required keyword specifies a unique     Γöé
  10069.   Γöé               Γöémedia name, which is a character string on   Γöé
  10070.   Γöé               Γöéthe diskette or CD label.  For each media    Γöé
  10071.   Γöé               Γöéunit, this keyword must be repeated once, in Γöé
  10072.   Γöé               Γöéthe form of a quoted string.  This           Γöé
  10073.   Γöé               Γöéinformation is used during installation to   Γöé
  10074.   Γöé               Γöéprompt the user to insert a diskette or CD   Γöé
  10075.   Γöé               Γöéwhen needed.  For example:                   Γöé
  10076.   Γöé               ΓöéMEDIANAME = "IBM Multimedia Presentation     Γöé
  10077.   Γöé               ΓöéManager Toolkit/2              Installation  Γöé
  10078.   Γöé               ΓöéDiskette 1"                                  Γöé
  10079.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10080.   ΓöéSOURCEDIR      ΓöéThis optional keyword specifies the name of aΓöé
  10081.   Γöé               Γöésource directory and its associated number.  Γöé
  10082.   Γöé               ΓöéThis keyword can be repeated and is specifiedΓöé
  10083.   Γöé               Γöéby a quoted string followed by an equal sign Γöé
  10084.   Γöé               Γöé(=) and a number.  The number is used to     Γöé
  10085.   Γöé               Γöéidentify the particular directory in later   Γöé
  10086.   Γöé               Γöéscripts.  This can be NULL, in which case twoΓöé
  10087.   Γöé               Γöédefault backslash characters (\\) are used   Γöé
  10088.   Γöé               Γöéwith an encoding of 0.  The path must be     Γöé
  10089.   Γöé               Γöésurrounded by path separators.  For example: Γöé
  10090.   Γöé               ΓöéSOURCEDIR="\\LIB\\" = 1                      Γöé
  10091.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10092.   ΓöéDESTINDIR      ΓöéThis optional keyword specifies the name of aΓöé
  10093.   Γöé               Γöédestination directory and its associated     Γöé
  10094.   Γöé               Γöénumber.  This keyword can be repeated and is Γöé
  10095.   Γöé               Γöéspecified by a quoted string followed by an  Γöé
  10096.   Γöé               Γöéequal sign (=) and a number.  The number is  Γöé
  10097.   Γöé               Γöéused to identify the particular directory in Γöé
  10098.   Γöé               Γöélater scripts.  This can be NULL, in which   Γöé
  10099.   Γöé               Γöécase two default backslash characters (\\)   Γöé
  10100.   Γöé               Γöéare used with an encoding of 0.  The path    Γöé
  10101.   Γöé               Γöémust be surrounded by path separators (\\).  Γöé
  10102.   Γöé               ΓöéFor example: For example:                    Γöé
  10103.   Γöé               ΓöéDESTINDIR = "\\MMOS2\\" = 0                  Γöé
  10104.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10105.  
  10106.  Observe the following guidelines when you create or change a CONTROL.SCR 
  10107.  header: 
  10108.  
  10109.      You must place the keywords MUNITCOUNT and MEDIANAME so that MUNITCOUNT 
  10110.       comes directly before MEDIANAME.  The order of the other keywords is not 
  10111.       significant. 
  10112.  
  10113.      Each destination directory (DESTINDIR) must have a unique number. 
  10114.  
  10115.      A subsystem group can be spread across several media units.  It does not 
  10116.       have to reside on one media unit. 
  10117.  
  10118.      You can define any directory.  MINSTALL will create any subdirectories 
  10119.       defined with the DESTINDIR keyword that do not exist. 
  10120.  
  10121.      If you move the installation package files to media of a different size, 
  10122.       the number of media units (MEDIACOUNT) may change. 
  10123.  
  10124.      You may use comments in the header section in the form of blank lines or 
  10125.       text enclosed with /* and */.  You may not use nested comments. 
  10126.  
  10127.      You may use blank spaces around the equal sign; blank spaces are ignored. 
  10128.  
  10129.      If you want to use a double quotation mark or a backslash in a string, 
  10130.       you must precede it with the escape character (\). 
  10131.  
  10132.      You may use the escape sequence \n (new line). 
  10133.  
  10134.  
  10135. ΓòÉΓòÉΓòÉ 7.1.2. CONTROL.SCR Subsystem Definition ΓòÉΓòÉΓòÉ
  10136.  
  10137. The subsystem definition section of the CONTROL.SCR file follows the header 
  10138. section and contains the definitions for each of the subsystems in the 
  10139. installation package.  A block of information must be included for each 
  10140. feature. 
  10141.  
  10142. Each block of information in the subsystem definition section contains the 
  10143. following information: 
  10144.  
  10145.      The group or feature number 
  10146.      The feature name 
  10147.      The version of the component 
  10148.      The size of all the files for the feature installation 
  10149.      The names of the control files that change the INI files and CONFIG.SYS 
  10150.       statements 
  10151.      The names of DLL files and entry points 
  10152.  
  10153.  The following is an example of a CONTROL.SCR subsystem definition. 
  10154.  
  10155.   ssgroup  =0
  10156.   ssname   ="Toolkit_Base"
  10157.   ssversion="0.63.0"
  10158.   sssize   =13
  10159.  
  10160.   /*           - 7  = clock    */
  10161.   ssgroup  =7
  10162.   ssname   ="Clock Utility"
  10163.   ssversion="0.63.0"
  10164.   sssize   =839
  10165.   ssinich  ="TLKCLOCK.SCR"
  10166.  
  10167.   /*           - 8  = midiconv  */
  10168.   ssgroup  =8
  10169.   ssname   ="MIDI File Format Converter"
  10170.   ssversion="0.63.0"
  10171.   sssize   =170
  10172.   ssinich  ="TLKCONV.SCR"
  10173.  
  10174.   /*           - 3  = midiio   */
  10175.   ssgroup  =3
  10176.   ssname   ="MIDI IO Procedure"
  10177.   ssversion="0.63.0"
  10178.   sssize   =475
  10179.  
  10180.   /*           - 11 = mcistrng */
  10181.   ssgroup  =11
  10182.   ssname   ="Media Control Interface String Test"
  10183.   ssversion="0.63.0"
  10184.   sssize   =194
  10185.   ssinich  ="TLKSTRN.SCR"
  10186.  
  10187.   /*           - 9  = duet1   */
  10188.   ssgroup  =9
  10189.   ssname   ="Duet Player I"
  10190.   ssversion="0.63.0"
  10191.   sssize   =4854
  10192.   ssinich  ="TLKDUT1.SCR"
  10193.  
  10194.   /*           - 10 = duet2     */
  10195.   ssgroup  =10
  10196.   ssname   ="Duet Player II"
  10197.   ssversion="0.63.0"
  10198.   sssize   =816
  10199.   ssinich  ="TLKDUT2.SCR"
  10200.  
  10201.   /*           - 12 = inc, lib, and h   */
  10202.   ssgroup  =12
  10203.   ssname   ="Header Files, Include Files and Libraries"
  10204.   ssversion="0.63.0"
  10205.   sssize   =384
  10206.   ssconfigch="TOOLKIT.CH"
  10207.  
  10208.   /*           - 13 = prog ref   */
  10209.   ssgroup   =13
  10210.   ssname   ="Program Reference"
  10211.   ssversion="0.63.0"
  10212.   sssize   =400
  10213.   ssinich  ="TLKBOOKR.SCR"
  10214.  
  10215.   /*           - 14 = workbook   */
  10216.   ssgroup  =14
  10217.   ssname   ="Workbook"
  10218.   ssversion="0.63.0"
  10219.   sssize   =150
  10220.   ssinich  ="TLKBOOKW.SCR"
  10221.  
  10222.   /*           - 2 = avcinst   */
  10223.   ssgroup  =2
  10224.   ssname   ="AVC I/O Procedure Installation Utility"
  10225.   ssversion="0.63.0"
  10226.   sssize   =102
  10227.   ssinich  ="TLKIOPU.SCR"
  10228.  
  10229.   /*           - 4 = caseconv   */
  10230.   ssgroup  =4
  10231.   ssname   ="Case Converter I/O Procedure"
  10232.   ssversion="0.63.0"
  10233.   sssize   =82
  10234.  
  10235.  The CONTROL.SCR subsystem definition consists of the keywords shown in the 
  10236.  folloiwng table. 
  10237.  
  10238.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10239.   ΓöéKeyword             ΓöéDescription                             Γöé
  10240.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10241.   ΓöéSSGROUP             ΓöéThis required keyword specifies the     Γöé
  10242.   Γöé                    Γöégroup.  This marks the beginning of a   Γöé
  10243.   Γöé                    Γöégroup and assigns it a number. Each     Γöé
  10244.   Γöé                    Γöégroup must have a unique number from    Γöé
  10245.   Γöé                    Γöé0-49 within the package; however, the   Γöé
  10246.   Γöé                    Γöésame number can be used with different  Γöé
  10247.   Γöé                    Γöéinstallation packages.  The groups are  Γöé
  10248.   Γöé                    Γöédisplayed in the installation main      Γöé
  10249.   Γöé                    Γöéselection window in ascending order by  Γöé
  10250.   Γöé                    Γöégroup number.  For example:             Γöé
  10251.   Γöé                    ΓöéSSGROUP = 5                             Γöé
  10252.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10253.   ΓöéSSNAME              ΓöéThis required keyword specifies the     Γöé
  10254.   Γöé                    Γöégroup name, as an ASCII string.  This   Γöé
  10255.   Γöé                    Γöékeyword is case sensitive and takes the Γöé
  10256.   Γöé                    Γöéform of a quoted string.  The name may  Γöé
  10257.   Γöé                    Γöéinclude special characters and may be   Γöé
  10258.   Γöé                    Γöétranslated.  The name is displayed in   Γöé
  10259.   Γöé                    Γöéthe main installation selection window. Γöé
  10260.   Γöé                    ΓöéFor example: SSNAME = "CD Audio"        Γöé
  10261.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10262.   ΓöéSSVERSION           ΓöéThis required keyword specifies the     Γöé
  10263.   Γöé                    Γöéversion of the group in the form of a   Γöé
  10264.   Γöé                    Γöéquoted string.  This string must be in  Γöé
  10265.   Γöé                    Γöéthe format "dd.dd.dd" (where dd         Γöé
  10266.   Γöé                    Γöérepresents digits).  Any version not    Γöé
  10267.   Γöé                    Γöéspecified in this format will be        Γöé
  10268.   Γöé                    Γöéconverted to that format.  All string   Γöé
  10269.   Γöé                    Γöéitems that are not digits or periods    Γöé
  10270.   Γöé                    Γöéwill be converted to zeros. Any periods Γöé
  10271.   Γöé                    Γöéafter the second period will be         Γöé
  10272.   Γöé                    Γöéconverted to zeros.  For example:       Γöé
  10273.   Γöé                    ΓöéSSVERSION = "1.1.0"                     Γöé
  10274.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10275.   ΓöéSSSIZE              ΓöéThis required keyword specifies the     Γöé
  10276.   Γöé                    Γöétotal size of all the files in the      Γöé
  10277.   Γöé                    Γöégroup.  The size denotes the number of  Γöé
  10278.   Γöé                    Γöébytes in thousands (500 = 500KB).  This Γöé
  10279.   Γöé                    Γöénumber is used to help determine if     Γöé
  10280.   Γöé                    Γöéthere is enough disk space to support   Γöé
  10281.   Γöé                    Γöéthe installation.  If you do not know   Γöé
  10282.   Γöé                    Γöéthe correct size of a group, overstate  Γöé
  10283.   Γöé                    Γöéits size.  For example:                 Γöé
  10284.   Γöé                    ΓöéSSSIZE = 1024                           Γöé
  10285.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10286.   ΓöéSSINICH             ΓöéThis optional keyword specifies the nameΓöé
  10287.   Γöé                    Γöéof the file that contains changes to an Γöé
  10288.   Γöé                    ΓöéINI file.  If this statement is missing,Γöé
  10289.   Γöé                    Γöéthere are no changes to an INI file.    Γöé
  10290.   Γöé                    ΓöéFor example:                            Γöé
  10291.   Γöé                    ΓöéSSINICH = "ACPAINI.CH"                  Γöé
  10292.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10293.   ΓöéSSCONFIGCH          ΓöéThis optional keyword specifies the nameΓöé
  10294.   Γöé                    Γöéof the file that contains the changes toΓöé
  10295.   Γöé                    Γöéthe CONFIG.SYS file.  If this statement Γöé
  10296.   Γöé                    Γöéis missing, there are no changes to the Γöé
  10297.   Γöé                    ΓöéCONFIG.SYS file.  For example:          Γöé
  10298.   Γöé                    ΓöéSSCONFIGCH = "ACPACON.CH"               Γöé
  10299.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10300.   ΓöéSSCOREQS            ΓöéThis optional keyword specifies a list  Γöé
  10301.   Γöé                    Γöéof corequisites needed for this group toΓöé
  10302.   Γöé                    Γöérun.  It specifies what other groups theΓöé
  10303.   Γöé                    Γöécurrent group depends on.  These other  Γöé
  10304.   Γöé                    Γöégroups must be installed for the currentΓöé
  10305.   Γöé                    Γöégroup to function.  (If this statement  Γöé
  10306.   Γöé                    Γöéis missing, there are no corequisites.) Γöé
  10307.   Γöé                    ΓöéThe corequisite is identified by its    Γöé
  10308.   Γöé                    Γöégroup number. Corequisite groups should Γöé
  10309.   Γöé                    Γöépoint to each other only if they requireΓöé
  10310.   Γöé                    Γöéeach other.  It is possible to have     Γöé
  10311.   Γöé                    Γöégroup A list group B as a corequisite   Γöé
  10312.   Γöé                    Γöéand group B have no corequisites.  If   Γöé
  10313.   Γöé                    Γöéthe user selects a group with           Γöé
  10314.   Γöé                    Γöécorequisites, but does not select all   Γöé
  10315.   Γöé                    Γöéthe corequisites, the user is notified  Γöé
  10316.   Γöé                    Γöébefore the installation starts.  This   Γöé
  10317.   Γöé                    Γöéentry can be repeated as necessary.  ForΓöé
  10318.   Γöé                    Γöéexample:                                Γöé
  10319.   Γöé                    ΓöéSSCOREQS = 1                            Γöé
  10320.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10321.   ΓöéSSICON              ΓöéThis optional keyword names the icon    Γöé
  10322.   Γöé                    Γöéfile for this group that is     to be   Γöé
  10323.   Γöé                    Γöédisplayed in the installation main      Γöé
  10324.   Γöé                    Γöéselection window.  The icon file to be  Γöé
  10325.   Γöé                    Γöédisplayed in the selection window must  Γöé
  10326.   Γöé                    Γöéreside on the first installation media  Γöé
  10327.   Γöé                    Γöéunit.  If this statement is missing, a  Γöé
  10328.   Γöé                    Γöédefault icon is used.  For example:     Γöé
  10329.   Γöé                    ΓöéSSICON = "ACPA.ICO"                     Γöé
  10330.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10331.   ΓöéSSDLL               ΓöéThis optional keyword names a DLL file  Γöé
  10332.   Γöé                    Γöéthat is to be run during the            Γöé
  10333.   Γöé                    Γöéinstallation process.  The DLL          Γöé
  10334.   Γöé                    Γöéreferenced will be run after all files  Γöé
  10335.   Γöé                    Γöéare copied to the destination, but      Γöé
  10336.   Γöé                    Γöébefore any script processing is         Γöé
  10337.   Γöé                    Γöéperformed.  If this keyword is present, Γöé
  10338.   Γöé                    Γöéthe SSDLLENTRY keyword must also be     Γöé
  10339.   Γöé                    Γöépresent.  For example:                  Γöé
  10340.   Γöé                    ΓöéSSDLL="MY.DLL"                          Γöé
  10341.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10342.   ΓöéSSDLLENTRY          ΓöéThis optional keyword specifies the nameΓöé
  10343.   Γöé                    Γöéof the entry point into SSDLL in the    Γöé
  10344.   Γöé                    Γöéform of a quoted string.  If this       Γöé
  10345.   Γöé                    Γöékeyword is present, the SSDLL keyword   Γöé
  10346.   Γöé                    Γöémust also be present.  For example:     Γöé
  10347.   Γöé                    ΓöéSSDLLENTRY="MyEntry"                    Γöé
  10348.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10349.   ΓöéSSTERMDLL           ΓöéThis optional keyword names a DLL file  Γöé
  10350.   Γöé                    Γöéthat is to be run during the            Γöé
  10351.   Γöé                    Γöéinstallation process.  The DLL          Γöé
  10352.   Γöé                    Γöéreferenced will be run after all files  Γöé
  10353.   Γöé                    Γöéare copied to the destination and after Γöé
  10354.   Γöé                    Γöéall script processing is done. The      Γöé
  10355.   Γöé                    Γöépurpose of this keyword is to allow for Γöé
  10356.   Γöé                    Γöéprocessing to occur on a fully          Γöé
  10357.   Γöé                    Γöéconfigured multimedia system.  If this  Γöé
  10358.   Γöé                    Γöékeyword is present, the SSTERMDLLENTRY  Γöé
  10359.   Γöé                    Γöékeyword must also be present.  For      Γöé
  10360.   Γöé                    Γöéexample:                                Γöé
  10361.   Γöé                    ΓöéSSTERMDLL="MYTERM.DLL"                  Γöé
  10362.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10363.   ΓöéSSTERMDLLENTRY      ΓöéThis optional keyword specifies the nameΓöé
  10364.   Γöé                    Γöéof the entry point into SSTERMDLL in theΓöé
  10365.   Γöé                    Γöéform of a quoted string.  If this       Γöé
  10366.   Γöé                    Γöékeyword is present, the SSTERMDLL       Γöé
  10367.   Γöé                    Γöékeyword must also be present.  For      Γöé
  10368.   Γöé                    Γöéexample:                                Γöé
  10369.   Γöé                    ΓöéSSTERMDLLENTRY="MyTermEntry"            Γöé
  10370.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10371.   ΓöéSSDLLINPUTPARMS     ΓöéThis optional keyword specifies         Γöé
  10372.   Γöé                    Γöéinformation needed by an installation   Γöé
  10373.   Γöé                    ΓöéDLL in the form of a quoted string.     Γöé
  10374.   Γöé                    ΓöéThis information is passed as a         Γöé
  10375.   Γöé                    Γöéparameter to the installation DLL as    Γöé
  10376.   Γöé                    Γöéspecified in the SSDLL or SSTERMDLL     Γöé
  10377.   Γöé                    Γöékeywords. For example:                  Γöé
  10378.   Γöé                    ΓöéSSDLLINPUTPARMS="5, FILE.NAM, 1.1.0"    Γöé
  10379.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10380.   ΓöéSSSELECT            ΓöéThis optional keyword determines the    Γöé
  10381.   Γöé                    Γöépreselection of subsystems for          Γöé
  10382.   Γöé                    Γöéinstallation.  Five values are          Γöé
  10383.   Γöé                    Γöésupported:                              Γöé
  10384.   Γöé                    Γöé"ALWAYS" - This value specifies that theΓöé
  10385.   Γöé                    Γöégroup will always be installed.  It is  Γöé
  10386.   Γöé                    Γöéthe only valid value for group 0.       Γöé
  10387.   Γöé                    ΓöéGroups with this value will not be      Γöé
  10388.   Γöé                    Γöédisplayed in the installation main      Γöé
  10389.   Γöé                    Γöéselection window.                       Γöé
  10390.   Γöé                    Γöé"REQUIRED" - This value specifies that  Γöé
  10391.   Γöé                    Γöéthe group will be preselected for       Γöé
  10392.   Γöé                    Γöéinstallation.  If the group had been    Γöé
  10393.   Γöé                    Γöépreviously installed, it cannot be      Γöé
  10394.   Γöé                    Γöéunselected by the user if this          Γöé
  10395.   Γöé                    Γöéinstallation package is newer than the  Γöé
  10396.   Γöé                    Γöéinstalled version.  If the group had notΓöé
  10397.   Γöé                    Γöébeen previously installed, it can be    Γöé
  10398.   Γöé                    Γöéunselected by the user.                 Γöé
  10399.   Γöé                    Γöé"VERSION" - This value specifies that   Γöé
  10400.   Γöé                    Γöéthe group will be preselected only if itΓöé
  10401.   Γöé                    Γöéwas previously installed and this       Γöé
  10402.   Γöé                    Γöéinstallation package is newer than the  Γöé
  10403.   Γöé                    Γöéinstalled version.  However, it can be  Γöé
  10404.   Γöé                    Γöéunselected by the user.                 Γöé
  10405.   Γöé                    Γöé"YES" - This value specifies that the   Γöé
  10406.   Γöé                    Γöégroup will be preselected whether or notΓöé
  10407.   Γöé                    Γöéit was previously installed.  It can be Γöé
  10408.   Γöé                    Γöéunselected by the user. This is the     Γöé
  10409.   Γöé                    Γöédefault.                                Γöé
  10410.   Γöé                    Γöé"NO" - This value specifies that the    Γöé
  10411.   Γöé                    Γöégroup is never preselected but can be   Γöé
  10412.   Γöé                    Γöéselected by the user.                   Γöé
  10413.   Γöé                    Γöé"BASENEWER" - This value specifies that Γöé
  10414.   Γöé                    Γöéfiles belonging to this group will only Γöé
  10415.   Γöé                    Γöébe copied if the user's machine has no  Γöé
  10416.   Γöé                    Γöépackage installed or if the package     Γöé
  10417.   Γöé                    Γöéinstalled is older than the current     Γöé
  10418.   Γöé                    Γöépackage.                                Γöé
  10419.   Γöé                    Γöé"ONLYNEWER" - This value specifies that Γöé
  10420.   Γöé                    Γöéa user will not be able to install an   Γöé
  10421.   Γöé                    Γöéolder version of a package on top of a  Γöé
  10422.   Γöé                    Γöénewer version. Files belonging to this  Γöé
  10423.   Γöé                    Γöégroup will only be copied if the user   Γöé
  10424.   Γöé                    Γöéhas an older version (or the same       Γöé
  10425.   Γöé                    Γöéversion) installed.  If no version is   Γöé
  10426.   Γöé                    Γöéinstalled or if the version installed isΓöé
  10427.   Γöé                    Γöéhigher than the one in the package, no  Γöé
  10428.   Γöé                    Γöéfiles will be copied.                   Γöé
  10429.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10430.  
  10431.  Observe the following guidelines when you create or change a CONTROL.SCR 
  10432.  subsystem definition: 
  10433.  
  10434.      The SSGROUP keyword must be the first statement in the information block. 
  10435.      A group may reside on different media. 
  10436.      Each statement in the information block must have a value. 
  10437.      You may use comments in an information block in the form of blank lines 
  10438.       or text enclosed with /* and */.  You may not use nested comments. 
  10439.      You may use blank spaces around the equal sign; blank spaces are ignored. 
  10440.      If you want to use a double quotation mark or a backslash in a string, 
  10441.       you must precede it with the escape character (\). 
  10442.      You may use the escape sequence \n (new line). 
  10443.  
  10444.  
  10445. ΓòÉΓòÉΓòÉ 7.2. File List Control File ΓòÉΓòÉΓòÉ
  10446.  
  10447. The master control file, CONTROL.SCR, specifies a FILELIST keyword which 
  10448. identifies the name of a file list control file that lists all the installable 
  10449. files in the installation package.  The file list control file also contains 
  10450. the following: 
  10451.  
  10452.      The name of the file 
  10453.      The number of the media unit where the file is stored 
  10454.      The destination directory where the file will be copied 
  10455.      The group the file is identified with 
  10456.  
  10457.  The following is an example of a file list control file. (Ellipsis points 
  10458.  indicate additional entries.)  The first nonblank, noncomment record is a 
  10459.  count of the number of files (or file name lines) in the file.  For example, 
  10460.  145. 
  10461.  
  10462.   /***********************************************************************/
  10463.   /* This file contains install information. Strings enclosed in C type  */
  10464.   /* comments like this line are comment lines. Blank lines are ignored. */
  10465.   /* Non-blank lines will be parsed and extraneous characters will       */
  10466.   /* cause errors.  First non-comment line must be the total number of   */
  10467.   /* files to be installed.                                              */
  10468.   /*                                                                     */
  10469.   /* Total number of entries is 145                                      */
  10470.   /***********************************************************************/
  10471.       145
  10472.   /***********************************************************************/
  10473.   /* All files on the install disks are listed below.  Other information */
  10474.   /* is also given, as follows:                                          */
  10475.   /*                                                                     */
  10476.   /* Disk#    - The number of the disk on which the file resides.        */
  10477.   /*            (Ignored if installing from CD-ROM). These are sorted    */
  10478.   /*            from 0 to the number of disks, ascending.                */
  10479.   /*                                                                     */
  10480.   /* Group#   - The logical group to which the file belongs. Group       */
  10481.   /*            starts at 0.                                             */
  10482.   /*                                                                     */
  10483.   /* Dest#    - The destination subdirectory into which the file will be */
  10484.   /*            copied.  Dest# starts at 0.                              */
  10485.   /*                                                                     */
  10486.   /* Source#  - The source subdirectory from which the file will be      */
  10487.   /*            copied.                                                  */
  10488.   /*                                                                     */
  10489.   /* FileName - The base filename.                                       */
  10490.   /* sourcedir="\\"                     = 0                              */
  10491.   /* sourcedir="\\lib\\"                = 1                              */
  10492.   /* sourcedir="\\h\\"                  = 2                              */
  10493.   /* sourcedir="\\clock\\"              = 7                              */
  10494.   /* sourcedir="\\duet1\\"              = 9                              */
  10495.   /* sourcedir="\\duet2\\"              = 10                             */
  10496.   /* sourcedir="\\mcistrng\\"           = 11                             */
  10497.   /* sourcedir="\\inc\\"                = 13                             */
  10498.   /* sourcedir="\\book\\"               = 16                             */
  10499.   /* sourcedir="\\cdmct\\"              = 17                             */
  10500.   /* sourcedir="\\avcinst\\"            = 18                             */
  10501.   /* sourcedir="\\caseconv\\"           = 19                             */
  10502.   /*                                                                     */
  10503.   /* destindir="\\mmos2\\"                                = 0            */
  10504.   /* destindir="\\mmos2\\mmtoolkt\\lib\\"                 = 1            */
  10505.   /* destindir="\\mmos2\\mmtoolkt\\h\\"                   = 2            */
  10506.   /* destindir="\\mmos2\\install\\"                       = 4            */
  10507.   /* destindir="\\mmos2\\mmtoolkt\\samples\\clock\\"      = 7            */
  10508.   /* destindir="\\mmos2\\mmtoolkt\\samples\\duet1\\"      = 9            */
  10509.   /* destindir="\\mmos2\\mmtoolkt\\samples\\duet2\\"      = 10           */
  10510.   /* destindir="\\mmos2\\mmtoolkt\\samples\\mcistrng\\"   = 11           */
  10511.   /* destindir="\\mmos2\\mmtoolkt\\samples\\cf\\"         = 12           */
  10512.   /* destindir="\\mmos2\\mmtoolkt\\inc\\"                 = 13           */
  10513.   /* destindir="\\mmos2\\dll\\"                           = 14           */
  10514.   /* destindir="\\mmos2\\help\\"                          = 15           */
  10515.   /* destindir="\\mmos2\\mmtoolkt\\samples\\book\\"       = 16           */
  10516.   /* destindir="\\mmos2\\mmtoolkt\\samples\\cdmct\\"      = 17           */
  10517.   /* destindir="\\mmos2\\mmtoolkt\\samples\\avcinst\\"    = 18           */
  10518.   /* destindir="\\mmos2\\mmtoolkt\\samples\\caseconv\\"   = 19           */
  10519.   /*                                                                     */
  10520.   /*        groups                                                       */
  10521.   /*            - 2  = AVC I/O Procedure Installation Utility            */
  10522.   /*            - 3  = MIDI IO Procedure                                 */
  10523.   /*            - 4  = Case Converter I/O Procedure                      */
  10524.   /*            - 7  = Clock Utility                                     */
  10525.   /*            - 9  = Duet Player I                                     */
  10526.   /*            - 10 = Duet Player II                                    */
  10527.   /*            - 11 = MCI String Test                                   */
  10528.   /*            - 12 = Header Files, Include Files and Libraries         */
  10529.   /*            - 13 = Program Reference                                 */
  10530.   /*            - 14 = Workbook                                          */
  10531.   /*                                                                     */
  10532.   /* Disk# Group# Dest# Source#  FileName                                */
  10533.   /***********************************************************************/
  10534.  
  10535.   /*           mmtoolkt\samples\cf   9   14K                             */
  10536.       0    0   12    0    "CONTROL.SCR"
  10537.       0    0   12    0    "FILELIST.TLK"
  10538.       0    0   12    0    "TLKCLOCK.SCR"
  10539.       0    0   12    0    "TLKIOPU.SCR"
  10540.       0    0   12    0    "TLKCONV.SCR"
  10541.   .
  10542.   .
  10543.   .
  10544.  
  10545.       0    0   4     0    "TLKCLOCK.SCR"
  10546.       0    0   4     0    "TLKIOPU.SCR"
  10547.       0    0   4     0    "TLKCONV.SCR"
  10548.       0    0   4     0    "TLKSTRN.SCR"
  10549.   .
  10550.   .
  10551.   .
  10552.  
  10553.       0   10   12    0    "TOOLKIT.CH"
  10554.  
  10555.   /*           mmtoolkt\inc     10   83K                                 */
  10556.       0   12   13   13    "ACB.INC"
  10557.       0   12   13   13    "AUDIO.INC"
  10558.       0   12   13   13    "DCB.INC"
  10559.   .
  10560.   .
  10561.   .
  10562.  
  10563.   /*           mmtoolkt\lib     11   50K                                 */
  10564.       0   12    1    1    "AUDCTL.LIB"
  10565.       0   12    1    1    "DSPMGRDL.LIB"
  10566.       0   12    1    1    "LVDP8000.LIB"
  10567.   .
  10568.   .
  10569.   .
  10570.  
  10571.   /*           mmtoolkt\h         22  269K                               */
  10572.       0   12    2    2    "ACB.H"
  10573.       0   12    2    2    "AUDCTL.H"
  10574.       0   12    2    2    "AUDIO.H"
  10575.   .
  10576.   .
  10577.   .
  10578.  
  10579.   /*           mmtoolkt\samples\duet2       12    390k                   */
  10580.       0   10   10   10    "duet2.c"
  10581.       0   10   10   10    "duet2.h"
  10582.       0   10   10   10    "duet2.rc"
  10583.   .
  10584.   .
  10585.   .
  10586.  
  10587.   /*           mmtoolkt\samples\avcinst   9   102K                       */
  10588.       0    2   18   18    "avcinst.dlg"
  10589.       0    2   18   18    "avcinst.def"
  10590.       0    2   18   18    "avcinst.ipf"
  10591.   .
  10592.   .
  10593.   .
  10594.  
  10595.   /*           mmtoolkt\samples\caseconv  8    72K                       */
  10596.       0    4   19   19    "convcvsr.c"
  10597.       0    4   19   19    "convproc.rc"
  10598.       0    4   19   19    "convconv.c"
  10599.   .
  10600.   .
  10601.   .
  10602.  
  10603.   /*           mmtoolkt\samples\midiconv  2    44K                       */
  10604.       1    8   15    0    "midiconv.hlp"
  10605.       1    8    0    0    "midiconv.exe"
  10606.  
  10607.   /*           mmtoolkt\samples\mcistrng  14   194K                      */
  10608.       1   11   11   11    "mcistrng.c"
  10609.       1   11   11   11    "mcistrng.h"
  10610.       1   11   11   11    "mcistrng.rc"
  10611.   .
  10612.   .
  10613.   .
  10614.  
  10615.  The following table describes the columns in the file list control file. 
  10616.  
  10617.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10618.   ΓöéColumn         ΓöéDescription                                  Γöé
  10619.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10620.   ΓöéMedia#         ΓöéSpecifies the number of the media unit       Γöé
  10621.   Γöé               Γöé(diskette or CD) where the file is stored.   Γöé
  10622.   Γöé               ΓöéThe units are numbered starting from 0.  ThisΓöé
  10623.   Γöé               Γöénumber will be used for all installation     Γöé
  10624.   Γöé               Γöémedia except for the hard disk.  The Media#  Γöé
  10625.   Γöé               Γöécolumn must be sorted in ascending order.  A Γöé
  10626.   Γöé               Γöémedia unit does not have to be filled (there Γöé
  10627.   Γöé               Γöécan be unused space on any numbered unit).   Γöé
  10628.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10629.   ΓöéGroup or       ΓöéSpecifies the group to which the file        Γöé
  10630.   Γöésubsystem#     Γöébelongs.  The group number must be a positiveΓöé
  10631.   Γöé               Γöéinteger, with numbering starting at 0 (the   Γöé
  10632.   Γöé               Γöégroups are defined in CONTROL.SCR by the     Γöé
  10633.   Γöé               ΓöéSSGROUP keyword).  This number is used to    Γöé
  10634.   Γöé               Γöédetermine which files belong to a group      Γöé
  10635.   Γöé               Γöéselected for installation.                   Γöé
  10636.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10637.   ΓöéDestination#   ΓöéSpecifies the destination subdirectory where Γöé
  10638.   Γöé               Γöéthe file will be copied.  The encoding       Γöé
  10639.   Γöé               Γöémapping is defined in the CONTROL.SCR file byΓöé
  10640.   Γöé               Γöéthe DESTINDIR keyword.  This field must      Γöé
  10641.   Γöé               Γöéalways be a defined number (for example, 14  Γöé
  10642.   Γöé               Γöéfor the \MMOS2\DLL path).                    Γöé
  10643.   Γöé               ΓöéIf you specify a DESTINDIR statement in the  Γöé
  10644.   Γöé               Γöémaster control file, you only have to specifyΓöé
  10645.   Γöé               Γöéthe corresponding group number (for example, Γöé
  10646.   Γöé               Γöé1).                                          Γöé
  10647.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10648.   ΓöéSource#        ΓöéSpecifies the path name of the source file.  Γöé
  10649.   Γöé               ΓöéThe encoding mapping is defined in the       Γöé
  10650.   Γöé               ΓöéCONTROL.SCR file by the SOURCEDIR keyword.   Γöé
  10651.   Γöé               ΓöéThis field must always be defined with a     Γöé
  10652.   Γöé               Γöénumber (for example, 1 for the \LIB path).   Γöé
  10653.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10654.   ΓöéFile name      ΓöéSpecifies the source file name, which must beΓöé
  10655.   Γöé               Γöéin double quotes.  For example,              Γöé
  10656.   Γöé               Γöé"MINSTALL.EXE".                              Γöé
  10657.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10658.  
  10659.  
  10660. ΓòÉΓòÉΓòÉ 7.3. Change Control Files ΓòÉΓòÉΓòÉ
  10661.  
  10662. Change control files are script files that make changes to the CONFIG.SYS and 
  10663. INI files.  The master control file, CONTROL.SCR, identifies the change control 
  10664. files when you specify the SSCONFIGCH and SSINICH keywords. 
  10665.  
  10666.  
  10667. ΓòÉΓòÉΓòÉ 7.3.1. Supported Macros ΓòÉΓòÉΓòÉ
  10668.  
  10669. Macros can be used in the change control files. Macros can also be used in the 
  10670. master control file. When a supported macro is used, drives and paths do not 
  10671. have to be identified until the time of installation. At installation, macros 
  10672. can perform the following: 
  10673.  
  10674.      Replace the full destination path of the file 
  10675.      Replace the installation target drive letter 
  10676.      Replace the default destination drive and path as defined in CONTROL.SCR 
  10677.      Replace the startup (boot) drive letter of the operating system 
  10678.      Delete specified files 
  10679.  
  10680.  The following describes the supported macros. 
  10681.  
  10682.  Macro                              Description 
  10683.  
  10684.   destindir = "$(DELETE)\\path\\"
  10685.   = number
  10686.                                     The $(DELETE) macro can only be used with 
  10687.                                     the DESTINDIR keyword in the master control 
  10688.                                     file. The relative number is listed in the 
  10689.                                     file list control file.  Every file that 
  10690.                                     has this number will be deleted from the 
  10691.                                     user's machine. 
  10692.  
  10693.  $(DEST)filename                    $(DEST) is replaced with the full 
  10694.                                     destination path of the file.  For example: 
  10695.  
  10696.                                                                         $(DEST)CLOCK.EXE
  10697.  
  10698.                                     becomes 
  10699.  
  10700.                                                                         D:\MMOS2\MMTOOLKT\SAMPLES\CLOCK\CLOCK.EXE
  10701.  
  10702.  $(DRIVE)                           $(DRIVE) is replaced with the installation 
  10703.                                     target drive letter.  (Do not append a 
  10704.                                     colon.)  For example: 
  10705.  
  10706.                                                                         $(DRIVE)\MMOS2\TEST1.EXE
  10707.  
  10708.                                     becomes 
  10709.  
  10710.                                                                         D:\MMOS2\TEST1.EXE
  10711.  
  10712.  $(DIR)#                            #  is the number of the destination 
  10713.                                     directory as stated in the CONTROL.SCR 
  10714.                                     file.  The macro is replaced with the drive 
  10715.                                     and path defined in the CONTROL.SCR file 
  10716.                                     for the specified DESTINDIR definition. 
  10717.                                     For example: 
  10718.  
  10719.                                                                         $(DIR)4\MINSTALL.LOG
  10720.  
  10721.                                     becomes 
  10722.  
  10723.                                                                         D:\MMOS2\INSTALL\MINSTALL.LOG
  10724.  
  10725.  $(BOOT)                            Replaces the startup (boot) drive letter of 
  10726.                                     the operating system. (Do not append a 
  10727.                                     colon.)  For example: 
  10728.  
  10729.                                                                         $(BOOT)\OS2\NEW.SYS
  10730.  
  10731.                                     becomes 
  10732.  
  10733.                                                                         C:\OS2\NEW.SYS
  10734.  
  10735.                                     where C: is the drive on which OS/2 is 
  10736.                                     installed. 
  10737.  
  10738.  Note:  Using multiple macros is supported. 
  10739.  
  10740.  
  10741. ΓòÉΓòÉΓòÉ 7.3.2. CONFIG.SYS Change Control Files ΓòÉΓòÉΓòÉ
  10742.  
  10743. Some multimedia subsystems require unique statements in the CONFIG.SYS file. 
  10744. The CONFIG.SYS change control file creates, adds, merges, and replaces 
  10745. CONFIG.SYS statements through the use of keywords.  The master control file, 
  10746. CONTROL.SCR, specifies a SSCONFIGCH keyword for each file that contains changes 
  10747. to the CONFIG.SYS file. 
  10748.  
  10749. The following describes the keywords used in the CONFIG.SYS file. 
  10750.  
  10751.  Keyword           Description 
  10752.  
  10753.  DEVICE            Adds new device statements to the CONFIG.SYS file.  The 
  10754.                    right side of the equal sign must be a quoted string.  For 
  10755.                    example: 
  10756.  
  10757.                                       DEVICE="$(DEST)DEVICE.SYS /parameters"
  10758.  
  10759.                    A supported macro may be used.  Ordinarily, the $(DEST) 
  10760.                    macro is used. When the $(DEST) macro is used, MINSTALL 
  10761.                    searches for the file named DEVICE.SYS in the control files. 
  10762.                    If MINSTALL finds it, the $(DEST) macro is replaced with the 
  10763.                    full path of the destination of that file, and the final 
  10764.                    statement is added to the CONFIG.SYS file.  For example: 
  10765.  
  10766.                                       DEVICE=d:\SOMEDIR\DEVICE.SYS /parameters
  10767.  
  10768.  MERGE             Merges data into an existing statement in the CONFIG.SYS 
  10769.                    file.  For example: 
  10770.  
  10771.                                       MERGE "LIBPATH"=1
  10772.  
  10773.                    The number 1 relates to the CONTROL.SCR file destination 
  10774.                    subdirectory 1. After MINSTALL finds subdirectory 1, it adds 
  10775.                    this path at the end of the current LIBPATH statement. (A 
  10776.                    semicolon ends a line and is used between components.)  If 
  10777.                    there is no current LIBPATH statement in the file, a LIBPATH 
  10778.                    statement will be generated with the specified path. 
  10779.  
  10780.                    If the right side of the equal sign is not a numeric string, 
  10781.                    the line is copied as is.  For example: 
  10782.  
  10783.                                       MERGE "SOMEVAR"="WHOKNOWS"
  10784.  
  10785.                    If the SOMEVAR environment variable exists, WHOKNOWS is 
  10786.                    added at the end of the statement. If the variable does not 
  10787.                    exist, the statement: 
  10788.  
  10789.                                       SOMEVAR=WHOKNOWS
  10790.  
  10791.                    is added to the CONFIG.SYS file. 
  10792.  
  10793.                    Note:  Refer to the TOOLKIT.CH file in the 
  10794.                           \TOOLKIT\SAMPLES\MM\CF subdirectory. 
  10795.  
  10796.                    You also can insert SET following the first quotation mark 
  10797.                    character inside the first quoted string.  The word SET is 
  10798.                    ignored unless you are adding a new line to the CONFIG.SYS 
  10799.                    file.  In this case, SET is appended to the beginning of the 
  10800.                    line.  For example: 
  10801.  
  10802.                                       MERGE "SET SOMEVAR"="WHOKNOWS"
  10803.  
  10804.  REPLACE           Replaces an existing CONFIG.SYS statement. 
  10805.  
  10806.                    REPLACE can be followed by a variable name or a variable 
  10807.                    name preceded by SET inside a quoted string.  On the right 
  10808.                    side of the equal sign is either a number or a quoted 
  10809.                    string.  A supported macro may be used. For example: 
  10810.  
  10811.                                       REPLACE "SET MMBASE" = 0
  10812.  
  10813.                    If the variable MMBASE is in the CONFIG.SYS file, then the 
  10814.                    value is changed to 0.  If the variable does not exist, the 
  10815.                    following statement is added: 
  10816.  
  10817.                                       SET MMBASE=C:\MMOS2;
  10818.  
  10819.                    Note:  This statement replaces the existing statement.  Do 
  10820.                           not use this statement in conjunction with a path 
  10821.                           statement. 
  10822.  
  10823.  
  10824. ΓòÉΓòÉΓòÉ 7.3.3. INI Change Control Files ΓòÉΓòÉΓòÉ
  10825.  
  10826. You can use an INI change control file to do the following: 
  10827.  
  10828.      Define a program in a folder on the desktop 
  10829.      Define changes to the MMPM2.INI file 
  10830.      Define changes to other INI files 
  10831.  
  10832.  
  10833. ΓòÉΓòÉΓòÉ 7.3.3.1. Defining a Program in a Folder on the Desktop ΓòÉΓòÉΓòÉ
  10834.  
  10835. Use the WPObject structure to define a folder or a program (to be added to a 
  10836. folder).  The WPObject structure calls the OS/2 WinCreateObject function, which 
  10837. adds an icon and title to the desktop.  This structure indirectly changes the 
  10838. OS2.INI file. Refer to the OS/2 Presentation Manager Guide and Reference for 
  10839. object class definitions and supported keywords for the object class you are 
  10840. creating. 
  10841.  
  10842. Use the WPObject structure shown in the following example to define a folder. 
  10843.  
  10844. WPObject =
  10845.     (
  10846.     WPClassName   = "WPFolder"
  10847.     WPTitle       = "title"
  10848.     WPSetupString = "ICONFILE=$(DEST)icon;OBJECTID=<folderobjid>"
  10849.     WPLocation    = "<parentfolderobjid>"
  10850.     WPFlags       = wpflags
  10851.     )
  10852.  
  10853.  title                 Specifies the folder title to be displayed below the 
  10854.                        object. 
  10855.  
  10856.  icon                  Specifies the file name of the icon representing the 
  10857.                        object. 
  10858.  
  10859.  <folderobjid>         Specifies the OS/2 unique object ID that is used to find 
  10860.                        this folder. This is used by the Workplace Shell to 
  10861.                        determine if this folder exists or not.  It is also used 
  10862.                        in the WPLocation field of other WPObject definitions. 
  10863.  
  10864.  <parentfolderobjid>   Specifies the folder object ID of the folder in which 
  10865.                        this folder is to be placed.  For example, 
  10866.                        "<WP_DESKTOP>" is the object ID for the Workplace Shell 
  10867.                        Desktop folder. 
  10868.  
  10869.  wpflags               This value specifies what action is to be taken if the 
  10870.                        object already exists. 
  10871.  
  10872.                        0 -     Fail if the object exists. 
  10873.  
  10874.                        1 -     Replace the object if it exists. 
  10875.  
  10876.                        2 -     Update the object if it exists (change the 
  10877.                                specified fields to the given values). 
  10878.  
  10879.  In the following example, a folder called Multimedia Presentation Manager 
  10880.  Toolkit/2 will be added to the desktop. 
  10881.  
  10882.   WPObject =
  10883.       (
  10884.       WPClassName   = "WPFolder"
  10885.       WPTitle       = "Multimedia Presentation\nManager Toolkit/2"
  10886.       WPSetupString = "ICONFILE=$(DEST)MMTOOLKT.ICO;OBJECTID=<MMPMTLK>"
  10887.       WPLocation    = "<WP_DESKTOP>"
  10888.       WPFlags       = 2L
  10889.       )
  10890.  
  10891.  You can also use the WPObject structure to define a program that will be added 
  10892.  to a folder on the desktop as shown in the following figure. 
  10893.  
  10894.   WPObject =
  10895.   (
  10896.   WPClassName   = "WPProgram"
  10897.   WPTitle       = "title"
  10898.   WPSetupString = "EXENAME=path file;STARTUPDIR =dir;PROGTYPE=PM;
  10899.        ICONFILE=$(DEST)icon; [ASSOCTYPE =type;]
  10900.        [ASSOCFILTER=filter;] OBJECTID=<pgmobjid>"
  10901.   WPLocation    = "<parentfolderobjid>"
  10902.   WPFlags       = wpflags
  10903.   )
  10904.  
  10905.  title                 Specifies the title to be displayed below the object in 
  10906.                        the parent folder. 
  10907.  
  10908.  path                  Specifies a supported macro or the full path for the EXE 
  10909.                        file. 
  10910.  
  10911.  file                  Specifies the EXE file name. 
  10912.  
  10913.  dir                   Specifies the full path of the startup directory or the 
  10914.                        macro $(DIR)# (where # is a defined destination 
  10915.                        directory in CONTROL.SCR). 
  10916.  
  10917.  icon                  Specifies the file name of the icon representing the 
  10918.                        object. 
  10919.  
  10920.  type                  Specifies one or more association types such as 
  10921.                        "Waveform."  Multiple values are separated by commas. 
  10922.  
  10923.  filter                Specifies one or more association filter types such as 
  10924.                        "*.WAV." Multiple values are separated by commas. 
  10925.  
  10926.  <pgmobjid>            Specifies the OS/2 unique object ID that is used to find 
  10927.                        this program.  This is used by the installation program 
  10928.                        to determine if this program exists in the parent 
  10929.                        folder.  It is not used in the WPLocation field of any 
  10930.                        WPObject definition. 
  10931.  
  10932.  <parentfolderobjid>   Specifies the folder object ID of the folder in which 
  10933.                        this program is to be placed. 
  10934.  
  10935.  wpflags               This value specifies what action is to be taken if the 
  10936.                        object already exists. 
  10937.  
  10938.                        0 -     Fail if the object exists. 
  10939.  
  10940.                        1 -     Replace the object if it exists. 
  10941.  
  10942.                        2 -     Update the object if it exists (change the 
  10943.                                specified fields to the given values). 
  10944.  
  10945.  JoinEA Structure 
  10946.  
  10947.  The JoinEA structure shown in the following example causes the joining of an 
  10948.  EA file to the parent file or directory.  If the file or directory is used in 
  10949.  a WPObject declaration, this structure should precede that declaration. 
  10950.  
  10951.   JoinEA =
  10952.       (
  10953.       JoinFileName   = "full path to file"
  10954.       JoinEAFileName = "full path to EA file"
  10955.       )
  10956.  
  10957.  full path to file     Specifies the full path to this file.  Supported macros 
  10958.                        may be used. 
  10959.  
  10960.  full path to EA file  Specifies the full path to the EA file.  Supported 
  10961.                        macros may be used. 
  10962.  
  10963.  JoinLongNameEA Structure 
  10964.  
  10965.  The JoinLongNameEA structure shown in the following example allows you to 
  10966.  specify a name that is greater than the standard 8-character length for a 
  10967.  directory you are going to create as a Workplace Shell object.  The 
  10968.  JoinLongNameEA statement causes an EA file of type LONGNAME to be added to the 
  10969.  directory.  The long name is then displayed whenever the directory appears as 
  10970.  a folder object.  The JoinLongNameEA statement should come before creating the 
  10971.  directory as a Workplace Shell object. 
  10972.  
  10973.   JoinLongNameEA =
  10974.       (
  10975.       JoinLongName       = "longname"
  10976.       JoinLongFileName   = "full path to directory"
  10977.       JoinEALongFileName = "full path to EA file"
  10978.       )
  10979.  
  10980.  longname              Specifies the new long name to be displayed. 
  10981.  
  10982.  full path to directory Specifies the directory to which EAs are to be 
  10983.                        attached. Supported macros may be used. 
  10984.  
  10985.  full path to EA file  Specifies the full path to the EA file.  Supported 
  10986.                        macros may be used. 
  10987.  
  10988.  Following is an example of a long name specified for an OS/2 multimedia 
  10989.  directory with the JoinLongNameEA structure.  The long name "Sound Bites" is 
  10990.  added to the directory defined as "9" in the CONTROL.SCR file.  In this case, 
  10991.  it is the "Sounds"  directory. 
  10992.  
  10993.   JoinLongNameEA =
  10994.       (
  10995.       JoinLongName       = "Sound Bites"
  10996.       JoinLongFileName   = "$(DIR)9"
  10997.       JoinEALongFileName = "$(DRIVE):\\MMOS2\\INSTALL\\sounds.eas"
  10998.       )
  10999.  
  11000.  The $(DEST) macro is not used for this structure because the file is created, 
  11001.  not copied and changed by MINSTALL.  Notice that the file is placed in the 
  11002.  \MMOS2\INSTALL subdirectory. This is the directory to which all EAs should be 
  11003.  copied. 
  11004.  
  11005.  
  11006. ΓòÉΓòÉΓòÉ 7.3.3.2. Defining Changes to the MMPM2.INI File ΓòÉΓòÉΓòÉ
  11007.  
  11008. Some multimedia subsystems require unique information in the MMPM2.INI file. 
  11009. This file is used by the media device manager (MDM) to maintain a database of 
  11010. installed multimedia components and devices. 
  11011.  
  11012. The following structures are used to make changes to the MMPM2.INI file. 
  11013. MciInstallDrv Structure 
  11014.  
  11015. The MciInstallDrv structure shown in the following example allows you to 
  11016. install MCDs on your system. 
  11017.  
  11018. MciInstallDrv =
  11019.     (
  11020.     DrvInstallName   = "internalname"
  11021.     DrvDeviceType    =  devicetypecode
  11022.     DrvDeviceFlag    =  deviceflag
  11023.     DrvVersionNumber = "verno"
  11024.     DrvProductInfo   = "name2"
  11025.     DrvMCDDriver     = "mcdname"
  11026.     DrvVSDDriver     = "vsdname"
  11027.     DrvPDDName       = "pddname"
  11028.     DrvMCDTable      = "mcdtablename"
  11029.     DrvVSDTable      = "vsdtablename"
  11030.     DrvShareType     = number1
  11031.     DrvResourceName  = "resname"
  11032.     DrvResourceUnits = number2
  11033.     DrvClassArray[num] =
  11034.            (
  11035.                 (DrvClassNumber = number3)
  11036.            )
  11037.     )
  11038.  
  11039.  internalname     Specifies the name under which the device is being installed. 
  11040.                   This must be a unique name.  Consider using a name that is a 
  11041.                   combination of a company name, device type, and device model. 
  11042.                   For example, the IBM media driver for the Sound Blaster 
  11043.                   waveaudio device is ibmwavesb01. 
  11044.  
  11045.  devicetypecode   Specifies an encoding of the device type. These codes are 
  11046.                   defined in the MCIOS2.H file located in the \TOOLKIT\H 
  11047.                   subdirectory. 
  11048.  
  11049.  deviceflag       Specifies the LONG INT with the flags set.  This determines 
  11050.                   whether or not the device is controllable. 
  11051.  
  11052.  verno            Specifies the version number in the format "dd.dd.dd" where 
  11053.                   dd represents digits. 
  11054.  
  11055.  name2            Specifies the full name of the product and can be translated. 
  11056.  
  11057.  mcdname          Specifies the name of the DLL that contains the media control 
  11058.                   driver (MCD). This driver is loaded by the media device 
  11059.                   manager (MDM). 
  11060.  
  11061.  vsdname          Specifies the name of the DLL that contains the 
  11062.                   vendor-specific driver (VSD) used by the MCD (if any). 
  11063.  
  11064.  pddname          Specifies the name of the physical device driver used by the 
  11065.                   MCD (if any). 
  11066.  
  11067.  mcdtablename     Specifies the name of the DLL containing the MCD command 
  11068.                   table.  (OS/2 multimedia provides a standard command table.) 
  11069.  
  11070.  vsdtablename     Specifies the name of the DLL containing the VSD command 
  11071.                   table. 
  11072.  
  11073.  number1          Specifies an encoding of the valid types of sharing 
  11074.                   supported. These codes are defined in the MMDRVOS2.H file 
  11075.                   located in the \TOOLKIT\H subdirectory. 
  11076.  
  11077.  resname          Specifies a unique name for the management of the driver 
  11078.                   resources. 
  11079.  
  11080.  number2          Specifies the maximum number of resource units supported for 
  11081.                   the driver. 
  11082.  
  11083.  num              Specifies the number of resource classes defined in the next 
  11084.                   field. 
  11085.  
  11086.  number3          Specifies the maximum number of resource units used by the 
  11087.                   class. 
  11088.  
  11089.  MciInstallAlias Structure 
  11090.  
  11091.  The MciInstallAlias structure shown in the following example allows you to 
  11092.  specify an alternate name for a driver installed on your system. 
  11093.  
  11094.   MciInstallAlias =
  11095.       (
  11096.       AliasInstallName = "internalname"
  11097.       AliasString      = "aliasstring"
  11098.       )
  11099.  
  11100.  internalname     Specifies the internal name of the driver with which the 
  11101.                   alias is associated.  This name is specified in the 
  11102.                   MciInstallDrv structure. 
  11103.  
  11104.  aliasstring      Specifies an alternate name of the driver. 
  11105.  
  11106.  MciInstallConn Structure 
  11107.  
  11108.  Each implementation of a media driver defines certain paths of information 
  11109.  flow into and out of the device.  These paths are known as connectors. 
  11110.  Connectors have defined connector types, and each connector type has an 
  11111.  associated connector-type name.  The MciInstallConn structure shown in the 
  11112.  following example allows you to install the media connectors on your system. 
  11113.  
  11114.   MciInstallConn =
  11115.       (
  11116.       ConnInstallName = "internalname"
  11117.       ConnArray [num1]
  11118.            (
  11119.                 (
  11120.                 ConnType      = num2
  11121.                 ConnInstallTo = "connto"
  11122.                 ConnIndexTo   = num3
  11123.                 )
  11124.            )
  11125.       )
  11126.  
  11127.  internalname     Specifies the internal name of the driver with which the 
  11128.                   connector is associated.  This name is specified in the 
  11129.                   MciInstallDrv structure. 
  11130.  
  11131.  num1             Specifies the number of entries in the array. 
  11132.  
  11133.  num2             Specifies the connection type. Connection types are defined 
  11134.                   in the MCIOS2.H file located in the \TOOLKIT\H subdirectory. 
  11135.  
  11136.  connto           Specifies the internal name of the driver to connect to. 
  11137.  
  11138.  num3             Specifies the connector index to the other driver specified 
  11139.                   in connto. 
  11140.  
  11141.  MciInstallExt Structure 
  11142.  
  11143.  When an element name is specified as the device name on an MCI_OPEN message 
  11144.  and no device type is specified, the device type is identified by the file 
  11145.  extension.  For example, if the .WAV extension is associated with an internal 
  11146.  driver name, that driver will be used if a file ending in .WAV is opened. 
  11147.  
  11148.  The MciInstallExt structure shown below allows you to define media control 
  11149.  interface file extensions on your system. 
  11150.  
  11151.   MciInstallExt =
  11152.       (
  11153.       ExtInstallName = "internalname"
  11154.       ExtArray[num]  =
  11155.            (
  11156.            (ExtString = "string")
  11157.            )
  11158.       )
  11159.  
  11160.  internalname     Specifies the internal name of the driver with which the 
  11161.                   extension is associated.  This name is specified in the 
  11162.                   MciInstallDrv structure. 
  11163.  
  11164.  num              Specifies the number of external strings defined in the 
  11165.                   string field. 
  11166.  
  11167.  string           Specifies the valid extensions. 
  11168.  
  11169.  MciInstallParm Structure 
  11170.  
  11171.  The MciInstallParm structure shown below allows you to define device-specific 
  11172.  parameters that provide additional information about the driver to your MCD. 
  11173.  For example, this structure is used to define to the MIDI MCD which MIDI map 
  11174.  table to use for each sequencer. 
  11175.  
  11176.   MciInstallParm =
  11177.      (
  11178.      ParmInstallName = "internalname"
  11179.      ParmString      = "device specific parameters"
  11180.      )
  11181.  
  11182.  internalname                       Specifies the internal name of the driver 
  11183.                                     with which the parameters are associated. 
  11184.                                     This name is specified in the MciInstallDrv 
  11185.                                     structure. 
  11186.  
  11187.  device specific parameters         Specifies the parameters needed by the 
  11188.                                     driver. These parameters can be used to 
  11189.                                     provide additional information about the 
  11190.                                     driver. 
  11191.  
  11192.  
  11193. ΓòÉΓòÉΓòÉ 7.3.3.3. Defining Changes to Other INI Files ΓòÉΓòÉΓòÉ
  11194.  
  11195. You can create an INI change control file to make changes to any INI file that 
  11196. a driver needs.  For example, you could initialize an OS/2 profile, define MIDI 
  11197. maps, and define external pages.  You define changes to INI files using the 
  11198. ProfileData structure. 
  11199.  
  11200. The following shows an example of the ProfileData structure. 
  11201.  
  11202.    ProfileData =
  11203.       (
  11204.       ini="inifilename"
  11205.       appname="appname"
  11206.       keyname="keyname"
  11207.       dll="resourcedllname"
  11208.       id=resourceid
  11209.       )
  11210.  
  11211.  inifilename           Specifies the name of an OS/2 INI file.  For example, 
  11212.                        MIDITYPE.INI. 
  11213.  
  11214.  appname               Specifies the value of the appname parameter.  This is 
  11215.                        the appname to be used in the INI file. 
  11216.  
  11217.  keyname               Specifies the unique name (the variable name or keyname) 
  11218.                        of the item being installed 
  11219.  
  11220.  resourcedllname       Specifies the name of the DLL that contains a RCDATA 
  11221.                        resource with the ID identified in resourceid. 
  11222.  
  11223.  resourceid            Specifies the resource ID of the RCDATA resource (where 
  11224.                        the value is stored in the RC file). The resourceid is a 
  11225.                        LONG numeric value.  For example, 120L. 
  11226.  
  11227.  
  11228. ΓòÉΓòÉΓòÉ 7.4. Writing an Installation DLL ΓòÉΓòÉΓòÉ
  11229.  
  11230. You can provide one or two installation DLLs.  These DLLs can be the same DLL 
  11231. with two different entry points or two different DLLs with corresponding entry 
  11232. points. There are two ways to call an installation DLL: 
  11233.  
  11234.      Call the routine after all files have been copied, but before script 
  11235.       files have been processed (using the SSDLL and SSDLLENTRY keywords), or 
  11236.      Call the routine after all files have been copied and after script files 
  11237.       have been processed (using the SSTERMDLL and SSTERMDLLENTRY keywords). 
  11238.  
  11239.  The parameters for each entry point are as follows: 
  11240.  
  11241.  HWND (input)   Owner handle.  This handle allows the DLL to create windows for 
  11242.                 the user interface. 
  11243.  
  11244.  PSZ (input)    Source path of the installation package. 
  11245.  
  11246.  PSZ (input)    Target drive (a drive letter and colon (for example, d:). 
  11247.  
  11248.  PSZ (input)    DLL input parameters, as specified by the SSDLLINPUTPARMS 
  11249.                 keyword in CONTROL.SCR. 
  11250.  
  11251.  HWND (input)   MINSTALL object window handle that receives messages to perform 
  11252.                 media control interface and CONFIG.SYS operations. 
  11253.  
  11254.  PSZ (output)   A CHAR[256] null-terminated string that contains response-file 
  11255.                 data needed by the DLL.  The encoded string is created by the 
  11256.                 DLL as a series of ASCII characters. This information allows 
  11257.                 MINSTALL to operate in an unattended installation mode where 
  11258.                 all user responses are provided by the response-file string. 
  11259.                 The encoded information is passed to the DLL, and all user 
  11260.                 interaction is bypassed. 
  11261.  
  11262.  The following is an example prototype used to define an installation DLL. 
  11263.  
  11264.   ULONG APIENTRY StartMyInstall (HWND hwndOwnerHandle,
  11265.                                  PSZ pszSourcePath,
  11266.                                  PSZ pszTargetDrive,
  11267.                                  PSZ pszMyParms,
  11268.                                  HWND hwndMinstallHandle,
  11269.                                  PSZ pszResponseFile);
  11270.  
  11271.  MINSTALL provides numerous services to the installation DLLs due to the 
  11272.  various environments in which MINSTALL must operate. You can use MINSTALL on a 
  11273.  machine that has never had OS/2 multimedia installed on it.  You can also use 
  11274.  MINSTALL on a machine that has OS/2 multimedia installed on the hard drive. 
  11275.  OS/2 multimedia does not need to be running to use MINSTALL in this 
  11276.  environment. MINSTALL retains control of the MMPM2.INI and CONFIG.SYS files to 
  11277.  ensure no changes are made to these files while MINSTALL is running. 
  11278.  
  11279.  While MINSTALL has control of the MMPM2.INI and CONFIG.SYS files it might be 
  11280.  necessary for an installation DLL to read or write to one or both of these 
  11281.  files.  MINSTALL provides an interface to allow the installation DLLs access 
  11282.  to both the MMPM2.INI and CONFIG.SYS files.  Also, if OS/2 multimedia is 
  11283.  installed and running, some files might be open that MINSTALL attempts to 
  11284.  replace. When this occurs, MINSTALL copies the open files to a temporary 
  11285.  directory until the next system restart. 
  11286.  
  11287.  The following table lists the messages, along with the message formats and 
  11288.  descriptions, available to an installation DLL.  An installation DLL can send 
  11289.  these messages with WinSendMsg or WinPostMsg. 
  11290.  
  11291.  Message                   Description 
  11292.  
  11293.  IM_CODEC1INSTALL          Installs a CODEC using the ulCodecCompType field. 
  11294.  
  11295.  
  11296.   mp1 = 0;                               /* Not used */
  11297.   mp2 = MPFROMP(PINSTCODECINIFILEINFO);  /* Pointer to the
  11298.                                             INSTIOPROC structure */
  11299.  
  11300.  IM_CODEC2INSTALL          Installs a CODEC using the fccCodecCompType[5] 
  11301.                            field. 
  11302.  
  11303.  
  11304.   mp1 = 0;                                /* Not used */
  11305.   mp2 = MPFROMP (PINSTCODECINIFILEINFO);  /* Pointer to the
  11306.                                              INSTIOPROC structure */
  11307.  
  11308.  IM_CONFIGDELETE           Deletes a line from the CONFIG.SYS file. 
  11309.  
  11310.  
  11311.   mp1 = MPFROMP(PCONFIGDATA); /* Pointer to the CONFIGDATA structure */
  11312.   mp2 = 0;                    /* Not used */
  11313.  
  11314.  IM_CONFIGENUMERATE        Gets a line from the CONFIG.SYS file. 
  11315.  
  11316.  
  11317.   mp1 = MPFROMP(PCONFIGDATA); /* Pointer to the CONFIGDATA structure */
  11318.   mp2 = 0;                    /* Not used */
  11319.  
  11320.  IM_CONFIGMERGE            Merges data into an existing CONFIG.SYS entry. 
  11321.  
  11322.  
  11323.   mp1 = MPFROMP(PCONFIGDATA); /* Pointer to the CONFIGDATA structure */
  11324.   mp2 = 0;                    /* Not used */
  11325.  
  11326.  IM_CONFIGNEW              Adds a new line to the CONFIG.SYS file. 
  11327.  
  11328.  
  11329.   mp1 = MPFROMP(PCONFIGDATA); /* Pointer to the CONFIGDATA structure */
  11330.   mp2 = 0;                    /* Not used */
  11331.  
  11332.  IM_CONFIGQUERYCHANGED     Returns TRUE if the CONFIG.SYS file has been 
  11333.                            changed. 
  11334.  
  11335.  
  11336.   mp1 = 0;  /* Not used */
  11337.   mp2 = 0;  /* Not used */
  11338.  
  11339.  IM_CONFIGREPLACE          Replaces an existing CONFIG.SYS file. 
  11340.  
  11341.  
  11342.   mp1 = MPFROMP(PCONFIGDATA); /* Pointer to the CONFIGDATA structure */
  11343.   mp2 = 0;                    /* Not used */
  11344.  
  11345.  IM_CONFIGUPDATE           Updates an existing CONFIG.SYS entry. 
  11346.  
  11347.  
  11348.   mp1 = MPFROMP(PCONFIGDATA); /* Pointer to the CONFIGDATA structure */
  11349.   mp2 = 0;                    /* Not used */
  11350.  
  11351.  IM_CREATE_WPS_OBJECT      Installs a folder and its contents. 
  11352.  
  11353.  
  11354.   mp1 = 0;                        /* Not used */
  11355.   mp2 = MPFROMP(PINSTOBJECTDATA); /* Pointer to the
  11356.                                      INSTOBJECTDATA structure */
  11357.  
  11358.  IM_DESTROY_WPS_OBJECT     Destroys an existing folder and its contents. 
  11359.  
  11360.  
  11361.   mp1 = 0;                /* Not used */
  11362.   mp2 = MPFROMP(HOBJECT); /* This must be the exact OBJECTID
  11363.                              with which the object was created  */
  11364.  
  11365.  IM_EA_JOIN                Joins an EA file to its parent file (the file that 
  11366.                            it was previously separated from). 
  11367.  
  11368.   mp1 = 0;                    /* Not used */
  11369.   mp2 = MPFROMP(PINSTEAJOIN); /* Pointer to the INSTEAJOIN
  11370.                                  structure */
  11371.  
  11372.  IM_EA_LONG_NAME_JOIN      Creates an EA file containing a long name (greater 
  11373.                            than 8 characters but less than 256) and joins it to 
  11374.                            a file or directory. 
  11375.  
  11376.   mp1 = 0;                            /* Not used */
  11377.   mp2 = MPFROMP(PINSTEALONGNAMEJOIN); /* A pointer to the structure
  11378.                                          that contains the long name
  11379.                                          as an ASCII string, the file or
  11380.                                          directory name to which the long
  11381.                                          name is to be applied, and the
  11382.                                          new EA name */
  11383.  
  11384.  IM_LOG_ERROR              Writes a message to the MINSTALL.LOG file.  This can 
  11385.                            be an error type message or only an information type 
  11386.                            message. 
  11387.  
  11388.  
  11389.   mp1 = MPFROMP((PSZ)pszStatement); /* The text of the message to insert
  11390.                                        at the end of the MINSTALL.LOG
  11391.                                        file */
  11392.   mp2 = 0;                          /* Not used */
  11393.  
  11394.  IM_MCI_EXTENDED_SYSINFO   Maps to the mciSendCommand MCI_SYSINFO. 
  11395.  
  11396.  
  11397.   mp1 = MPFROML(LONG);  /* The MCI_SYSINFO extended function desired */
  11398.   mp2 = MPFROMP(*MCI_SYSINFO_PARMS); /* The SYSINFO
  11399.                                                         structure       */
  11400.  
  11401.  IM_MCI_SEND_COMMAND       Sends an MCI command. 
  11402.  
  11403.  
  11404.   mp1 = 0;                            /* Not used */
  11405.   mp2 = MPFROMP(PINSTMCISENDCOMMAND); /* Pointer to the INSTMCISENDCOMMAND
  11406.                                          structure */
  11407.  
  11408.  IM_MIDIMAP_INSTALL        Installs a MIDI map. 
  11409.  
  11410.  
  11411.   mp1 = 0;                            /* Not used */
  11412.   mp2 = MPFROMP(PMIDIMAPINSTALLDATA); /* Pointer to the
  11413.                                          MIDIMAPINSTALLDATA structure */
  11414.  
  11415.  IM_MMIO_INSTALL           Installs an IOProc. 
  11416.  
  11417.  
  11418.   mp1 = 0;                    /* Not used */
  11419.   mp2 = MPFROMP(PINSTIOPROC); /* Pointer to the INSTIOPROC structure */
  11420.  
  11421.  IM_QUERYPATH              Requests the current location of a copied file. 
  11422.  
  11423.  
  11424.   mp1 = PMFROMP(PSZ); /* The name of the file needed  */
  11425.   mp2 = PMFROMP(PSZ); /* The full path to the file    */
  11426.  
  11427.  IM_SPI_INSTALL            Installs stream protocol information. 
  11428.  
  11429.  
  11430.   mp1 = 0;            /* Not used */
  11431.   mp2 = MPFROMP(PSZ); /* The fully qualified path of a SPI resource DLL */
  11432.  
  11433.  The data structures used as parameters for the messages in the previous list 
  11434.  are defined in the MINSTALL.H file located in the \TOOLKIT\H subdirectory. 
  11435.  
  11436.  Follow these guidelines when writing an installation DLL: 
  11437.  
  11438.      Set the mouse pointer to SPTR_WAIT during any operation lasting more than 
  11439.       one second between requests for user information. 
  11440.      Keep the user interface as responsive as possible by using the 
  11441.       MM_DISPATCHVARS and MM_DISPATCHMESSAGES() macros before and after all I/O 
  11442.       intensive operations and and while updates are being made to INI files 
  11443.       and the CONFIG.SYS file. This is necessary because installation DLLs are 
  11444.       executed in the MINSTALL message queue thread. These macros are defined 
  11445.       in the MINSTALL.H file. 
  11446.  
  11447.  
  11448. ΓòÉΓòÉΓòÉ 7.5. Installing a Media Control Driver ΓòÉΓòÉΓòÉ
  11449.  
  11450. To install a media control driver (MCD) in the OS/2 multimedia system: 
  11451.  
  11452.    1. Create an INI change control file containing the information needed for 
  11453.       the media control driver.  This will make the necessary changes in the 
  11454.       MMPM2.INI file. 
  11455.  
  11456.       When you create a new MCD, you have to install drivers into the OS/2 
  11457.       multimedia system to use the new MCD. The following is an example of how 
  11458.       to use structures in an INI Change Control File to install a Sound 
  11459.       Blaster Waveform Audio Driver that uses a new Audio MCD named "MyNewMCD." 
  11460.       See Defining Changes to the MMPM2.INI File for a detailed description of 
  11461.       these structures. 
  11462.  
  11463.             MciInstallDrv =
  11464.                 (
  11465.                 DrvInstallName     = "MyWaveSB01"
  11466.                 DrvDeviceType      = 7
  11467.                 DrvDeviceFlag      = 01L
  11468.                 DrvVersionNumber   = "1"
  11469.                 DrvProductInfo     = "Sound Blaster Pro MCV"
  11470.                 DrvMCDDriver       = "MyNewMCD"
  11471.                 DrvVSDDriver       = "Audioif"
  11472.                 DrvPDDName         = "SBAUD1$"
  11473.                 DrvMCDTable        = "MDM"
  11474.                 DrvVSDTable        = ""
  11475.                 DrvShareType       = 3
  11476.                 DrvResourceName    = "SoundblasterW01"
  11477.                 DrvResourceUnits   = 1
  11478.                 DrvClassArray[1]  =
  11479.                      (
  11480.                           ( DrvClassNumber = 1 )
  11481.                      )
  11482.                 )
  11483.             MciInstallParm =
  11484.                 (
  11485.                 ParmInstallName   = "MyWaveSB01"
  11486.                 ParmString        = "FORMAT=1,SAMPRATE=22050,BPS=8,CHANNELS=2,
  11487.                                     DIRECTION=PLAY"
  11488.                 )
  11489.  
  11490.  
  11491.             MciInstallConn =
  11492.                 (
  11493.                 ConnInstallName="MyWaveSB01"
  11494.                 ConnArray[1]=
  11495.                      (
  11496.                         (
  11497.                         ConnType=3                   /* Wavestream connector */
  11498.                         ConnInstallTo="MyAmpMixSB01" /* Connect to ampmixer  */
  11499.                         ConnIndexTo=1                /* First connector in
  11500.                                                         ampmixer             */
  11501.                         )
  11502.                      )
  11503.                 )
  11504.  
  11505.  
  11506.             MciInstallAlias =
  11507.                 (
  11508.                 AliasInstallName="MyWaveSB01"
  11509.                 AliasString="Wave Audio"
  11510.                 )
  11511.  
  11512.  
  11513.             MciInstallExt =
  11514.                 (
  11515.                 ExtInstallName = "MyWaveSB01"
  11516.                 ExtArray[1] =
  11517.                    (
  11518.                       (ExtString = "WAV")
  11519.                    )
  11520.                 )
  11521.  
  11522.    2. Install external settings pages in the Multimedia Setup notebook 
  11523.       (optional).  See Inserting External Settings Pages. 
  11524.  
  11525.    3. Specify the name of your INI change control file in an SSINICH keyword in 
  11526.       the master control file (CONTROL.SCR).  See CONTROL.SCR Subsystem 
  11527.       Definition  for more information.  An example of a CONTROL.SCR file and a 
  11528.       description of the keywords are provided in that section.  For example: 
  11529.  
  11530.             SSINICH="MYMCD.SCR"
  11531.  
  11532.  You might want to experiment with the sample files provided in the 
  11533.  \TOOLKIT\SAMPLES\MM\CF subdirectory.  If you decide to experiment with the MCD 
  11534.  templates provided in the toolkit, you can test your changes by replacing the 
  11535.  name of the driver that comes with OS/2 multimedia with the name of your 
  11536.  driver.  For example, you can edit the MMPM2.INI file and change the 
  11537.  MCDDRIVER=AUDIOMCD statement to MCDDRIVER=AUDIOMCT. You also must copy your 
  11538.  MCD to a directory that is included in the LIBPATH statement of your 
  11539.  CONFIG.SYS file (for example, \MMOS2\DLL).  After you make these changes and 
  11540.  restart your system, OS/2 multimedia will use your MCD instead of the OS/2 
  11541.  multimedia MCD. 
  11542.  
  11543.  Note:  After you complete your MCD testing, you must change the MMPM2.INI text 
  11544.         file back to its original state.  Unpredictable results can occur when 
  11545.         OS/2 multimedia is used without its supported MCDs. 
  11546.  
  11547.  
  11548. ΓòÉΓòÉΓòÉ 7.6. Installing a Stream Handler ΓòÉΓòÉΓòÉ
  11549.  
  11550. When a stream handler is installed by MINSTALL, the following events occur: 
  11551.  
  11552.    1. A media driver issues an SpiGetHandler function. 
  11553.    2. When the handler is loaded, the Sync/Stream Manager (SSM) reads in the 
  11554.       respective stream protocol control blocks (SPCBs) from the SPI.INI file. 
  11555.    3. If the stream handler is a DLL, the SSM loads and registers the DLL with 
  11556.       the DOSLoadModule function. However, if the stream handler is a device 
  11557.       driver, the SSM does not issue a DOSLoadModule because a CONFIG.SYS 
  11558.       statement installs the device drivers during system startup. 
  11559.  
  11560.  Before the SSM can read in the respective SPCBs, the SPCBs first must be 
  11561.  installed in the SPI.INI file, which is built during the multimedia 
  11562.  installation of the base OS/2 product.  This file contains all the information 
  11563.  about stream handlers and stream classes that are currently supported by OS/2 
  11564.  multimedia. 
  11565.  
  11566.  
  11567. ΓòÉΓòÉΓòÉ 7.6.1. Creating a Resource File ΓòÉΓòÉΓòÉ
  11568.  
  11569. To install SPCB information in the SPI.INI file, you first must create a 
  11570. resource file containing all the information about the stream handlers to 
  11571. update or add to the SPI.INI profile.  The fields and the order of these fields 
  11572. should match the example shown in the example that follows. 
  11573.  
  11574. #include <os2.h>
  11575. #include <os2me.h>
  11576.  
  11577. #define  SPI_RESOURCE1                     (SPI_RESOURCE + 1)
  11578. #define  SPI_RESOURCE2                     (SPI_RESOURCE + 2)
  11579.  
  11580. #define  SPCBHAND_RCVSYNC_GENSYNC_GENTIME
  11581.                      (SPCBHAND_RCVSYNC + SPCBHAND_GENSYNC + SPCBHAND_GENTIME)
  11582.  
  11583. RCDATA   SPI_RESOURCE
  11584. BEGIN
  11585.   2                       /* number of stream handlers resources */
  11586. END
  11587.  
  11588. RCDATA   SPI_RESOURCE1
  11589.   BEGIN
  11590.      "TESTSYS\0",                        /* Class name      */
  11591.      "R3TEST\0",                         /* Handler name    */
  11592.       SH_DLL_TYPE,                       /* PDD or DLL flag */
  11593.       "R3TEST\0",                        /* PDD or DLL name */
  11594.        1,                                /* Number of SPCBs */
  11595.        SPCBSIZE,                         /* Length of SPCB  */
  11596.        DATATYPE_GENERIC,                 /* Data type       */
  11597.        SUBTYPE_NONE,                     /* Sub type        */
  11598.        0L,                            /* Internal key     */
  11599.        0L,                            /* Data flag        */
  11600.        0L,                            /* # of records     */
  11601.        1L,                            /* Block size       */
  11602.        4096L,                         /* Buffer size      */
  11603.        2L,                            /* Min # of buffers */
  11604.        4L,                            /* Max # of buffers */
  11605.        1L,                            /* # empty buffs to start src */
  11606.        2L,                            /* # full buffs to start tgt */
  11607.        SPCBBUF_NONCONTIGUOUS,         /* Buffer flag  */
  11608.        SPCBHAND_RCVSYNC,              /* Handler flag */
  11609.        0L,                            /* Sync tolerance value */
  11610.        0L,                            /* Save sync pulse generation */
  11611.        0L,                            /* Bytes/unit of time       */
  11612.            0L                         /* MMTIME each unit represents */
  11613.   END
  11614. RCDATA   SPI_RESOURCE2
  11615.   BEGIN
  11616.      "TESTSYS\0",                /* Class name      */
  11617.      "R0TEST\0",                 /* Handler name    */
  11618.       SH_PDD_TYPE,               /* PDD or DLL flag */
  11619.      "R0TEST.SYS\0",             /* PDD or DLL name */
  11620.       2,                         /* Number of SPCBs */
  11621.       SPCBSIZE,                  /* Length of SPCB  */
  11622.       DATATYPE_ADPCM_AVC,        /* Data type       */
  11623.       0L,                        /* Sub type     */
  11624.       0L,                        /* Internal key */
  11625.       SPCBDATA_CUETIME,          /* Data flag    */
  11626.       0L,                        /* # of records */
  11627.       1L,                        /* Block size   */
  11628.       4096L,                     /* Buffer size  */
  11629.       10L,                       /* Min # of buffers */
  11630.       10L,                       /* Max # of buffers */
  11631.       1L,                        /* # empty buffs to start src */
  11632.       1L,                        /* # full buffs to start tgt  */
  11633.       SPCBBUF_NONCONTIGUOUS,            /* Buffer flag  */
  11634.       SPCBHAND_RCVSYNC_GENSYNC_GENTIME, /* Handler flag */
  11635.       0L,                        /* Sync tolerance value */
  11636.       0L,                        /* Save sync pulse generation */
  11637.       0L,                        /* Bytes/unit of time */
  11638.       0L,                        /* MMTIME each unit represents */
  11639.  
  11640.       SPCBSIZE,                  /* Length of SPCB */
  11641.       DATATYPE_WAVEFORM,         /* Data type    */
  11642.       0L,                        /* Sub type     */
  11643.       0L,                        /* Internal key */
  11644.       SPCBDATA_CUETIME,          /* Data flag    */
  11645.       0L,                        /* # of records */
  11646.       1L,                        /* Block size   */
  11647.       8192L,                     /* Buffer size  */
  11648.       10L,                       /* Min # of buffers */
  11649.       10L,                       /* Max # of buffers */
  11650.       1L,                        /* # empty buffs to start src */
  11651.       1L,                        /* # full buffs to start tgt  */
  11652.       SPCBBUF_NONCONTIGUOUS,     /* Buffer flag */
  11653.       SPCBHAND_RCVSYNC_GENSYNC_GENTIME, /* Handler flag */
  11654.       0L,                        /* Sync tolerance value   */
  11655.       0L,                        /* Save sync pulse generation */
  11656.       0L,                        /* Bytes/unit of time */
  11657.       0L                         /* MMTIME each unit represents */
  11658.   END
  11659.  
  11660. Creating a Stub Routine 
  11661.  
  11662. After you create a resource file, you must create a stub routine to generate 
  11663. the DLL that contains the resource file. The following example shows an example 
  11664. of a sample stub routine (RCSTUB.C) that is used to create the DLL containing 
  11665. the resource shown in the previous example. 
  11666.  
  11667. #include <os2.h>
  11668. VOID RCSTUB()
  11669. {
  11670. }
  11671.  
  11672.  
  11673. ΓòÉΓòÉΓòÉ 7.6.2. Building the DLL Containing the Resource ΓòÉΓòÉΓòÉ
  11674.  
  11675. Next, you must build the DLL containing the resource.  A DLL is generated that 
  11676. will be used in Updating the SPI.INI File to update the SPI.INI profile. The 
  11677. DLL is built by entering the following command: 
  11678.  
  11679. NMAKE /F MAKERES.MAK
  11680.  
  11681. The following example shows a sample makefile (MAKERES.MAK), which is used to 
  11682. build the TESTRES.DLL containing the resource shown in the previous example. 
  11683. (See Creating a Resource File.) 
  11684.  
  11685. .SUFFIXES: .com .sys .exe .obj .mbj .asm .inc .def .lrf .crf .ref \
  11686.            .lst .sym .map .c .h .lib .msg .pro .txt .cod .cvk
  11687. RCDLL=testres
  11688. /*******************************/
  11689. /* Compiler and Tools location */
  11690. /*******************************/
  11691. MSRC     =..
  11692. TOOLS    =..\..\TOOLS
  11693. SHIP_LIB =..\..\SHIP_LIB
  11694. SHIP_H   =..\SHIP_H
  11695. SHIP_INC =..\SHIP_INC
  11696. COMMON   =..\COMMON
  11697. INC      =..\..\SRC\INC
  11698. H        =..\..\SRC\H
  11699. H386     =..\..\SRC\H386
  11700. LIB      =..\..\SRC\LIB
  11701. LIB386   =..\..\SRC\LIB386
  11702.  
  11703. /******************************/
  11704. /* Definitions for C Compiler */
  11705. /******************************/
  11706. CCOMP386=cl386
  11707. CFLAGS386= /c /G3 /AS /W3 /Od /DLINT_ARGS
  11708. CINC386=-I. -I$(SHIP_H) -I$(COMMON) -I$(H386) -I$(H386)\SYS -I$(H) -I$(H)\SYS
  11709.  
  11710. /******************************/
  11711. /* Definitions for linker     */
  11712. /******************************/
  11713. LINK386  =link386
  11714. LFLAGS386= $(LNK_DEBUG) /batch /map /nod /noi /packcode /packdata
  11715. LIBS386  =$(NAMELIB) os2386 libc doscalls
  11716.  
  11717. /*************************************/
  11718. /* Definitions for RESOURCE compiler */
  11719. /*************************************/
  11720. RC       = rc
  11721. RCINC    = -i $(H) -i $(SHIP_H) -i $(COMMON)
  11722.  
  11723. /**************************/
  11724. /*  Object file lists     */
  11725. /**************************/
  11726.  
  11727. RCOBJS   =$(COMMON)\rcstub.obj
  11728.  
  11729. /*************************************/
  11730. /* Inference Rules                   */
  11731. /*************************************/
  11732. .c.obj:
  11733.         $(CCOMP386) $(CFLAGS386) $(CINC386) /Fo$(<R).obj $(C_LST) $(<R).c
  11734.  
  11735. /*************************************/
  11736. /* Target Descriptions               */
  11737. /*************************************/
  11738. !include        "$(H)\common.mak"
  11739.  
  11740. all: rc
  11741.  
  11742. /*************************************/
  11743. /* SSMRES.DLL Target Descriptions    */
  11744. /*************************************/
  11745. rc: $(RCDLL).dll
  11746.  
  11747. $(RCDLL).dll:  $(RCOBJS) $(RCDLL).rc makeres.mak $(RCDLL).lrf  \
  11748.                $(RCDLL).def
  11749.         $(LINK386) $(LFLAGS386) @$(RCDLL).lrf
  11750.         $(RC) $(RCINC) $(RCDLL).rc $(RCDLL).dll
  11751. #
  11752. # Make DEF file
  11753. #
  11754. $(RCDLL).def:  makeres.mak
  11755.         @echo Creating file <<$(@B).def
  11756. LIBRARY $(RCDLL)
  11757. DESCRIPTION 'DLL file containing resources'
  11758. STUB 'OS2STUB.EXE'
  11759. DATA NONE
  11760. <<keep
  11761.  
  11762. #
  11763. # Make link response file
  11764. #
  11765. $(RCDLL).lrf: makeres.mak
  11766.         @echo Creating file <<$(@B).lrf
  11767. $(RCOBJS)
  11768. $(RCDLL).dll
  11769. $(RCDLL).map $(LFLAGS386)
  11770. os2386 libcdll
  11771. $(RCDLL).def;
  11772. <<keep
  11773.  
  11774.  
  11775. ΓòÉΓòÉΓòÉ 7.6.3. Updating the SPI.INI File ΓòÉΓòÉΓòÉ
  11776.  
  11777. The resource DLL that was built by the makefile must now be used with the 
  11778. master control file, the file list control file, and the SpiInstall structure 
  11779. to update the SPI.INI profile.  (See Master Control File and File List Control 
  11780. File for information about the master control file and the file list control 
  11781. file.)  Following are examples of the files needed to update the SPI.INI file: 
  11782.  
  11783.      INI change control file 
  11784.      CONTROL.SCR entry 
  11785.      FILELIST.TLK entry 
  11786.  
  11787.  These files must be placed on a diskette with the TESTRES.DLL file that was 
  11788.  created. 
  11789.  
  11790.  The following example shows how to write an INI change control file named 
  11791.  TEST.SCR to install the DLL file (TESTRES.DLL). 
  11792.  
  11793.   SpiInstall =
  11794.       (
  11795.       SpiDllName = "$(DEST)TESTRES.DLL"
  11796.       )
  11797.  
  11798.  The following example shows how to specify the TEST.SCR INI change control 
  11799.  file in the CONTROL.SCR file. 
  11800.  
  11801.   package   ="SPI.INI Update"
  11802.   codepage  =437
  11803.   filelist  ="TEST.MMI"
  11804.   groupcount=2
  11805.   munitcount=1
  11806.   medianame ="SPI.INI Update Disk 1"
  11807.   sourcedir = "\\"                  = 0
  11808.   destindir = "\\MMOS2\\DLL\\"      = 2
  11809.   destindir = "\\MMOS2\\INSTALL\\"  = 4
  11810.  
  11811.   ssgroup   =0
  11812.   ssname    ="Base"
  11813.   ssversion ="1.0.0"
  11814.   sssize    =10
  11815.  
  11816.   ssgroup   =1
  11817.   ssname    ="SPI.INI Update"
  11818.   ssversion ="1.0.0"
  11819.   sssize    =10
  11820.   ssinich   ="TEST.SCR"
  11821.  
  11822.  The following is an example of how to specify the TEST.SCR INI change control 
  11823.  file in the FILELIST.TLK file. 
  11824.  
  11825.   /* Total number of entries is 3                     */
  11826.  
  11827.        3
  11828.  
  11829.   /* Disk# Group# Dest#    Path             FileName  */
  11830.  
  11831.       0      1     2       0               "TESTRES.DLL"
  11832.       0      1     4       0               "TEST.SCR"
  11833.       0      0     4       0               "TEST.SCR"
  11834.  
  11835.  
  11836. ΓòÉΓòÉΓòÉ 7.6.4. Installing Stream Protocol ΓòÉΓòÉΓòÉ
  11837.  
  11838. A stream handler must also support SpiInstallProtocol to be able to receive the 
  11839. SPCB's.  For example, suppose an application or media driver wants to install 
  11840. another SPCB of the same data type and subtype as an SPCB that it already has 
  11841. installed.  The application or media driver will need to assign a new internal 
  11842. key value, that is used to differentiate between multiple SPCB's of the same 
  11843. data stream type.  All the default SPCBs are installed with an internal key 
  11844. value of 0.  Any additional SPCBs that overlap any of the data types that are 
  11845. already installed, need to use a different internal key value.  Therefore, the 
  11846. stream handler must have code that allows for this scenario. 
  11847.  
  11848. The sample code in the following example illustrates how to install stream 
  11849. protocol. 
  11850.  
  11851. RC ShcInstallProtocol(pipparm)
  11852. PPARM_INSTPROT pipparm;
  11853.  
  11854. { /* Start of ShcInstallProtocol */
  11855.  
  11856. RC rc = NO_ERROR;                       /* local return code */
  11857. int notfound = TRUE;
  11858. PESPCB pTempEspcb;
  11859. PESPCB pPrevEspcb;
  11860.  
  11861.  /* the ESPCB list is under semaphore control */
  11862.  
  11863.  if (!(rc = DosRequestMutexSem(hmtxGlobalData, SEM_INDEFINITE_WAIT)))
  11864.    { /* obtained semaphore */
  11865.      if (pipparm->ulFlag & SPI_DEINSTALL_PROTOCOL)
  11866.        { /* DeInstall */
  11867.  
  11868.          /* To Deinstall, Find the spcb,                  */
  11869.          /*               Take it off the espcb chain,    */
  11870.          /*               Free the espcb memory allocated */
  11871.  
  11872.          rc = ERROR_INVALID_SPCBKEY;
  11873.          pPrevEspcb = NULL;
  11874.          pTempEspcb = pESPCB_ListHead;
  11875.          while (pTempEspcb && notfound)
  11876.            { /* Loop thru espcbs */
  11877.              if ((pipparm->spcbkey.ulDataType ==
  11878.                            pTempEspcb->spcb.spcbkey.ulDataType) &&
  11879.                  (pipparm->spcbkey.ulDataSubType ==
  11880.                            pTempEspcb->spcb.spcbkey.ulDataSubType) &&
  11881.                  (pipparm->spcbkey.ulIntKey ==
  11882.                            pTempEspcb->spcb.spcbkey.ulIntKey))
  11883.                { /* found match */
  11884.                  notfound = FALSE;
  11885.                  rc = NO_ERROR;
  11886.  
  11887.                  /* Take the espcb off the chain */
  11888.  
  11889.                  if (pPrevEspcb)
  11890.                    {
  11891.                      pPrevEspcb->pnxtESPCB = pTempEspcb->pnxtESPCB;
  11892.                    }
  11893.                  else
  11894.                    {
  11895.                      pESPCB_ListHead = pTempEspcb->pnxtESPCB;
  11896.                    }
  11897.                  HhpFreeMem(hHeap, pTempEspcb);
  11898.  
  11899.                } /* found match */
  11900.              else
  11901.                { /* try the next espcb in the chain */
  11902.  
  11903.                  pPrevEspcb = pTempEspcb;
  11904.                  pTempEspcb = pTempEspcb->pnxtESPCB;
  11905.  
  11906.                } /* try the next espcb in the chain */
  11907.            } /* Loop thru espcbs */
  11908.        } /* DeInstall */
  11909.      else
  11910.        { /* Install */
  11911.  
  11912.          /* If the SPCB already exists then error */
  11913.  
  11914.          if (ShFindEspcb(pipparm->spcbkey))
  11915.            {
  11916.              rc = ERROR_INVALID_SPCBKEY;
  11917.            }
  11918.          else
  11919.            { /* OK to add spcb */
  11920.  
  11921.              /* Allocate the espcb and put it on the front of the chain */
  11922.  
  11923.              pTempEspcb = (PESPCB)HhpAllocMem(hHeap, sizeof(ESPCB));
  11924.              if (pTempEspcb)
  11925.                {
  11926.                  pTempEspcb->spcb = *(pipparm->pspcb);
  11927.                  pTempEspcb->pnxtESPCB = pESPCB_ListHead;
  11928.                  pESPCB_ListHead = pTempEspcb;
  11929.                }
  11930.              else
  11931.                }
  11932.                  rc = ERROR_ALLOC_RESOURCES;
  11933.                }
  11934.            } /* OK to add spcb */
  11935.        } /* Install */
  11936.  
  11937.      DosReleaseMutexSem(hmtxGlobalData);
  11938.  
  11939.    } /* obtained semaphore */
  11940.  
  11941.  return(rc);
  11942.  
  11943. } /* End of ShcInstallProtocol */
  11944.  
  11945. Note:  For descriptions of the parameters in the SPCB, see Stream Handlers. 
  11946.  
  11947.  
  11948. ΓòÉΓòÉΓòÉ 7.7. Installing an I/O Procedure ΓòÉΓòÉΓòÉ
  11949.  
  11950. To install an I/O procedure, an IOProc entry is added to the MMPMMMIO.INI file. 
  11951. This is accomplished by either writing an INI change control file or writing a 
  11952. program using the mmioIniFileHandler function.  The IOProc is installed in the 
  11953. IOProc table ahead of the system-provided storage system IOProcs (DOS, MEM, and 
  11954. CF). 
  11955.  
  11956. The mmioInstall structure shown in the following example allows you to install 
  11957. an IOProc in the system.  The MMPMMMIO.INI file is modified with the latest 
  11958. mmioInstall data when the MINSTALL program is executed. 
  11959.  
  11960. mmioInstall =
  11961.     (
  11962.     mmioFourCC        = "fourcc"
  11963.     mmioDllName       = "full path"
  11964.     mmioDllEntryPoint = "entry name"
  11965.     mmioFlags         = "flags"
  11966.     mmioExtendLen     = "extend length"
  11967.     mmioMediaType     = "media type"
  11968.     mmioIOProcType    = "file format"
  11969.     mmioDefExt        = "default extension"
  11970.     )
  11971.  
  11972.  fourcc              Specifies the FOURCC of the I/O procedure. 
  11973.  
  11974.  full path           Specifies the full path to the file and the file name of 
  11975.                      the IOProc DLL.  (You can use supported macros described 
  11976.                      in Supported Macros.) 
  11977.  
  11978.  entry name          Specifies the entry point of the IOProc DLL. 
  11979.  
  11980.  flags               Specifies any additional MMIO flags.  Set to 0L for this 
  11981.                      release. 
  11982.  
  11983.  extend length       Specifies the extended length of 16 for this release. 
  11984.  
  11985.  media type          Specifies the media type of this file. 
  11986.  
  11987.  file format         Specifies the type of IOProc, either a file format or 
  11988.                      storage system IOProc. 
  11989.  
  11990.  default extension   Specifies the default file extension. 
  11991.  
  11992.  For example, to install the AVC audio I/O procedure, create an INI change 
  11993.  control specifying the mmioInstall structure. 
  11994.  
  11995.   mmioInstall =
  11996.      (
  11997.      mmioFourCC        = "AVCA"
  11998.      mmioDllName       = "$(DEST)AVCAPROC.DLL"
  11999.      mmioDllEntryPoint = "AVCAIOProc"
  12000.      mmioFlags         = 0L
  12001.      mmioExtendLen     = 16L
  12002.      mmioMediaType     = 2L
  12003.      mmioIOProcType    = 2L
  12004.      mmioDefExt        = ""
  12005.      )
  12006.  
  12007.  Specify the name of your INI change control file using the SSINICH keyword in 
  12008.  the master control file (CONTROL.SCR). See CONTROL.SCR Subsystem Definition 
  12009.  for an example of a CONTROL.SCR file and a description of the keywords.  For 
  12010.  example: 
  12011.  
  12012.   SSINICH="BASE1.SCR"
  12013.  
  12014.  BASE1.SCR, located in the \MMOS2\INSTALL subdirectory, contains mmioInstall 
  12015.  structure examples.  You can also install an IOProc in your system by 
  12016.  identifying the IOProc in the initialization file (MMPMMMIO.INI) using the 
  12017.  mmioIniFileHandler function. 
  12018.  
  12019.  The following shows an example of how an application uses the 
  12020.  mmioIniFileHandler function to install the OS/2 1.3 PM bitmap image IOProc. 
  12021.  
  12022.   #define FOURCC_OS13   mmioFOURCC( 'O', 'S', '1', '3' )
  12023.  
  12024.   #pragma linkage( mmioIniFileHandler, system )
  12025.  
  12026.   void main ()
  12027.   {
  12028.    ULONG   rc;
  12029.    MMINIFILEINFO  mminifileinfo;
  12030.    mminifileinfo.fccIOProc = FOURCC_OS13;
  12031.    strcpy (mminifileinfo.szDLLName, "OS13PROC");
  12032.    strcpy (mminifileinfo.szProcName, "OS13BITMAPIOPROC");
  12033.    mminifileinfo.ulExtendLen = 16L;
  12034.    mminifileinfo.ulFlags = 0L;
  12035.    mminifileinfo.ulMediaType = MMIO_MEDIA_IMAGE;
  12036.    mminifileinfo.ulIOProcType = MMIO_IOPROC_FILEFORMAT;
  12037.    strcpy (mminifileinfo.szDefExt, "");
  12038.  
  12039.    printf ("Installing OS/2 PM Bitmap (V1.3) IOProc\n");
  12040.  
  12041.    rc = mmioIniFileHandler (&mminifileinfo, MMIO_INSTALLPROC);
  12042.    switch (rc)
  12043.    {
  12044.      case MMIO_SUCCESS:
  12045.       printf ("Installing Complete\n");
  12046.       break;
  12047.      case MMIOERR_INVALID_PARAMETER:
  12048.       printf ("Error in this install program\n");
  12049.       break;
  12050.      case MMIOERR_INTERNAL_SYSTEM:
  12051.       printf ("OS/2 MPM System Error\n");
  12052.       break;
  12053.      case MMIOERR_NO_CORE:
  12054.       printf ("Memory unavailable for this IOProc\n");
  12055.       break;
  12056.      case MMIOERR_INI_OPEN:
  12057.       printf ("Unable to access the OS/2 MMPMMMIO.INI file\n");
  12058.       break;
  12059.      case MMIOERR_INVALID_FILENAME:
  12060.       printf ("Cannot find the file : OS13PROC.DLL\n");
  12061.       break;
  12062.      default:
  12063.       printf ("Unknown error attempting to install OS/2 Bitmap V(1.3)\n");
  12064.       break;
  12065.    }
  12066.   }
  12067.  
  12068.  The advantage of installing I/O procedures in the MMPMMMIO.INI file is to 
  12069.  achieve application transparency; I/O procedures become built-in as soon as 
  12070.  you restart your OS/2 multimedia application.  Note that the IOProc must 
  12071.  reside in a DLL file, although more than one IOProc can reside in the DLL if 
  12072.  necessary. 
  12073.  
  12074.  
  12075. ΓòÉΓòÉΓòÉ 7.8. Inserting External Settings Pages ΓòÉΓòÉΓòÉ
  12076.  
  12077. The following approach shows you how to insert settings pages in the Multimedia 
  12078. Setup notebook, where the code for the settings pages exists outside the 
  12079. Multimedia Setup program itself.  This is applicable in situations where you 
  12080. want to insert an external settings page for configuration items that are not 
  12081. strictly related to a particular MCD.  For example, pages that apply to the 
  12082. system or to all media control interface devices of a particular class. 
  12083.  
  12084. Note:  To insert a settings page for a particular MCD, see Inserting Pages in 
  12085.        the Multimedia Setup Notebook. 
  12086.  
  12087.  MDM uses the MMPM2.INI file to maintain a data base of installed multimedia 
  12088.  components and devices.  MMPM2.INI is initialized by the MINSTALL program. 
  12089.  Additional sections in the MMPM2.INI file are initialized based on information 
  12090.  contained in the keywords in an installation control file, or as requested by 
  12091.  an application calling MDM to make the change. 
  12092.  
  12093.  You can write an INI change control file containing the ProfileData structure 
  12094.  to define external pages by following these steps: 
  12095.  
  12096.    1. Write a function to create the settings page. The function should be of 
  12097.       the prototype shown in the following example. 
  12098.  
  12099.               HWND InsertExamplePage(PMCI_DEVICESETTINGS_PARMS pMCIDevSettings)
  12100.  
  12101.               {
  12102.                 HWND  hwndPage;               /* Page window handle    */
  12103.                 CHAR  szTabText[CCHMAXPATH];  /* Buffer for tab string */
  12104.                 ULONG ulPageId;               /* Page Identifier       */
  12105.  
  12106.             /*******************************************************************/
  12107.             /*   Load a modeless secondary window                              */
  12108.             /*******************************************************************/
  12109.                 hwndPage    = WinLoadSecondaryWindow(
  12110.                                      pMCIDevSettings->hwndNotebook,
  12111.                                      pMCIDevSettings->hwndNotebook,
  12112.                                      ExamplePageDlgProc,
  12113.                                      vhmodMRI,
  12114.                                      ID_EXAMPLE,
  12115.                                      (PVOID)pMCIDevSettings);
  12116.  
  12117.                 if (!hwndPage) return (NULL);
  12118.  
  12119.                 ulPageId = (ULONG)WinSendMsg( pMCIDevSettings->hwndNotebook,
  12120.                                      BKM_INSERTPAGE,
  12121.                                      (ULONG)NULL,
  12122.                                      MPFROM2SHORT( BKA_AUTOPAGESIZE |
  12123.                                      BKA_MINOR, BKA_LAST ) );
  12124.             /*******************************************************************/
  12125.             /*  Associate a secondary window with a notebook page.             */
  12126.             /*******************************************************************/
  12127.  
  12128.                 WinSendMsg(pMCIDevSettings->hwndNotebook, BKM_SETPAGEWINDOWHWND,
  12129.                           MPFROMP( ulPageId ), MPFROMLONG( hwndPage ) );
  12130.  
  12131.             /*******************************************************************/
  12132.             /*  Get Tab Text from DLL                                          */
  12133.             /*******************************************************************/
  12134.  
  12135.                 WinLoadString(WinQueryAnchorBlock( HWND_DESKTOP ), vhmodMRI,
  12136.                        (USHORT)IDB_EXAMPLE, CCHMAXPATH, szTabText );
  12137.  
  12138.             /*******************************************************************/
  12139.             /*  Set Tab Text                                                   */
  12140.             /*******************************************************************/
  12141.  
  12142.                 WinSendMsg( pMCIDevSettings->hwndNotebook, BKM_SETTABTEXT,
  12143.                       MPFROMP( ulPageId ), szTabText );
  12144.  
  12145.                 return( hwndPage );
  12146.  
  12147.              }
  12148.  
  12149.              typedef struct {
  12150.                 HWND hwndHelpInstance;
  12151.              } MMPAGEINFO;
  12152.              typedef MMPAGEINFO * PMMPAGEINFO;
  12153.  
  12154.             /*******************************************************************/
  12155.             /*  Modeless secondary window procedure                            */
  12156.             /*******************************************************************/
  12157.  
  12158.              MRESULT EXPENTRY ExamplePageDlgProc (HWND hwnd, USHORT msg,
  12159.                                                   MPARAM mp1, MPARAM mp2)
  12160.  
  12161.              PMMPAGEINFO pMMPageInfo = (PMMPAGEINFO)
  12162.                                         WinQueryWindowPtr (hwnd, QWL_USER);
  12163.  
  12164.                switch (msg) {
  12165.                   case WM_INITDLG:
  12166.                      /* Initialize The Page */
  12167.                      pMMPageInfo = (PMMPAGEINFO) malloc(sizeof(MMPAGEINFO));
  12168.                      WinSetWindowPtr (hwnd, QWL_USER, pMMPageInfo);
  12169.  
  12170.                      /* Create a Help Instance */
  12171.                      pMMPageInfo->hwndHelpInstance = WinCreateHelpInstance(...);
  12172.                      break;
  12173.  
  12174.                   case WM_DESTROY:
  12175.                      /* Clean up page window resources */
  12176.                       WinDestroyHelpInstance (pMMPageInfo->hwndHelpInstance);
  12177.                       free (pMMPageInfo);
  12178.                       break;
  12179.  
  12180.                   case WM_COMMAND:
  12181.                       /* Process All Commands */
  12182.                       return ((MRESULT) FALSE);
  12183.                       break;
  12184.  
  12185.                   case MM_TABHELP:
  12186.                       /* Display help for a tab */
  12187.                       if (pMMPageInfo->hwndHelpInstance) {
  12188.                           WinSendMsg(
  12189.                               pMMPageInfo->hwndHelpInstance,
  12190.                               HM_DISPLAY_HELP,
  12191.                               MPFROMSHORT(WinQueryWindowUShort(hwnd, QWS_ID)),
  12192.                               HM_RESOURCEID );
  12193.                        }
  12194.                        break;
  12195.  
  12196.                   case WM_CLOSE:
  12197.                       return ((MRESULT) FALSE);
  12198.                       break;
  12199.  
  12200.                   case WM_HELP:
  12201.                       if (pMMPageInfo->hwndHelpInstance) {
  12202.                           WinSendMsg(
  12203.                                pMMPageInfo->hwndHelpInstance,
  12204.                                HM_DISPLAY_HELP,
  12205.                                (MPARAM) mp1,
  12206.                                HM_RESOURCEID );
  12207.                        }
  12208.                        return ((MRESULT)TRUE);
  12209.                        break;
  12210.  
  12211.                   case WM_TRANSLATEACCEL:
  12212.                         return (WinDefWindowProc (hwnd, msg, mp1, mp2));
  12213.                         break;
  12214.  
  12215.                   case HM_QUERY_KEYS_HELP:
  12216.                         return((MRESULT) IDH_HELPFORKEYS);
  12217.                         break;
  12218.  
  12219.                   }
  12220.  
  12221.                   return (WinDefSecondaryWindowProc(hwnd, msg, mp1, mp2));
  12222.                }
  12223.  
  12224.    2. Create an INI change control file containing the ProfileData structure as 
  12225.       shown in the following example. 
  12226.  
  12227.                ProfileData =
  12228.                   (
  12229.                   ini="$(DIR)0\\MMPM.INI"            /* Name of the INI file    */
  12230.                   appname="STPM_SettingsPage:7"      /* External settings pages */
  12231.                   keyname="UniqueName"               /* Name of the page        */
  12232.                   dll="RESDLLNAME"                   /* Resource DLL name       */
  12233.                   id=33L                             /* Resource ID             */
  12234.                   )
  12235.       The external settings pages are stored with the appname of 
  12236.       STPM_SettingsPage:#, where # is the string equivalent of 
  12237.       MCI_DEVICETYPE_xxx values.  The # value of 0 indicates that the settings 
  12238.       page is a system-oriented settings page.  The keyname value for an 
  12239.       external settings page can be any unique name that identifies the page. 
  12240.       The dll value specifies the name of the DLL that contains a RCDATA 
  12241.       resource with the value specified in the id field.  The id field is the 
  12242.       resource ID of the RCDATA resource.  The value is a LONG numeric value; 
  12243.       for example, 33L. 
  12244.  
  12245.       In addition to the INI change control file, you must load a resource DLL 
  12246.       during installation. The value of the data item is a string that contains 
  12247.       the module name and the entry point of the DLL that inserts a settings 
  12248.       page.  The value string in the example shown in the following example is 
  12249.       "MakePage,InsertExamplePage". 
  12250.  
  12251.                RCDATA  33
  12252.                BEGIN
  12253.                  "MakePage,InsertExamplePage"
  12254.                END
  12255.  
  12256.       This script format loads a block of data from a RCDATA resource stored in 
  12257.       a DLL, and writes it to a standard OS/2 INI file using the OS/2 
  12258.       PrfWriteProfileData function.  The ProfileData structure is discussed in 
  12259.       more detail in Defining Changes to Other INI Files. 
  12260.  
  12261.       Note:  Entry points that are registered in this way will apply to all 
  12262.              devices of the declared media control interface device type. 
  12263.              Therefore, if a settings page is intended to apply to a particular 
  12264.              device, then the function should verify that it is dealing with 
  12265.              the appropriate device. 
  12266.  
  12267.    3. Specify the name of the INI change control file created in step 2 in 
  12268.       CONTROL.SCR. 
  12269.  
  12270.    4. If you are writing an installation DLL, an external settings page can be 
  12271.       installed by calling the OS/2 PrfWriteProfileData function directly as 
  12272.       shown in the following example. 
  12273.  
  12274.             hini = PrfOpenProfile("c:\mmos2\mmpm.ini");
  12275.             PrfWriteProfileData (hini,
  12276.                                  "STPM_SettingsPage:7",         /* Appname      */
  12277.                                  "UniqueName",                  /* Keyname      */
  12278.                                  "MakePage, InsertExamplePage", /* Value        */
  12279.                                  "strlen("MakePage, InsertExamplePage")+1);
  12280.                                                                 /* Value length */
  12281.             PrfCloseProfile(hini);
  12282.  
  12283.  Refer to the OS/2 Presentation Manager Guide and Reference for more 
  12284.  information on the PrfWriteProfileData function. 
  12285.  
  12286.  
  12287. ΓòÉΓòÉΓòÉ 7.9. Installation LOG File ΓòÉΓòÉΓòÉ
  12288.  
  12289. During installation, MINSTALL writes an installation log file called 
  12290. MINSTALL.LOG.  The LOG file records installation information and can be used to 
  12291. identify problems that occur during the installation procedure. 
  12292.  
  12293. When you start the installation procedure, the LOG file defaults to the root 
  12294. directory of the startup (boot) disk.  When the user selects the Install push 
  12295. button in the installation main selection window, the LOG file is moved to the 
  12296. destination directory.  The LOG file can be printed using the PRINT command or 
  12297. viewed using the TYPE command.  To view the LOG file on the screen, at an OS/2 
  12298. command prompt, type: 
  12299.  
  12300. TYPE d:\MMOS2\INSTALL\MINSTALL.LOG
  12301.  
  12302. where d is the destination drive selected for the installation. 
  12303.  
  12304. If a problem occurs during installation, MINSTALL might display a screen with 
  12305. information about the problem.  If you cannot solve the problem using the 
  12306. information on the screen, you can view the LOG file to determine how to handle 
  12307. the problem.  The problem will not necessarily be the last entry in the LOG 
  12308. file. 
  12309.  
  12310. If you determine that you need to call IBM for support, print the LOG file 
  12311. before you call.  The IBM support personnel will need the LOG information to 
  12312. resolve your installation problem. 
  12313.  
  12314. If the installation is successful, a Congratulations screen appears. 
  12315.  
  12316. Note:  You might receive a message that the installation was successful, but 
  12317.        when you view the LOG file you notice that the file reported some 
  12318.        errors.  This means that the errors were resolved during the 
  12319.        installation procedure and the errors reported in the LOG file can be 
  12320.        ignored. 
  12321.  
  12322.  The following example shows a sample of a MINSTALL.LOG file for a successful 
  12323.  installation. 
  12324.  
  12325.   Begin parsing master file - Z:\RT\CONTROL.SCR.
  12326.   Z:\RT\CONTROL.SCR parsed successfully.
  12327.   Begin parsing file list - Z:\RT\MASTERH3.RT
  12328.   Z:\RT\MASTERH3.RT parsed successfully.
  12329.   The following file was copied successfully: D:\MMOS2\README
  12330.   The following file was copied successfully: D:\MMOS2\MINSTALL.EXE
  12331.   .
  12332.   .
  12333.   .
  12334.   The following file was copied successfully: D:\MMOS2\INSTALL\WAVEFILE.EAS
  12335.   Loaded DLL D:\MMOS2\DLL\MMSND.DLL and calling entry point InstallMMSound.
  12336.   Returned from DLL D:\MMOS2\DLL\MMSND.DLL.
  12337.   Loaded DLL D:\MMOS2\DLL\QRYUM.DLL and calling entry point LocateUM.
  12338.   An extended Sysinfo failed call with dwItem=1024.
  12339.   An extended Sysinfo failed call with dwItem=4096.
  12340.   Completed updating MMPM2.INI with Digital Video Player devices.
  12341.   Returned from DLL D:\MMOS2\DLL\QRYUM.DLL.
  12342.   Loaded DLL D:\MMOS2\DLL\QRYCD.DLL and calling entry point LocateCD.
  12343.   An extended Sysinfo failed call with dwItem=4.
  12344.   .
  12345.   .
  12346.   .
  12347.   An extended Sysinfo failed call with dwItem=4.
  12348.   Returned from DLL D:\MMOS2\DLL\QRYCD.DLL.
  12349.   Loaded DLL D:\MMOS2\DLL\QRYAD.DLL and calling entry point LocateMAUDIO.
  12350.   Completed updating CONFIG.SYS with M-Audio devices
  12351.   An extended Sysinfo failed call with dwItem=1024.
  12352.   An extended Sysinfo failed call with dwItem=1024.
  12353.   Completed updating MMPM2.INI with M-Audio devices
  12354.   Returned from DLL D:\MMOS2\DLL\QRYAD.DLL.
  12355.   Starting to parse the file 'D:\MMOS2\INSTALL\BASE.SCR'.
  12356.   Successfully parsed the file 'D:\MMOS2\INSTALL\BASE.SCR'.
  12357.   Starting to parse the file 'D:\MMOS2\INSTALL\SMVINI.SCR'.
  12358.   Successfully parsed the file 'D:\MMOS2\INSTALL\SMVINI.SCR'.
  12359.   Starting to parse the file 'D:\MMOS2\INSTALL\BASECONF.CH'.
  12360.   Successfully parsed the file 'D:\MMOS2\INSTALL\BASECONF.CH'.
  12361.   Starting to parse the file 'D:\MMOS2\INSTALL\SMVCONF.CH'.
  12362.   Successfully parsed the file 'D:\MMOS2\INSTALL\SMVCONF.CH'.
  12363.   Loaded DLL D:\MMOS2\DLL\ITERM.DLL and calling entry point ITermEntry.
  12364.   Returned from DLL D:\MMOS2\DLL\ITERM.DLL.
  12365.   Loaded DLL D:\MMOS2\DLL\WEPMPINT.DLL and calling entry point WepmPlusAdd.
  12366.   Returned from DLL D:\MMOS2\DLL\WEPMPINT.DLL.
  12367.  
  12368.  
  12369. ΓòÉΓòÉΓòÉ 8. Real-Time MIDI Subsystem ΓòÉΓòÉΓòÉ
  12370.  
  12371. The real-time MIDI subsystem (RTMIDI) provides support for handling real-time 
  12372. MIDI operations for applications. 
  12373.  
  12374. To provide a robust system for real-time MIDI processing, RTMIDI uses an 
  12375. object-oriented paradigm. Nodes are entities that can send or receive MIDI 
  12376. messages, perhaps manipulating the messages before sending them back out again. 
  12377. Nodes that only manipulate messages are called filter nodes. Nodes that can 
  12378. generate messages are called source nodes. 
  12379.  
  12380. There are node classes and node instances, where the term node implies node 
  12381. instance. In an object-oriented programming language, classes define what 
  12382. variables and operations are available and what they are called. When a class 
  12383. is instantiated, an object that has a physical existence is created. RTMIDI 
  12384. operates the same way. 
  12385.  
  12386. When a node wants to be "known" by RTMIDI, it must first register a node class. 
  12387. This step is only necessary for user-defined classes, since the pre-defined 
  12388. classes are registered by default. Registration provides two pieces of 
  12389. information for RTMIDI:  the name of the class and the addresses of all the 
  12390. requisite functions. For example, RTMIDI will need to know what function to 
  12391. call to send a message to the node. 
  12392.  
  12393. Once a class is registered, it can be instantiated.  And once instantiated, it 
  12394. can be connected to other instances. The collection of instances and links is 
  12395. known as the node network. Each instance of a class also has its own instance 
  12396. data. When an instance is created, RTMIDI allocates a block of memory. Whenever 
  12397. any of the functions for this class are called, the instance data pointer is 
  12398. passed. This allows a particular function to determine which instance is being 
  12399. called and also allows it to store instance-specific data. 
  12400.  
  12401. Instances are sometimes called nodes, especially if they are qualified by their 
  12402. class.  For example, a hardware node is an instance of the hardware class. 
  12403.  
  12404.  
  12405. ΓòÉΓòÉΓòÉ 8.1. Node Classes ΓòÉΓòÉΓòÉ
  12406.  
  12407. Node classes are descriptions of nodes. From the application's (and user's) 
  12408. point of view, classes are abstractions that have only three features: 
  12409.  
  12410.      They have a name. This name is stored in the MIDI driver itself, and can 
  12411.       be used by applications or the user to identify the class. However, the 
  12412.       driver itself uses numbers to identify classes, so the applications (or 
  12413.       the user) must provide a mapping from class names to class numbers. 
  12414.  
  12415.      They can be instantiated. A node instance of that class is then created. 
  12416.       See Node Instances for the features of a node instance. 
  12417.  
  12418.      They define the interpretation of the compound message. The architecture 
  12419.       itself doesn't care about the contents of the compound messages. This is 
  12420.       the responsibility of the classes. The compound message format described 
  12421.       above is the one used by all the pre-defined classes. It is possible to 
  12422.       create a collection of classes which uses a different format, provided 
  12423.       the size of the structure is the same. 
  12424.  
  12425.  Generally, all instances of a particular class perform the same function, but 
  12426.  this is not a requirement. If a class supports it, the application can send 
  12427.  data to a particular instance of that class at any time. This data can be used 
  12428.  to configure (or reconfigure) the instance, possibly giving it completely 
  12429.  different functionality. 
  12430.  
  12431.  
  12432. ΓòÉΓòÉΓòÉ 8.2. Node Instances ΓòÉΓòÉΓòÉ
  12433.  
  12434. Node instances are physical manifestations of node classes.  A node instance 
  12435. has the following functions: 
  12436.  
  12437.      It can generate messages. An instance can create a compound message. For 
  12438.       example, an instance of the hardware class can create a message from a 
  12439.       stream of bytes sent by a sound card. The hardware instance collects 
  12440.       bytes until an entire compound message arrives. At this point, it has a 
  12441.       complete compound message ready for further processing. 
  12442.  
  12443.      It can be linked to another instance. Compound messages travel from one 
  12444.       instance to another. The link tells the instance where to send the 
  12445.       message, if it decides to send it at all. 
  12446.  
  12447.      It can send a message to another instance. The link tells the instance 
  12448.       where to send the message. Note that the instance can decide at run-time 
  12449.       whether to send the message. For example, an instance that performs 
  12450.       filtering can decide to forward messages that fit a certain criteria. 
  12451.       Messages that are not forwarded are lost. 
  12452.  
  12453.      It can be configured. An application can send configuration data to a 
  12454.       particular instance at any time. The class determines whether 
  12455.       configuration data is accepted, but the instance processes the data. 
  12456.       Typically, the configuration data changes some of the parameters of the 
  12457.       instance. For example, the filter instance (mentioned in the previous 
  12458.       list item) can accept data that changes the filter criteria. Another 
  12459.       example is an instance that can accept actual machine language 
  12460.       instructions and execute them whenever a message arrives. This feature 
  12461.       would make that class very powerful, and very dangerous. 
  12462.  
  12463.      It can be identified with a unique number. This 32-bit number is called 
  12464.       the instance number and it is used internally as a 16:16 pointer to the 
  12465.       instance data. When another driver or an application wishes to reference 
  12466.       a particular instance, it uses the instance number. 
  12467.  
  12468.  RTMIDI comes with pre-defined classes. Each of these is discussed in detail in 
  12469.  Pre-defined Classes. 
  12470.  
  12471.  
  12472. ΓòÉΓòÉΓòÉ 8.3. The Scheduler ΓòÉΓòÉΓòÉ
  12473.  
  12474. The scheduler is the mechanism that passes messages from one instance to 
  12475. another. It allows multiple instances to pass messages "simultaneously" to 
  12476. multiple targets. The scheduler uses two round-robin queues, Q1 and Q2. Q1 is 
  12477. for real-time messages, and Q2 for non-real-time System Exclusive (SysEx) 
  12478. messages. The scheduler uses the following algorithm: 
  12479.  
  12480.    1. Some instance creates a message. This can occur during interrupt time 
  12481.       (for example, from a hardware node) or via task time (for example, from 
  12482.       an application node).  It adds that message to the end of either Q1 or 
  12483.       Q2. It then instructs the scheduler to process the queues. 
  12484.  
  12485.    2. The scheduler runs. If an interrupt from a Type A driver occurs, it is 
  12486.       possible for a hardware node to create a new message while the scheduler 
  12487.       is running. (See the MMPM/2 Device Driver Reference for a description of 
  12488.       a Type A driver.) The scheduler can accept new entries into either queue 
  12489.       while it is running. It will disable interrupts only during those times 
  12490.       when the queue is manipulated. 
  12491.  
  12492.    3. The scheduler first processes all entries in Q1. 
  12493.  
  12494.    4. When Q1 is empty, the scheduler looks at Q2. If it is empty, the 
  12495.       scheduler exits. Otherwise, it processes only one element in Q2. Steps 3 
  12496.       and 4 are repeated. 
  12497.  
  12498.  In this manner, real-time messages in Q1 are given priority over messages in 
  12499.  Q2. Source nodes should put non-real-time SysEx messages into Q2, and all 
  12500.  other messages in Q1. This prevents bulk SysEx dumps from blocking the 
  12501.  real-time messages. 
  12502.  
  12503.  The scheduler has the ability to use a scheduler daemon to run. After a source 
  12504.  instance places a message on a scheduler queue, it tells the scheduler to run. 
  12505.  However, this might occur at interrupt time if the message is from a hardware 
  12506.  node. If the scheduler were to run at interrupt time as well, system 
  12507.  performance could be significantly reduced. 
  12508.  
  12509.  The desired effect would be to run the scheduler in task time, after the 
  12510.  interrupt handler has exited. This is known as deferred interrupt processing 
  12511.  and the scheduler daemon provides this. The daemon is a small program which 
  12512.  effectively creates a ring 0 super high priority thread. These threads are 
  12513.  guaranteed to run immediately after the current thread or context has 
  12514.  completed. In other words, if an interrupt handler unblocks such a thread, 
  12515.  that thread is run immediately after the interrupt handler exits. If it is 
  12516.  unblocked by a ring 3 process, then it preempts the process that unblocked and 
  12517.  runs immediately. If it is unblocked by another ring 0 task thread, it runs 
  12518.  after that thread has returned to ring 3 (for example, after the strategy 
  12519.  call). 
  12520.  
  12521.  When the scheduler is asked to process the queues, it checks to see whether it 
  12522.  is running in another thread.  If not, then it processes the queues 
  12523.  immediately. Otherwise, it checks to see if the scheduler daemon is available. 
  12524.  If so, then it unblocks the daemon thread, which will eventually run the 
  12525.  scheduler. If there is no daemon, then it has no choice but to process the 
  12526.  queues immediately. If the node network is complex, then the scheduler could 
  12527.  spend a significant amount of time in the interrupt handler. 
  12528.  
  12529.  
  12530. ΓòÉΓòÉΓòÉ 8.4. Pre-defined Classes ΓòÉΓòÉΓòÉ
  12531.  
  12532. See the following sections for descriptions of the pre-defined classes that are 
  12533. provided with RTMIDI. 
  12534.  
  12535.      The Hardware Class 
  12536.      The Application Class 
  12537.  
  12538.  
  12539. ΓòÉΓòÉΓòÉ 8.4.1. The Hardware Class ΓòÉΓòÉΓòÉ
  12540.  
  12541. Each MIDI port or other hardware that can receive or transmit MIDI data is a 
  12542. Type A device. A Type A device is supported by one Type A driver, but a Type A 
  12543. driver can support any number of Type A devices. The Type A devices belong to 
  12544. the Type A driver. This means that if a card has two MIDI ports, and one driver 
  12545. is used to support both ports, that driver will belong to two hardware nodes. 
  12546.  
  12547. The hardware class is used to represent Type A devices. In order for a Type A 
  12548. device to be recognized by RTMIDI, its Type A driver must register the device 
  12549. with RTMIDI. For each device registered, an instance of the hardware class is 
  12550. created. 
  12551.  
  12552. A hardware node communicates with the Type A driver via inter-device-driver 
  12553. communication, or IDC calls.  These are simple far (16:16) calls made from one 
  12554. driver to another, and the calling convention is defined by the drivers. 
  12555. (Inter-device-driver communication is described in detail in the Physical 
  12556. Device Driver Reference.) 
  12557.  
  12558. The MIDI bytes from any messages that are sent to the hardware node are 
  12559. immediately transmitted to the Type A driver, and any data sent from the driver 
  12560. to RTMIDI is packaged into compound messages and forwarded. 
  12561.  
  12562. When a hardware node is enabled, it tells the corresponding driver to open. 
  12563. This usually means attaching the IRQ and initializing the hardware. 
  12564.  
  12565. RTMIDI supports the concept of instance names. During Type A registration, the 
  12566. Type A driver tells RTMIDI what the name of the Type A device is. This is 
  12567. typically more descriptive than the eight-byte name stored in the Type A 
  12568. driver's device header. For instance, the MPU-401 driver's device name is 
  12569. "MPU401$", but its instance name is "MPU-401 #1 (I/O=0330, IRQ=05)". If the 
  12570. name already exists, an error is returned, and the driver can either pick 
  12571. another name and try again, or fail to load. 
  12572.  
  12573.  
  12574. ΓòÉΓòÉΓòÉ 8.4.2. The Application Class ΓòÉΓòÉΓòÉ
  12575.  
  12576. This class provides a link between applications and RTMIDI. Just like the IDC 
  12577. interface is the bridge between the hardware nodes and the Type A drivers, the 
  12578. IOCtl interface is the link between application nodes and applications. Only 
  12579. Type A drivers can create and destroy hardware nodes, and only applications can 
  12580. create and destroy application nodes. 
  12581.  
  12582. Applications communicate with application nodes using the MIDISendMessage 
  12583. functiion, which is used to send a block of compound messages. Each compound 
  12584. message has a time stamp telling RTMIDI when the message is to be sent. When 
  12585. the application sends a block of messages, the application node checks the 
  12586. timestamps of all the messages. Each message that has a timestamp equal to or 
  12587. less than the current time is processed immediately. The remaining messages are 
  12588. queued. If the queue is not large enough to hold all messages, the driver 
  12589. places as many messages as it can into the queue and blocks the thread. As time 
  12590. passes, messages are removed from the queue. Eventually, the remaining messages 
  12591. will be queued and at this point the thread is unblocked. 
  12592.  
  12593. The timestamps of all compound messages in a block must be in chronological 
  12594. order. If a particular message in the block has a timestamp value less than the 
  12595. previous message (msg[n].ulTime < msg[n-1].ulTime), then the timestamp will be 
  12596. treated as if it were equal to the previous message's timestamp. To send a 
  12597. message immediately, set its timestamp to zero. 
  12598.  
  12599. See the Multimedia Programming Reference for documentation of the RTMIDI 
  12600. application programming interface (API). 
  12601.  
  12602.  
  12603. ΓòÉΓòÉΓòÉ 9. Stream Handler Module Definitions ΓòÉΓòÉΓòÉ
  12604.  
  12605. The following information describes the high-level design and operation of the 
  12606. stream handlers provided with the OS/2 multimedia system.  The handlers 
  12607. described include: 
  12608.  
  12609.      Audio Stream Handler DLL and "Stub" Device Driver 
  12610.      MIDI Mapper Stream Handler DLL 
  12611.      File System Stream Handler DLL 
  12612.      Memory Stream Handler DLL 
  12613.      CD-DA Stream Handler DLL 
  12614.      CD-ROM XA Stream Handler DLL 
  12615.  
  12616.  
  12617. ΓòÉΓòÉΓòÉ 9.1. Audio Stream Handler ΓòÉΓòÉΓòÉ
  12618.  
  12619. The Audio Stream Handler is used to control streaming of audio data.  In some 
  12620. cases, the Audio Stream Handler acts as a consumer of audio data, and in other 
  12621. cases it acts as a producer.  The audio data in each of these cases is always 
  12622. digital.  It is sometimes compressed and sometimes uncompressed.  Each of these 
  12623. cases is discussed in detail below.  In addition to these discussions, 
  12624. information is included concerning interaction between this module and the 
  12625. Sync/Stream Manager. 
  12626.  
  12627. This module is implemented as a DLL running at Ring 3 as well as a stub device 
  12628. driver module (PDD) running at Ring 0 (system kernel privilege level). 
  12629.  
  12630. The Audio Stream Handler running at Ring 3 can call Ring 3 DLL audio CODECs to 
  12631. assist in compressing and decompressing audio data.  The Ring 3 Audio Stream 
  12632. Handler communicates with audio device drivers through the DDCMD interfaces in 
  12633. the VSD.  (Refer to the OS/2 Multimedia Programming Reference for the VSD DDCMD 
  12634. interface definitions.) 
  12635.  
  12636. Existing audio device drivers use standard audio-device-driver interface 
  12637. (DDCMDs) to communicate with the Ring 0 stub device driver module. 
  12638.  
  12639. External Interface Description 
  12640.  
  12641. The description for the Ring 3 Audio Stream Handler external interface follows: 
  12642.  
  12643.  File Name           AUDIOSH.DLL 
  12644.  
  12645.  Handler Name        AUDIOSH$ 
  12646.  
  12647.  Handler Class       AUDIOSH 
  12648.  
  12649.  DD/DLL              DLL 
  12650.  
  12651.  Source              This stream handler can be a source when recording audio 
  12652.                      data from an audio device.  When using this component to 
  12653.                      record digitized audio, it is known as an audio Source 
  12654.                      Stream Handler.  Audio signals are brought into the system 
  12655.                      and digitized by an audio hardware device.  The resultant 
  12656.                      data is then passed to the consumer stream handler by way 
  12657.                      of a set of stream buffers. 
  12658.  
  12659.                      The output of this stream handler can be in several 
  12660.                      different forms such as uncompressed 16-bit PCM, and 
  12661.                      several styles of compressed ADPCM. 
  12662.  
  12663.  Target              This stream handler can be a target when playing audio 
  12664.                      data from a source.  When using this stream handler to 
  12665.                      play back recorded audio samples, it is acting as an audio 
  12666.                      target stream handler.  Digitized audio data will be 
  12667.                      streamed from the source stream handler (for example, the 
  12668.                      File System Stream Handler) through the Sync/Stream 
  12669.                      Manager.  This data is transferred through a number of 
  12670.                      stream buffers, which are allocated and managed through 
  12671.                      the Sync/Stream Manager. 
  12672.  
  12673.                      The exact number and size of these stream buffers will 
  12674.                      depend on the type of data being streamed.  The 
  12675.                      information needed to determine the size and number of 
  12676.                      stream buffers is contained in the stream protocol control 
  12677.                      block (SPCB) for a particular type of stream. 
  12678.  
  12679.                      This stream handler supports audio data in several 
  12680.                      different formats (stream types) such as 16-bit PCM, AVC's 
  12681.                      8-bit ADPCM, CD-ROM XA's 8-bit ADPCM, and so forth. 
  12682.  
  12683.                      In addition to handling the playback of audio data, this 
  12684.                      stream handler generates sync pulses based on the playback 
  12685.                      of an audio stream. Therefore, this stream handler can be 
  12686.                      a master or a slave in a sync relationship. The 
  12687.                      application can set up a sync relationship between two 
  12688.                      streams and define the sync pulse granularity. Sync pulses 
  12689.                      would then be generated by the Audio Stream Handler, 
  12690.                      possibly on a recurring interval, based on the sync 
  12691.                      granularity defined in the SPCB for the data type. 
  12692.  
  12693.  Device Control Blocks 
  12694.  
  12695.  The Ring 3 Audio Stream Handler supports two device control blocks (DCBs). 
  12696.  The DCB is used to associate an audio device driver with this stream handler 
  12697.  for this stream instance.  The DCB is passed as a parameter on a call to 
  12698.  SpiCreateStream. 
  12699.  
  12700.    /**********************************************
  12701.     *
  12702.     * DCB_AUDIOSH - Device Control Block for the
  12703.     *               Audio Stream Handler.
  12704.     *               (*** PACKED STRUCTURE ***)
  12705.     **********************************************/
  12706.    typedef struct _dcb_audiosh { /* dcb_audiosh  -  Device Control Block */
  12707.       ULONG   ulDCBLen;                  /* Length of structure          */
  12708.       SZ      szDevName[MAX_SPI_NAME];   /* Device driver name           */
  12709.       ULONG   ulSysFileNum;              /* File handle number - From an */
  12710.                                          /* audio_init call              */
  12711.       } DCB_AUDIOSH;
  12712.    typedef struct _dcb_audiosh FAR  *PDCB_AUDIOSH;
  12713.  
  12714.  The Ring 3 Audio Stream Handler also supports the VSD device control block 
  12715.  (VSD_DCB) which identifies the VSD DLL to be used by the Ring 3 Audio Stream 
  12716.  Handler.  The VSD_DCB is passed as a parameter on a call to SpiCreateStream. 
  12717.  
  12718.  
  12719.   /***************************************************************************
  12720.    *
  12721.    * VSD_DCB - VSD Device Control Block
  12722.    *
  12723.    *         This structure will allow stream handlers to use the VSD DLL
  12724.    *         by using by the additional fields in the structure.
  12725.    *
  12726.    *               (*** PACKED STRUCTURE ***)
  12727.    ***************************************************************************/
  12728.   typedef struct _VSD_DCB { /* vsd_dcb - VSD Device Control Block            */
  12729.  
  12730.      ULONG   ulDCBLen;                /* Length of structure                 */
  12731.      SZ      szDevName[MAX_SPI_NAME]; /* Device driver name        */
  12732.      ULONG   ulSysFileNum;            /* File handle number                  */
  12733.      ULONG   hvsd;                    /* Handle to VSD instance              */
  12734.      PFN     pfnvsdEntryPoint;        /* Address of VSD entry point          */
  12735.      ULONG   ulReserved1;             /* Reserved for system                 */
  12736.      ULONG   ulReserved2;             /* Reserved for system                 */
  12737.  
  12738.      } VSD_DCB;
  12739.  
  12740.   typedef VSD_DCB FAR *PVSD_DCB;
  12741.  
  12742.  Associate Control Blocks 
  12743.  
  12744.  The Audio Stream Handler does not support an associate control block. 
  12745.  
  12746.  Implicit Events (EVENT_IMPLICIT_TYPE) Supported 
  12747.  
  12748.  The following implicit (EVENT_IMPLICIT_TYPE) events for the Audio Stream 
  12749.  Handler are supported: 
  12750.  
  12751.      EVENT_ERROR 
  12752.  
  12753.       The ulStatus field will contain the error code.  The possible error codes 
  12754.       that can be generated and returned by this stream handler are: 
  12755.         -  ERROR_INVALID_BUFFER_RETURNED 
  12756.         -  ERROR_DEVICE_OVERRUN 
  12757.         -  ERROR_STREAM_STOP_PENDING 
  12758.      EVENT_PLAYLISTCUEPOINT 
  12759.  
  12760.       This will be generated only when this stream handler is a target and it 
  12761.       finds a cuepoint indicator in the buffer table from the Sync/Stream 
  12762.       Manager. The event will be reported after the data has been written to 
  12763.       the file system using MMIO.  The ulMessageParm field of the PLAYL_EVCB 
  12764.       will be filled in with the message supplied in the playlist instruction. 
  12765.       The mmtimeStream field will not be filled in. 
  12766.  
  12767.  Explicit Events Supported 
  12768.  
  12769.  The following explicit events for the Audio Stream Handler are supported: 
  12770.  
  12771.      EVENT_CUE_TIME 
  12772.      EVENT_CUE_TIME_PAUSE 
  12773.      EVENT_DATAUNDERRUN 
  12774.  
  12775.  Explicit Events Not Supported 
  12776.  
  12777.  The following explicit events for the Audio Stream Handler are not supported: 
  12778.  
  12779.      EVENT_CUE_DATA 
  12780.      EVENT_DATAOVERRUN (Not Supported) 
  12781.  
  12782.  Stream Handler Commands Supported 
  12783.  
  12784.  The following stream handler commands (SHC) are supported. Refer to the OS/2 
  12785.  Multimedia Programming Reference for a description of these SHC commands and 
  12786.  the error return codes. 
  12787.  
  12788.      SHC_ASSOCIATE 
  12789.  
  12790.       Possible Return Codes: 
  12791.  
  12792.         -  NO_ERROR 
  12793.         -  ERROR_INVALID_FUNCTION 
  12794.         -  ERROR_INVALID_REQUEST 
  12795.  
  12796.      SHC_CLOSE 
  12797.  
  12798.       Possible Return Codes: 
  12799.  
  12800.         -  NO_ERROR 
  12801.         -  ERROR_INVALID_FUNCTION 
  12802.  
  12803.      SHC_CREATE 
  12804.  
  12805.       Possible Return Codes: 
  12806.  
  12807.         -  NO_ERROR 
  12808.         -  ERROR_INVALID_FUNCTION 
  12809.         -  ERROR_STREAM_CREATION 
  12810.         -  ERROR_INVALID_STREAM 
  12811.         -  ERROR_DEVICE_NOT_FOUND 
  12812.         -  ERROR_INVALID_BLOCK 
  12813.         -  ERROR_INVALID_SPCBKEY 
  12814.  
  12815.      SHC_DESTROY 
  12816.  
  12817.       Possible Return Codes: 
  12818.  
  12819.         -  NO_ERROR 
  12820.         -  ERROR_INVALID_FUNCTION 
  12821.         -  ERROR_INVALID_STREAM 
  12822.  
  12823.      SHC_DISABLE_EVENT 
  12824.  
  12825.       Possible Return Codes: 
  12826.  
  12827.         -  NO_ERROR 
  12828.         -  ERROR_INVALID_FUNCTION 
  12829.         -  ERROR_INVALID_EVENT 
  12830.  
  12831.      SHC_DISABLE_SYNC 
  12832.  
  12833.       Possible Return Codes: 
  12834.  
  12835.         -  NO_ERROR 
  12836.         -  ERROR_INVALID_FUNCTION 
  12837.  
  12838.      SHC_ENABLE_EVENT 
  12839.  
  12840.       Possible Return Codes: 
  12841.  
  12842.         -  NO_ERROR 
  12843.         -  ERROR_INVALID_FUNCTION 
  12844.         -  ERROR_TOO_MANY_EVENTS 
  12845.         -  ERROR_INVALID_EVENT 
  12846.  
  12847.      SHC_ENABLE_SYNC 
  12848.  
  12849.       Possible Return Codes: 
  12850.  
  12851.         -  NO_ERROR 
  12852.         -  ERROR_INVALID_FUNCTION 
  12853.         -  ERROR_INVALID_FLAG 
  12854.         -  ERROR_INVALID_STREAM 
  12855.         -  ERROR_STREAM_NOTMASTER 
  12856.         -  ERROR_INVALID_NUMSLAVES 
  12857.  
  12858.      SHC_ENUMERATE_PROTOCOLS 
  12859.  
  12860.       Possible Return Codes: 
  12861.  
  12862.         -  NO_ERROR 
  12863.         -  ERROR_INVALID_FUNCTION 
  12864.         -  ERROR_INSUFF_BUFFER 
  12865.  
  12866.      SHC_GET_PROTOCOL 
  12867.  
  12868.       Possible Return Codes: 
  12869.  
  12870.         -  NO_ERROR 
  12871.         -  ERROR_INVALID_FUNCTION 
  12872.         -  ERROR_INVALID_SPCBKEY 
  12873.  
  12874.      SHC_GET_TIME 
  12875.  
  12876.       Possible Return Codes: 
  12877.  
  12878.         -  NO_ERROR 
  12879.         -  ERROR_INVALID_FUNCTION 
  12880.         -  ERROR_INVALID_STREAM 
  12881.  
  12882.      SHC_INSTALL_PROTOCOL 
  12883.  
  12884.       Possible Return Codes: 
  12885.  
  12886.         -  NO_ERROR 
  12887.         -  ERROR_INVALID_FUNCTION 
  12888.         -  ERROR_INVALID_SPCBKEY 
  12889.         -  ERROR_ALLOC_RESOURCES 
  12890.  
  12891.      SHC_NEGOTIATE_RESULT 
  12892.  
  12893.       Possible Return Codes: 
  12894.  
  12895.         -  NO_ERROR 
  12896.         -  ERROR_INVALID_FUNCTION 
  12897.  
  12898.      SHC_SEEK 
  12899.  
  12900.       Possible Return Codes: 
  12901.  
  12902.         -  NO_ERROR 
  12903.         -  ERROR_INVALID_FUNCTION 
  12904.         -  ERROR_STREAM_NOT_SEEKABLE 
  12905.         -  ERROR_DATA_ITEM_NOT_SEEKABLE 
  12906.  
  12907.      SHC_START 
  12908.  
  12909.       Possible Return Codes: 
  12910.  
  12911.         -  NO_ERROR 
  12912.         -  ERROR_INVALID_FUNCTION 
  12913.         -  ERROR_INVALID_STREAM 
  12914.  
  12915.      SHC_STOP 
  12916.  
  12917.       Possible Return Codes: 
  12918.  
  12919.         -  NO_ERROR 
  12920.         -  ERROR_INVALID_FUNCTION 
  12921.         -  ERROR_INVALID_STREAM 
  12922.  
  12923.  Base Stream Protocol Control Blocks Supported 
  12924.  
  12925.  The Audio Stream Handler supports the following SPCBs: 
  12926.  
  12927.      DATATYPE_WAVEFORM 
  12928.  
  12929.       Subtypes: 
  12930.  
  12931.         -  WAVE_FORMAT_1M08 
  12932.         -  WAVE_FORMAT_1S08 
  12933.         -  WAVE_FORMAT_1M16 
  12934.         -  WAVE_FORMAT_1S16 
  12935.         -  WAVE_FORMAT_2M08 
  12936.         -  WAVE_FORMAT_2S08 
  12937.         -  WAVE_FORMAT_2M16 
  12938.         -  WAVE_FORMAT_2S16 
  12939.         -  WAVE_FORMAT_4M08 
  12940.         -  WAVE_FORMAT_4S08 
  12941.         -  WAVE_FORMAT_4M16 
  12942.         -  WAVE_FORMAT_4S16 
  12943.         -  WAVE_FORMAT_8M08 
  12944.         -  WAVE_FORMAT_8S08 
  12945.         -  WAVE_FORMAT_8M16 
  12946.         -  WAVE_FORMAT_8S16 
  12947.  
  12948.      DATATYPE_ALAW 
  12949.  
  12950.       Subtypes: 
  12951.  
  12952.         -  ALAW_8B8KM 
  12953.         -  ALAW_8B11KM 
  12954.         -  ALAW_8B22KM 
  12955.         -  ALAW_8B44KM 
  12956.         -  ALAW_8B8KS 
  12957.         -  ALAW_8B11KS 
  12958.         -  ALAW_8B22KS 
  12959.         -  ALAW_8B44KS 
  12960.  
  12961.      DATATYPE_MULAW 
  12962.  
  12963.       Subtypes: 
  12964.  
  12965.         -  MULAW_8B8KM 
  12966.         -  MULAW_8B11KM 
  12967.         -  MULAW_8B22KM 
  12968.         -  MULAW_8B44KM 
  12969.         -  MULAW_8B8KS 
  12970.         -  MULAW_8B11KS 
  12971.         -  MULAW_8B22KS 
  12972.         -  MULAW_8B44KS 
  12973.  
  12974.      DATATYPE_ADPCM_AVC 
  12975.  
  12976.       Subtypes: 
  12977.  
  12978.         -  ADPCM_AVC_VOICE 
  12979.         -  ADPCM_AVC_MUSIC 
  12980.         -  ADPCM_AVC_STEREO 
  12981.         -  ADPCM_AVC_HQ 
  12982.  
  12983.      DATATYPE_MIDI 
  12984.  
  12985.       Subtypes: 
  12986.  
  12987.         -  SUBTYPE_NONE 
  12988.  
  12989.      DATATYPE_SPV2 
  12990.  
  12991.       Subtypes: 
  12992.  
  12993.         -  SPV2_BPCM 
  12994.         -  SPV2_PCM 
  12995.         -  SPV2_NONE 
  12996.  
  12997.  Stream Handler Limits 
  12998.  
  12999.  The Audio Stream Handler is limited by system memory. 
  13000.  
  13001.  
  13002. ΓòÉΓòÉΓòÉ 9.2. MIDI Mapper Stream Handler ΓòÉΓòÉΓòÉ
  13003.  
  13004. The MIDI Mapper Stream Handler is used to map MIDI data. This stream handler 
  13005. does not interface with an audio device driver directly but is basically a 
  13006. "filter" stream handler that filters the MIDI data.  The Audio Stream Handler 
  13007. is used to interface to the audio device drivers. 
  13008.  
  13009. This module is implemented as an OS/2 DLL running at ring 3. 
  13010.  
  13011. Flushing a Filter Stream Group 
  13012.  
  13013. A filter stream group requires some extra steps to properly erase its contents. 
  13014. Stop flushes must be sent separately to each stream.  An example stream group 
  13015. of one master stream connected through a filter handler to a slave stream would 
  13016. need a stop flush sent first to the master stream.  When the master stop event 
  13017. is received, the second stop flush must then be sent to the slave stream. 
  13018. Refer to the SHC_STOP command message in the OS/2 Multimedia Programming 
  13019. Reference. 
  13020.  
  13021. Application and Media Driver Capabilities 
  13022.  
  13023. For optimum performance, each application and media driver should have the 
  13024. following capabilities: 
  13025.  
  13026.  SEEK                       Seeks the source stream and then the target 
  13027.                             streams.  (The stream time will not be correct if 
  13028.                             you use another other method.) 
  13029.  
  13030.  STOP DISCARD               Stops the target streams and waits for all stop 
  13031.                             events.  Next, it stops the source stream and waits 
  13032.                             for the event.  If a stream is at EOS, an error 
  13033.                             stream that is already stopped will be returned. 
  13034.                             Failure to wait for events on the source stream 
  13035.                             will deadlock. 
  13036.  
  13037.  STOP FLUSH                 Stops the source stream and waits for the stop 
  13038.                             event.  Next, it stops the target streams and waits 
  13039.                             for the stop events.  Failure to wait for events on 
  13040.                             the source stream will cause deadlock. 
  13041.  
  13042.  STOP PAUSE                 Always pauses all streams at the same time. 
  13043.                             Pausing one stream while leaving another running 
  13044.                             can cause deadlock. 
  13045.  
  13046.  START                      Starts the source stream and then starts the target 
  13047.                             streams.  Small MIDI files will produce a quick EOS 
  13048.                             on the source stream.  Do not attempt to START or 
  13049.                             START PREROLL a target stream without first 
  13050.                             starting the source stream.  An attempt to do this 
  13051.                             will deadlock. 
  13052.  
  13053.  START PREROLL              Starts (nonpreroll) the source stream and then 
  13054.                             starts preroll target streams.  If you attempt to 
  13055.                             START PREROLL all streams, you will deadlock. 
  13056.  
  13057.  DESTROY                    Destroys all streams at the same time.  Do not try 
  13058.                             to destroy one stream and then continue to use 
  13059.                             another stream. 
  13060.  
  13061.  CREATE and ASSOCIATE       All streams must be created and associated before 
  13062.                             any streams can accept commands.  Do not attempt to 
  13063.                             add another stream later on. 
  13064.  
  13065.  External Interface Description 
  13066.  
  13067.  The description for the MIDI Mapper Stream Handler external interface follows: 
  13068.  
  13069.  File Name               MISH.DLL 
  13070.  
  13071.  Handler Name            MISH 
  13072.  
  13073.  Handler Class           MIDISYS 
  13074.  
  13075.  PDD/DLL                 DLL 
  13076.  
  13077.  Source and Target       This stream handler is a filter.  Therefore, it is 
  13078.                          both a source and a target stream handler at the same 
  13079.                          time.  It consumes MIDI data from the source stream 
  13080.                          and produces mapped MIDI data that goes into the 
  13081.                          target stream or streams. The MIDI Mapper Stream 
  13082.                          Handler can have one source stream (the master 
  13083.                          stream). 
  13084.  
  13085.                          This stream handler does not generate or receive sync 
  13086.                          pulses, but it can be included in a sync group. In 
  13087.                          fact, MIDI mapping is done by grouping the input 
  13088.                          stream (master stream) with the output streams (slave 
  13089.                          streams) to create a sync group. A stream will be 
  13090.                          created for each output port. The MIDI sync group can 
  13091.                          be started, stopped, and seeked as a group by using 
  13092.                          the "slaves" flag with each of these calls. 
  13093.  
  13094.  Device Control Blocks 
  13095.  
  13096.  The MIDI Mapper Stream Handler does not support a device control block. 
  13097.  
  13098.  Associate Control Blocks 
  13099.  
  13100.  The MIDI Mapper Stream Handler supports the following associate control blocks 
  13101.  shown in the following figure. 
  13102.  
  13103.     /******************************************************
  13104.     * MISH - MIDI stream handler port-stream table ACB
  13105.     ******************************************************/
  13106.     #define ACBTYPE_MISH       0x0005L   /* MIDI port-stream table        */
  13107.     typedef struct _acb_MISH     /* acbmish - MIDI Assoc. Control Block   */
  13108.        {
  13109.        ULONG     ulACBLen;               /* Length of structure           */
  13110.        ULONG     ulObjType;              /* ACB_MISH                      */
  13111.        HSTREAM   hstreamDefault;         /* Default hstream to use when   */
  13112.                                          /*  mapper is turned off.        */
  13113.        ULONG     ulReserved1;
  13114.        ULONG     ulReserved2;
  13115.        ULONG     ulNumInStreams;
  13116.        HSTREAM   hstreamInMAX[_PORTS];   /* Array of Input streams        */
  13117.        ULONG     ulNumOutStreams;
  13118.        HSTREAM   hstreamOut[MAX_PORTS];  /* Array of Output streams       */
  13119.                                          /* The index into the array is   */
  13120.                                          /*  the source channel for that  */
  13121.                                          /*  stream.                      */
  13122.        } ACB_MISH;
  13123.  
  13124.  
  13125.    /******************************************************
  13126.     * MISH - MIDI stream handler SET ACB
  13127.     ******************************************************/
  13128.     #define ACBTYPE_SET       0x0006L    /* MIDI set function             */
  13129.     typedef struct _acb_set      /* acbset - Set Assoc. Control Block     */
  13130.        {
  13131.        ULONG     ulACBLen;               /* Length of structure           */
  13132.        ULONG     ulObjType;              /* ACB_SET                       */
  13133.        ULONG     ulFlag;                 /* Set flag                      */
  13134.        ULONG     ulTempo;                /* Not used.                     */
  13135.        } ACB_SET;
  13136.  
  13137.     /* ulFlag defines:   */
  13138.     #define MIDI_MAP_ON        0x0000L   /* turn mapping function on      */
  13139.     #define MIDI_MAP_OFF       0x0001L   /* turn mapping function off     */
  13140.  
  13141.  Implicit Events (EVENT_IMPLICIT_TYPE) Supported 
  13142.  
  13143.  The following implicit (EVENT_IMPLICIT_TYPE) events for the MIDI Mapper Stream 
  13144.  Handler are supported: 
  13145.  
  13146.      EVENT_ERROR 
  13147.  
  13148.       The ulStatus field will contain the error code.  The possible error codes 
  13149.       that can be generated and returned by this stream handler are: 
  13150.         -  ERROR_INVALID_BUFFER_RETURNED 
  13151.         -  ERROR_DEVICE_OVERRUN 
  13152.         -  ERROR_STREAM_STOP_PENDING 
  13153.  
  13154.  Explicit Events Supported 
  13155.  
  13156.  No explicit events are supported for the MIDI Mapper Stream Handler. 
  13157.  
  13158.  Stream Handler Commands Supported 
  13159.  
  13160.  The following stream handler commands (SHC) are supported.  Refer to the OS/2 
  13161.  Multimedia Programming Reference for a description of these SHC commands and 
  13162.  the error return codes. 
  13163.  
  13164.      SHC_ASSOCIATE 
  13165.  
  13166.       Possible Return Codes: 
  13167.  
  13168.         -  NO_ERROR 
  13169.         -  ERROR_INVALID_FUNCTION 
  13170.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13171.         -  ERROR_INVALID_OBJTYPE (only ACBTYPE_MMIO is supported) 
  13172.         -  ERROR_INVALID_BUFFER_SIZE (ulAcbLen is smaller than needed) 
  13173.         -  ERROR_STREAM_NOT_STOP (stream must be stopped to associate) 
  13174.  
  13175.      SHC_CLOSE 
  13176.  
  13177.       Possible Return Codes: 
  13178.  
  13179.         -  NO_ERROR 
  13180.         -  ERROR_INVALID_FUNCTION 
  13181.  
  13182.      SHC_CREATE 
  13183.  
  13184.       Possible Return Codes: 
  13185.  
  13186.         -  NO_ERROR 
  13187.         -  ERROR_INVALID_FUNCTION 
  13188.         -  ERROR_STREAM_CREATION 
  13189.         -  ERROR_INVALID_STREAM 
  13190.         -  ERROR_DEVICE_NOT_FOUND 
  13191.         -  ERROR_INVALID_BLOCK 
  13192.         -  ERROR_INVALID_SPCBKEY 
  13193.         -  ERROR_ALLOC_RESOURCES 
  13194.  
  13195.      SHC_DESTROY 
  13196.  
  13197.       Possible Return Codes: 
  13198.  
  13199.         -  NO_ERROR 
  13200.         -  ERROR_INVALID_FUNCTION 
  13201.         -  ERROR_INVALID_STREAM 
  13202.  
  13203.       Possible Return Codes: 
  13204.  
  13205.         -  NO_ERROR 
  13206.         -  ERROR_INVALID_FUNCTION 
  13207.  
  13208.      SHC_ENUMERATE_PROTOCOLS 
  13209.  
  13210.       Possible Return Codes: 
  13211.  
  13212.         -  NO_ERROR 
  13213.         -  ERROR_INVALID_FUNCTION 
  13214.         -  ERROR_INSUFF_BUFFER 
  13215.  
  13216.      SHC_GET_PROTOCOL 
  13217.  
  13218.       Possible Return Codes: 
  13219.  
  13220.         -  NO_ERROR 
  13221.         -  ERROR_INVALID_FUNCTION 
  13222.         -  ERROR_INVALID_SPCBKEY 
  13223.  
  13224.      SHC_INSTALL_PROTOCOL 
  13225.  
  13226.       Possible Return Codes: 
  13227.  
  13228.         -  NO_ERROR 
  13229.         -  ERROR_INVALID_FUNCTION 
  13230.         -  ERROR_INVALID_SPCBKEY 
  13231.         -  ERROR_ALLOC_RESOURCES 
  13232.  
  13233.      SHC_NEGOTIATE_RESULT 
  13234.  
  13235.       Possible Return Codes: 
  13236.  
  13237.         -  NO_ERROR 
  13238.         -  ERROR_INVALID_FUNCTION 
  13239.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13240.  
  13241.      SHC_SEEK 
  13242.  
  13243.       Possible Return Codes: 
  13244.  
  13245.         -  NO_ERROR 
  13246.         -  ERROR_INVALID_FUNCTION 
  13247.         -  ERROR_STREAM_NOT_SEEKABLE 
  13248.         -  ERROR_DATA_ITEM_NOT_SEEKABLE 
  13249.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  13250.         -  ERROR_NOT_SEEKABLE_BY_TIME 
  13251.         -  ERROR_STREAM_NOT_STOP 
  13252.  
  13253.      SHC_START 
  13254.  
  13255.       Possible Return Codes: 
  13256.  
  13257.         -  NO_ERROR 
  13258.         -  ERROR_INVALID_FUNCTION 
  13259.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  13260.         -  ERROR_DATA_ITEM_NOT_SPECIFIED (stream must be associated) 
  13261.  
  13262.      SHC_STOP 
  13263.  
  13264.       Possible Return Codes: 
  13265.  
  13266.         -  NO_ERROR 
  13267.         -  ERROR_INVALID_FUNCTION 
  13268.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  13269.         -  ERROR_STREAM_NOT_STARTED 
  13270.  
  13271.  Base Stream Protocol Control Blocks Supported 
  13272.  
  13273.  The MIDI Mapper Stream Handler supports the following stream protocol control 
  13274.  blocks (SPCBs). 
  13275.  
  13276.      DATATYPE_MIDI 
  13277.  
  13278.  Stream Handler Limits 
  13279.  
  13280.  Limited by system memory. 
  13281.  
  13282.  
  13283. ΓòÉΓòÉΓòÉ 9.3. File System Stream Handler ΓòÉΓòÉΓòÉ
  13284.  
  13285. The File System Stream Handler DLL transports data to or from file system 
  13286. devices (local or remote) on behalf of a real-time application.  This handler 
  13287. is unique in that it utilizes the MMIO subsystem to interface to a very wide 
  13288. variety of devices, such as hard disk drives, diskette drives, CD-ROM drives, 
  13289. WORM drives, and so forth.  These devices can be physically installed in the 
  13290. local system hardware, or they can be accessed across a LAN on a server 
  13291. machine. 
  13292.  
  13293. In a playback scenario (for example, waveform audio from a RIFF file), the File 
  13294. System Stream Handler uses MMIO to perform I/O on specified data files, and 
  13295. then performs stream processing to maintain a continuously available supply 
  13296. which is then streamed to a target stream handler; for example, the Waveform 
  13297. Audio Stream Handler.  This handler does not operate fully in a real-time mode, 
  13298. but it must support continuous data streaming.  It also does not support 
  13299. synchronization mastering, because the file system devices are not real-time 
  13300. devices. 
  13301.  
  13302. External Interface Description 
  13303.  
  13304. The description for the File System Stream Handler external interface follows: 
  13305.  
  13306.  File Name           FSSH.DLL 
  13307.  
  13308.  Handler Name        FSSH 
  13309.  
  13310.  Handler Class       FILESYS 
  13311.  
  13312.  PDD/DLL             DLL 
  13313.  
  13314.  Source              This stream handler can be the source in a stream. 
  13315.  
  13316.  Target              This stream handler can be the target in a stream. 
  13317.  
  13318.  Device Control Blocks 
  13319.  
  13320.  None. 
  13321.  
  13322.  Associate Control Blocks 
  13323.  
  13324.  This handler supports type ACBTYPE_MMIO associate control blocks. 
  13325.  
  13326.    /******************************************************
  13327.     * FSSH - File System Stream Handler MMIO Object ACB
  13328.     ******************************************************/
  13329.     #define ACBTYPE_MMIO      0x0001L       /* MMIO object             */
  13330.  
  13331.     typedef struct _acb_mmio                /* acbmmio  - MMIO ACB     */
  13332.        {
  13333.        ULONG   ulACBLen;                    /* Length of structure     */
  13334.        ULONG   ulObjType;                   /* ACB_MMIO                */
  13335.        HMMIO   hmmio;                       /* Handle of MMIO object   */
  13336.        } ACB_MMIO;
  13337.  
  13338.  Implicit (EVENT_IMPLICIT_TYPE) Events Supported 
  13339.  
  13340.  The following implicit (EVENT_IMPLICIT_TYPE) events for the File System Stream 
  13341.  Handler are supported: 
  13342.  
  13343.      EVENT_ERROR 
  13344.  
  13345.       The error type will be set in the ulFlag field of the event control 
  13346.       block.  The three types of errors that will be reported are: 
  13347.  
  13348.         -  Temporary Error - TEMPORARY_ERROR 0x0000L 
  13349.  
  13350.            An error occurred during streaming but the stream handler, the SSM, 
  13351.            or both the stream handler and the SSM were able to continue 
  13352.            streaming. 
  13353.  
  13354.         -  Recoverable Error - RECOVERABLE_ERROR 0x0001L 
  13355.  
  13356.            An error occurred that required the stream to be stopped.  The 
  13357.            application can restart the stream if appropriate. 
  13358.  
  13359.         -  NonRecoverable Error - NONRECOVERABLE_ERROR 0x0002L 
  13360.  
  13361.            A severe error occurred causing the stream handler to stop this 
  13362.            stream.  The stream cannot be restarted.  The application must issue 
  13363.            a call to SpiDestroyStream. 
  13364.  
  13365.       The ulStatus field will contain the error code.  No error codes are 
  13366.       generated and returned by this stream handler. 
  13367.  
  13368.       Also, errors from the following APIs can be returned: 
  13369.  
  13370.         -  DosGetInfoBlocks 
  13371.         -  SMHEntryPoint SMH_NOTIFY 
  13372.         -  mmioRead (If source, extended error code obtained by 
  13373.            mmioGetLastError) 
  13374.         -  mmioWrite (If target, extended error code obtained by 
  13375.            mmioGetLastError) 
  13376.  
  13377.      EVENT_PLAYLISTCUEPOINT 
  13378.  
  13379.       This will be generated only when this stream handler is a target and it 
  13380.       finds a cuepoint indicator in the buffer table from the Sync/Stream 
  13381.       Manager.  The event will be reported after the data has been written to 
  13382.       the file system using MMIO.  The ulMessageParm field of the PLAYL_EVCB 
  13383.       will be filled in with the message supplied in the playlist instruction. 
  13384.       The mmtimeStream field will not be filled in. 
  13385.  
  13386.  Explicit Events Supported 
  13387.  
  13388.  No explicit events are supported for the File System Stream Handler. 
  13389.  
  13390.  Stream Handler Commands Supported 
  13391.  
  13392.  The following stream handler commands (SHCs) are supported. Refer to the OS/2 
  13393.  Multimedia Programming Reference for a description of these SHC commands and 
  13394.  the error return codes. 
  13395.  
  13396.      SHC_ASSOCIATE 
  13397.  
  13398.       Note:  A stream requires a file to be opened and associated to the stream 
  13399.              before a stream can be started.  Reassociating a new object 
  13400.              without stopping the stream is not supported. 
  13401.  
  13402.       Possible return codes: 
  13403.  
  13404.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13405.         -  ERROR_INVALID_OBJTYPE (only ACBTYPE_MMIO is supported) 
  13406.         -  ERROR_INVALID_BUFFER_SIZE (ulAcbLen is smaller than needed) 
  13407.         -  ERROR_STREAM_NOT_STOP (stream must be stopped to associate) 
  13408.  
  13409.       Return codes from the following APIs are also returned: 
  13410.  
  13411.         -  DosRequestMutexSem 
  13412.  
  13413.      SHC_CREATE 
  13414.  
  13415.       Note:  If the spcbkey passed does not match any of the installed 
  13416.              protocols, the last installed stream protocol control block with 
  13417.              DATATYPE_GENERIC will be used. 
  13418.  
  13419.       Possible return codes: 
  13420.  
  13421.         -  ERROR_INVALID_SPCBKEY 
  13422.         -  ERROR_ALLOC_RESOURCES 
  13423.  
  13424.       Return codes from the following APIs are also returned: 
  13425.  
  13426.         -  DosRequestMutexSem 
  13427.         -  DosCreateThread 
  13428.  
  13429.      SHC_DESTROY 
  13430.  
  13431.       Possible return codes: 
  13432.  
  13433.         -  ERROR_INVALID_STREAM (invalid hstream or both hstream and hid 
  13434.            passed) 
  13435.  
  13436.       Return codes from the following APIs are also returned: 
  13437.  
  13438.         -  DosRequestMutexSem 
  13439.  
  13440.      SHC_START 
  13441.  
  13442.       Possible return codes: 
  13443.  
  13444.         -  ERROR_INVALID_STREAM (invalid hstream or both hstream and hid 
  13445.            passed) 
  13446.         -  ERROR_DATA_ITEM_NOT_SPECIFIED (stream must be associated before it 
  13447.            is started). 
  13448.  
  13449.       Return codes from the following APIs are also returned: 
  13450.  
  13451.         -  DosRequestMutexSem 
  13452.  
  13453.      SHC_STOP 
  13454.  
  13455.       Possible return codes: 
  13456.  
  13457.         -  ERROR_INVALID_STREAM (invalid hstream or both hstream and hid 
  13458.            passed) 
  13459.         -  ERROR_STREAM_NOT_STARTED 
  13460.  
  13461.       Return codes from the following APIs are also returned: 
  13462.  
  13463.         -  DosRequestMutexSem 
  13464.         -  DosResumeThread 
  13465.         -  DosSuspendThread 
  13466.  
  13467.      SHC_SEEK 
  13468.  
  13469.       Note:  If you are adding support in the system for a new nonlinear data 
  13470.              type, you can write a MMIO IOProc to support the MMIOM_SEEKBYTIME 
  13471.              message.  This message will be sent (mmioSendMessage) when the 
  13472.              File System Stream Handler gets a seek by time (for information on 
  13473.              the SpiSeekStream SPI_SEEKMMTIME parameter, refer to the OS/2 
  13474.              Multimedia Programming Reference.) and the SPCB indicates this is 
  13475.              a nonlinear data type by having a 0 in the spcb.ulBytesPerUnit 
  13476.              field, the spcb.mmtimePerUnit fields, or both fields. 
  13477.  
  13478.       Possible return codes: 
  13479.  
  13480.         -  ERROR_INVALID_STREAM (invalid hstream or both hstream and hid 
  13481.            passed) 
  13482.         -  ERROR_NOT_SEEKABLE_BY_TIME 
  13483.         -  ERROR_DATA_ITEM_NOT_SEEKABLE 
  13484.         -  ERROR_DATA_ITEM_NOT_SPECIFIED 
  13485.         -  ERROR_STREAM_NOT_STOP 
  13486.  
  13487.       Return codes from the following APIs are also returned: 
  13488.  
  13489.         -  DosRequestMutexSem 
  13490.         -  mmioSeek (the extended error code from mmioGetLastError) 
  13491.         -  mmioSendMessage - MMIOM_SEEKBYTIME (the extended error code from 
  13492.            mmioGetLastError) 
  13493.  
  13494.      SHC_GET_PROTOCOL 
  13495.  
  13496.       Possible return codes: 
  13497.  
  13498.         -  ERROR_INVALID_SPCBKEY 
  13499.  
  13500.       Return codes from the following APIs are also returned: 
  13501.  
  13502.         -  DosRequestMutexSem 
  13503.  
  13504.      SHC_INSTALL_PROTOCOL 
  13505.  
  13506.       Note:  This stream handler allows any data type and subtype to be 
  13507.              installed. 
  13508.  
  13509.       Possible return codes: 
  13510.  
  13511.         -  ERROR_INVALID_SPCBKEY 
  13512.         -  ERROR_ALLOC_RESOURCES 
  13513.  
  13514.       Return codes from the following APIs are also returned: 
  13515.  
  13516.         -  DosRequestMutexSem 
  13517.  
  13518.      SHC_ENUMERATE_PROTOCOLS 
  13519.  
  13520.       Possible return codes: 
  13521.  
  13522.         -  ERROR_INSUFF_BUFFER 
  13523.  
  13524.       Return codes from the following APIs are also returned: 
  13525.  
  13526.         -  DosRequestMutexSem 
  13527.  
  13528.      SHC_NEGOTIATE_RESULT 
  13529.  
  13530.       Possible return codes: 
  13531.  
  13532.         -  ERROR_INVALID_STREAM (invalid hstream or both hstream and hid 
  13533.            passed) 
  13534.         -  ERROR_INVALID_FUNCTION (must only be called directly after create) 
  13535.  
  13536.       Return codes from the following APIs are also returned: 
  13537.  
  13538.         -  DosRequestMutexSem 
  13539.  
  13540.  Base Stream Protocol Control Blocks Data Types Supported 
  13541.  
  13542.  The File System Stream Handler has only 1 base SPCB.  It is DATATYPE_GENERIC. 
  13543.  When a stream is created with a SPCBKEY that is not installed, this stream 
  13544.  handler copies over the last installed SPCB of type DATATYPE_GENERIC and uses 
  13545.  it.  The data type, subtype and intkey passed are used in place of the generic 
  13546.  values for these fields.  The base generic SPCB has: 
  13547.  
  13548.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13549.   ΓöéSPCB Field     ΓöéDATATYPE_GENERIC Values                      Γöé
  13550.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13551.   ΓöéulBufSize      Γöé16KB                                         Γöé
  13552.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13553.   ΓöéulMinBuf       Γöé2                                            Γöé
  13554.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13555.   ΓöéulMaxBuf       Γöé5                                            Γöé
  13556.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13557.   ΓöéulSrcStart     Γöé1                                            Γöé
  13558.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13559.   ΓöéulTgtStart     Γöé1                                            Γöé
  13560.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13561.   ΓöéulBufFlag      ΓöéSPCBBUF_NONCONTIGUOUS                        Γöé
  13562.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13563.   ΓöéulHandFlag     ΓöéSPCBHAND_NOSYNC | SPCB_PHYS_SEEK             Γöé
  13564.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  13565.  
  13566.  Stream Handler Limits 
  13567.  
  13568.  Maximum number of streams (only limited by available memory). 
  13569.  
  13570.  
  13571. ΓòÉΓòÉΓòÉ 9.4. Memory Stream Handler ΓòÉΓòÉΓòÉ
  13572.  
  13573. There are many multimedia application scenarios where data streaming might be 
  13574. performed to or from system memory.  For example, an application can create a 
  13575. waveform data object dynamically, allocating application data buffers in which 
  13576. to store the waveform data.  This data is not read from a device but is 
  13577. generated by an application algorithm.  This waveform data can then be streamed 
  13578. to the Waveform Audio Stream Handler (target). 
  13579.  
  13580. Another example where system memory is used for streaming is when the 
  13581. application must process or convert data read from a file before it can be used 
  13582. as the source of a stream.  There can be some cases where application-unique 
  13583. data compression is used.  In these cases, the application can stream data from 
  13584. a "flat file" into an application buffer. Then, after decompression (or other 
  13585. operation) this data in system memory can be streamed using the Memory Stream 
  13586. Handler as the source, perhaps sending the data to the Waveform Audio Stream 
  13587. Handler. 
  13588.  
  13589. The Memory Stream Handler does not support synchronization. 
  13590.  
  13591. Memory playlists are used to specify the memory addresses to play from or 
  13592. record into. 
  13593.  
  13594. External Interface Description 
  13595.  
  13596. The description for the Memory Stream Handler external interface follows: 
  13597.  
  13598.  File Name           MEMSH.DLL 
  13599.  
  13600.  Handler Name        MEMSH 
  13601.  
  13602.  Handler Class       MEMSYS 
  13603.  
  13604.  PDD/DLL             DLL 
  13605.  
  13606.  Source              This stream handler can be the source in a stream. 
  13607.  
  13608.  Target              This stream handler can be the target in a stream. 
  13609.  
  13610.  Device Control Blocks 
  13611.  
  13612.  None. 
  13613.  
  13614.  Associate Control Blocks 
  13615.  
  13616.  This handler supports type ACBTYPE_MEM_PLAYL associate control blocks. 
  13617.  
  13618.  
  13619.   /******************************************************
  13620.    * MEMSH - Memory Stream Handler Playlist Object ACB
  13621.    ******************************************************/
  13622.   #define ACBTYPE_MEM_PLAYL     0x0003L  /* Memory playlist object     */
  13623.  
  13624.   typedef struct _acb_mem_playl
  13625.      {
  13626.      ULONG   ulACBLen;              /* Length of structure             */
  13627.      ULONG   ulObjType;             /* ACBTYPE_MEM_PLAYL               */
  13628.      PVOID   pMemoryAddr;           /* Starting address of playlist    */
  13629.      } ACB_MEM_PLAYL;
  13630.  
  13631.  Implicit (EVENT_IMPLICIT_TYPE) Events Supported 
  13632.  
  13633.  The following implicit (EVENT_IMPLICIT_TYPE) events for the Memory Stream 
  13634.  Handler are supported: 
  13635.  
  13636.      EVENT_ERROR 
  13637.  
  13638.       The error type will be set in the ulFlag field of the event implicit 
  13639.       control block (EVCB).  These error types and the flag values are 
  13640.       described in the file system stream handler section. 
  13641.  
  13642.       The ulStatus field will contain the error code.  The possible error codes 
  13643.       that can be generated and returned by this stream handler are: 
  13644.  
  13645.         -  ERROR_PLAYLIST_STACK_OVERFLOW (too many CALL instructions 
  13646.            encountered.  The maximum CALL depth is 20 calls.) 
  13647.         -  ERROR_PLAYLIST_STACK_UNDERFLOW (too many RETURN instructions 
  13648.            encountered.  There should be exactly one RETURN instruction 
  13649.            executed for each CALL instruction.) 
  13650.         -  ERROR_INVALID_FUNCTION (invalid playlist opcode encountered.) 
  13651.         -  ERROR_INVALID_BLOCK (playlist is not read/write accessible or data 
  13652.            is not read (play) or write (record) accessible.) 
  13653.         -  ERROR_END_OF_PLAYLIST (when recording into a playlist, the EXIT 
  13654.            opcode was encountered before EOS.  The stream handler stops). 
  13655.  
  13656.       Also, errors from the following APIs can be returned: 
  13657.  
  13658.         -  DosGetInfoBlocks 
  13659.         -  DosQueryMem 
  13660.         -  SMHEntryPoint SMH_NOTIFY (GiveBuf function for Play) 
  13661.         -  SMHEntryPoint SMH_NOTIFY (GetFull, ReturnEmpty for Record) 
  13662.         -  SMHEntryPoint SMH_REPORTEVENT 
  13663.  
  13664.      EVENT_PLAYLISTCUEPOINT 
  13665.  
  13666.       The Memory Stream Handler does not receive playlist cuepoint indicators 
  13667.       within the stream.  This handler will place a cuepoint indicator into a 
  13668.       stream when it interprets a CUEPOINT playlist operation.  Therefore this 
  13669.       stream handler does not generate the EVENT_PLAYLISTCUEPOINT, but it 
  13670.       enables it in the stream for the target stream handler.  Check the 
  13671.       description of the target stream handler to determine if it supports this 
  13672.       EVENT_PLAYLISTCUEPOINT. 
  13673.  
  13674.      EVENT_PLAYLISTMESSAGE 
  13675.  
  13676.       This is generated when a MESSAGE instruction is encountered.  The 
  13677.       ulMessageParm field of the PLAYL_EVCB will be filled in with the message 
  13678.       supplied in the message parameter (operand2) of the playlist MESSAGE 
  13679.       instruction.  The ulStatus field contains the playlist instruction 
  13680.       number. 
  13681.  
  13682.  Explicit Events Supported 
  13683.  
  13684.  No explicit events are supported for the Memory Stream Handler. 
  13685.  
  13686.  Stream Handler Commands Supported 
  13687.  
  13688.  The following stream handler commands (SHC) are supported.  Refer to the OS/2 
  13689.  Multimedia Programming Reference for a description of these SHC commands and 
  13690.  the error return codes. 
  13691.  
  13692.      SHC_ASSOCIATE 
  13693.  
  13694.       Note:  A stream requires a file to be opened and associated to the stream 
  13695.              before a stream can be started.  Reassociating a new object 
  13696.              without stopping the stream is not supported. 
  13697.  
  13698.       Possible return codes: 
  13699.  
  13700.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  13701.         -  ERROR_INVALID_OBJTYPE (only ACBTYPE_MEM_PLAYL is supported) 
  13702.         -  ERROR_INVALID_BUFFER_SIZE (ulAcbLen is smaller than needed) 
  13703.         -  ERROR_STREAM_NOT_STOP (stream must be stopped to associate) 
  13704.         -  ERROR_INVALID_BLOCK (invalid memory address - not read/write 
  13705.            accessible) 
  13706.  
  13707.       Return codes from the following APIs are also returned: 
  13708.  
  13709.         -  DosRequestMutexSem 
  13710.         -  DosQueryMem 
  13711.  
  13712.      SHC_CREATE 
  13713.  
  13714.       Note:  If the SPCBKEY passed does not match any of the installed 
  13715.              protocols, the last installed SPCB with DATATYPE_GENERIC will be 
  13716.              used.  If the MEMSH is the source, create will always set the 
  13717.              SPCBBUF_USERPROVIDED flag in the spcb.ulBufFlag field. 
  13718.  
  13719.       Possible return codes: 
  13720.  
  13721.         -  ERROR_INVALID_SPCBKEY 
  13722.         -  ERROR_ALLOC_RESOURCES 
  13723.  
  13724.       Return codes from the following APIs are also returned: 
  13725.  
  13726.         -  DosRequestMutexSem 
  13727.         -  DosCreateThread 
  13728.  
  13729.      SHC_DESTROY 
  13730.  
  13731.       Possible return codes: 
  13732.  
  13733.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  13734.  
  13735.       Return codes from the following APIs are also returned: 
  13736.  
  13737.         -  DosRequestMutexSem 
  13738.  
  13739.      SHC_START 
  13740.  
  13741.       Possible return codes: 
  13742.  
  13743.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13744.         -  ERROR_DATA_ITEM_NOT_SPECIFIED (stream must be associated before it 
  13745.            is started). 
  13746.  
  13747.       Return codes from the following APIs are also returned: 
  13748.  
  13749.         -  DosRequestMutexSem 
  13750.  
  13751.      SHC_STOP 
  13752.  
  13753.       Possible return codes: 
  13754.  
  13755.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13756.         -  ERROR_STREAM_NOT_STARTED 
  13757.  
  13758.       Return codes from the following APIs are also returned: 
  13759.  
  13760.         -  DosRequestMutexSem 
  13761.         -  DosResumeThread 
  13762.         -  DosSuspendThread 
  13763.  
  13764.      SHC_SEEK 
  13765.  
  13766.       Note:  Seeking backward is not supported.  SEEK_END is only supported if 
  13767.              the lSeekPoint is 0.  A playlist seek is accomplished by going 
  13768.              back to the beginning of the playlist and executing each 
  13769.              instruction without playing the data, but counting the time it 
  13770.              takes.  The Seek operates on the current playlist, that means that 
  13771.              if the playlist was modified by the application the Seek uses the 
  13772.              modified playlist to calculate the seek position.  When a seek 
  13773.              absolute is performed all LOOP iterations are reset to 0 before 
  13774.              the Seek starts calculating the position. 
  13775.  
  13776.       Possible return codes: 
  13777.  
  13778.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13779.         -  ERROR_NOT_SEEKABLE_BY_TIME 
  13780.         -  ERROR_DATA_ITEM_NOT_SEEKABLE 
  13781.         -  ERROR_STREAM_NOT_STOP 
  13782.         -  ERROR_SEEK_BACK_NOT_SUPPORTED 
  13783.         -  ERROR_SEEK_PAST_END 
  13784.         -  ERROR_INVALID_BLOCK 
  13785.         -  ERROR_PLAYLIST_STACK_OVERFLOW 
  13786.         -  ERROR_PLAYLIST_STACK_UNDERFLOW 
  13787.         -  ERROR_INVALID_FUNCTION 
  13788.         -  ERROR_DATA_ITEM_NOT_SPECIFIED 
  13789.  
  13790.       Return codes from the following APIs are also returned: 
  13791.  
  13792.         -  DosRequestMutexSem 
  13793.         -  DosQueryMem 
  13794.  
  13795.      SHC_GET_PROTOCOL 
  13796.  
  13797.       Possible return codes: 
  13798.  
  13799.         -  ERROR_INVALID_SPCBKEY 
  13800.  
  13801.       Return codes from the following APIs are also returned: 
  13802.  
  13803.         -  DosRequestMutexSem 
  13804.  
  13805.      SHC_INSTALL_PROTOCOL 
  13806.  
  13807.       Note:  This stream handler allows any data type and subtype to be 
  13808.              installed. 
  13809.  
  13810.       Possible return codes: 
  13811.  
  13812.         -  ERROR_INVALID_SPCBKEY 
  13813.         -  ERROR_ALLOC_RESOURCES 
  13814.  
  13815.       Return codes from the following APIs are also returned: 
  13816.  
  13817.         -  DosRequestMutexSem 
  13818.  
  13819.      SHC_ENUMERATE_PROTOCOLS 
  13820.  
  13821.       Possible return codes: 
  13822.  
  13823.         -  ERROR_INSUFF_BUFFER 
  13824.  
  13825.       Return codes from the following APIs are also returned: 
  13826.  
  13827.         -  DosRequestMutexSem 
  13828.  
  13829.      SHC_NEGOTIATE_RESULT 
  13830.  
  13831.       Possible return codes: 
  13832.  
  13833.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13834.         -  ERROR_INVALID_FUNCTION (must only be called directly after create) 
  13835.  
  13836.       Return codes from the following APIs are also returned: 
  13837.  
  13838.         -  DosRequestMutexSem 
  13839.  
  13840.  Base Stream Protocol Control Block Data Types Supported 
  13841.  
  13842.  The Memory Stream Handler has only 1 base stream protocol control block 
  13843.  (SPCB).  It is DATATYPE_GENERIC.  When a stream is created with a SPCBKEY that 
  13844.  is not one installed, this stream handler copies over the last installed SPCB 
  13845.  of type DATATYPE_GENERIC and uses it.  The data type, subtype and intkey 
  13846.  passed are used in place of the generic values for these fields.  The base 
  13847.  generic SPCB has: 
  13848.  
  13849.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13850.   ΓöéSPCB Field     ΓöéDATATYPE_GENERIC Values                      Γöé
  13851.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13852.   ΓöéulBufSize      Γöé16KB                                         Γöé
  13853.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13854.   ΓöéulMinBuf       Γöé3                                            Γöé
  13855.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13856.   ΓöéulMaxBuf       Γöé10                                           Γöé
  13857.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13858.   ΓöéulSrcStart     Γöé1                                            Γöé
  13859.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13860.   ΓöéulTgtStart     Γöé1                                            Γöé
  13861.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13862.   ΓöéulBufFlag      ΓöéSPCBBUF_NONCONTIGUOUS                        Γöé
  13863.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13864.   ΓöéulHandFlag     ΓöéSPCBHAND_NOSYNC | SPCBHAND_PHYS_SEEK         Γöé
  13865.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  13866.  
  13867.  Stream Handler Limits 
  13868.  
  13869.  Maximum number of streams (only limited by available memory). 
  13870.  
  13871.  
  13872. ΓòÉΓòÉΓòÉ 9.5. Compact Disc-Digital Audio Stream Handler ΓòÉΓòÉΓòÉ
  13873.  
  13874. Many CDs have CD-DA ("Redbook audio") tracks that contain digital audio.  These 
  13875. audio tracks can be played using the built-in DAC or the data can be read into 
  13876. the system and streamed to an adapter with DAC hardware KB (for example, ACPA 
  13877. card).  For the latter case, the CD-DA Stream Handler DLL is required and acts 
  13878. as the source stream handler. 
  13879.  
  13880. This handler does not operate fully in a real-time mode, but it must support 
  13881. continuous data streaming.  It also does not support synchronization mastering, 
  13882. because of the lack of real-time nature of CD devices. 
  13883.  
  13884. This handler operates on the specific CD addresses.  Most CD-DA do not have 
  13885. data in approximately the first 2 seconds of the CD, but some discs do.  CD-DA 
  13886. tracks can also be placed between other data tracks on mixed-mode disks. 
  13887. Because of this operation, the CD-DA Stream Handler will interpret the absolute 
  13888. beginning of the disc as MMTIME 0.  The calling program must query the disc and 
  13889. find where the desired CD-DA track begins and call SpiSeekStream before 
  13890. starting the stream.  The CD Audio media control interface driver does this 
  13891. operation for the applications coding to the media control interface. 
  13892.  
  13893. External Interface Description 
  13894.  
  13895. The description for the Compact Disc-Digital Audio Stream Handler external 
  13896. interface follows: 
  13897.  
  13898.  File Name           CDDASH.DLL 
  13899.  
  13900.  Handler Name        CDDASH 
  13901.  
  13902.  Handler Class       FILESYS 
  13903.  
  13904.  PDD/DLL             DLL 
  13905.  
  13906.  Source              This stream handler can be the source in a stream. 
  13907.  
  13908.  Target              This stream handler cannot be the target in a stream. 
  13909.  
  13910.  Device Control Blocks 
  13911.  
  13912.  None. 
  13913.  
  13914.  Associate Control Blocks 
  13915.  
  13916.  This handler supports type ACBTYPE_CDDA associate control blocks. 
  13917.  
  13918.    /******************************************************
  13919.     * CDDASH - CD DA Stream Handler Object ACB
  13920.     ******************************************************/
  13921.     #define ACBTYPE_CDDA        0x0004L   /* Compact disc - digital audio */
  13922.     typedef struct _acb_CDDA        /* acbcdda - CD Assoc. Control Block  */
  13923.        {
  13924.        ULONG   ulACBLen;              /* Length of structure     */
  13925.        ULONG   ulObjType;             /* ACB_CDDA                */
  13926.        CHAR    bCDDrive;              /* CD drive letter         */
  13927.        } ACB_CDDA;
  13928.  
  13929.  Implicit (EVENT_IMPLICIT_TYPE) Events Supported 
  13930.  
  13931.  The following implicit (EVENT_IMPLICIT_TYPE) events for the Compact 
  13932.  Disc-Digital Audio Stream Handler are supported: 
  13933.  
  13934.      EVENT_ERROR 
  13935.  
  13936.       The error type will be set in the ulFlag field of the event implicit 
  13937.       control block (EVCB). The three types of errors that will be reported 
  13938.       are: 
  13939.  
  13940.         -  Temporary Error (TEMPORARY_ERROR 0x0000L) 
  13941.  
  13942.            An error occurred during streaming but the stream handler, the 
  13943.            Sync/Stream Manager or both the stream handler and the Sync/Stream 
  13944.            Manager were able to continue streaming. 
  13945.  
  13946.         -  Recoverable Error (RECOVERABLE_ERROR 0x0001L) 
  13947.  
  13948.            An error occurred that required the stream to be stopped.  The 
  13949.            application can restart the stream if appropriate. 
  13950.  
  13951.         -  NonRecoverable Error (NONRECOVERABLE_ERROR 0x0002L) 
  13952.  
  13953.            A severe error occurred causing the stream handler to stop this 
  13954.            stream.  The stream can not be restarted.  The application must 
  13955.            issue an SpiDestroyStream. 
  13956.  
  13957.       The ulStatus field will contain the error code.  The possible error codes 
  13958.       that can be generated and returned by this stream handler are: 
  13959.  
  13960.         -  None 
  13961.  
  13962.       Also, errors from the following APIs can be returned: 
  13963.  
  13964.         -  DosGetInfoBlocks 
  13965.         -  SMHEntryPoint SMH_NOTIFY 
  13966.         -  DosDevIOCtl (from ReadLong command to CD device driver). 
  13967.  
  13968.  Explicit Events Supported 
  13969.  
  13970.  No explicit events are supported for the Compact Disc-Digital Audio Stream 
  13971.  Handler. 
  13972.  
  13973.  Stream Handler Commands Supported 
  13974.  
  13975.  The following stream handler commands (SHC) are supported.  Refer to the OS/2 
  13976.  Multimedia Programming Reference for a description of these SHC commands and 
  13977.  the error return codes. 
  13978.  
  13979.      SHC_ASSOCIATE 
  13980.  
  13981.       Note:  A stream requires a file to be opened and associated to the stream 
  13982.              before a stream can be started.  Reassociating a new drive letter 
  13983.              without stopping the stream is not supported. 
  13984.  
  13985.       Possible return codes: 
  13986.  
  13987.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  13988.         -  ERROR_INVALID_OBJTYPE (only ACBTYPE_CDDA is supported) 
  13989.         -  ERROR_INVALID_BUFFER_SIZE (ulAcbLen is smaller than needed) 
  13990.         -  ERROR_STREAM_NOT_STOP (stream must be stopped to associate) 
  13991.  
  13992.       Return codes from the following APIs are also returned: 
  13993.  
  13994.         -  DosRequestMutexSem 
  13995.         -  DosOpen (for CD device). 
  13996.  
  13997.      SHC_CREATE 
  13998.  
  13999.       Note:  The only data type supported is 16-bit PCM Stereo sampled at 44.1 
  14000.              kHz. 
  14001.  
  14002.       Possible return codes: 
  14003.  
  14004.         -  ERROR_INVALID_SPCBKEY 
  14005.         -  ERROR_ALLOC_RESOURCES 
  14006.  
  14007.       Return codes from the following APIs are also returned: 
  14008.  
  14009.         -  DosRequestMutexSem 
  14010.         -  DosCreateThread 
  14011.  
  14012.      SHC_DESTROY 
  14013.  
  14014.       Possible return codes: 
  14015.  
  14016.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  14017.  
  14018.       Return codes from the following APIs are also returned: 
  14019.  
  14020.         -  DosRequestMutexSem 
  14021.  
  14022.      SHC_START 
  14023.  
  14024.       Possible return codes: 
  14025.  
  14026.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  14027.         -  ERROR_DATA_ITEM_NOT_SPECIFIED (stream must be associated before it 
  14028.            is started). 
  14029.  
  14030.       Return codes from the following APIs are also returned: 
  14031.  
  14032.         -  DosRequestMutexSem 
  14033.  
  14034.      SHC_STOP 
  14035.  
  14036.       Possible return codes: 
  14037.  
  14038.         -  ERROR_INVALID_STREAM (invalid hstream or hstream and hid passed) 
  14039.         -  ERROR_STREAM_NOT_STARTED 
  14040.  
  14041.       Return codes from the following APIs are also returned: 
  14042.  
  14043.         -  DosRequestMutexSem 
  14044.         -  DosResumeThread 
  14045.         -  DosSuspendThread 
  14046.  
  14047.      SHC_SEEK 
  14048.  
  14049.       Note:  Keep in mind that SEEK will go to the specified address in 
  14050.              absolute terms.  The absolute address from the beginning of the 
  14051.              disc might not be the beginning of the CD-DA music. 
  14052.  
  14053.       Also the seekpoint is granular to the mmtimePerUnit specified in the 
  14054.       SPCB. 
  14055.  
  14056.       Possible return codes: 
  14057.  
  14058.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  14059.         -  ERROR_DATA_ITEM_NOT_SEEKABLE 
  14060.         -  ERROR_DATA_ITEM_NOT_SPECIFIED 
  14061.         -  ERROR_STREAM_NOT_STOP 
  14062.  
  14063.  
  14064.         -  ERROR_SEEK_PAST_END 
  14065.         -  ERROR_SEEK_BEFORE_BEGINNING 
  14066.  
  14067.       Return codes from the following APIs are also returned: 
  14068.  
  14069.         -  DosRequestMutexSem 
  14070.         -  DosDevIOCtl (DiskInfo command for Seek_End) 
  14071.         -  DosDevIOCtl (Seek command) 
  14072.  
  14073.      SHC_GET_PROTOCOL 
  14074.  
  14075.       Possible return codes: 
  14076.  
  14077.         -  ERROR_INVALID_SPCBKEY 
  14078.  
  14079.       Return codes from the following APIs are also returned: 
  14080.  
  14081.         -  DosRequestMutexSem 
  14082.  
  14083.      SHC_INSTALL_PROTOCOL 
  14084.  
  14085.       Note:  This stream handler allows any data type and subtype to be 
  14086.              installed. 
  14087.  
  14088.       Possible return codes: 
  14089.  
  14090.         -  ERROR_INVALID_SPCBKEY 
  14091.         -  ERROR_ALLOC_RESOURCES 
  14092.  
  14093.       Return codes from the following APIs are also returned: 
  14094.  
  14095.         -  DosRequestMutexSem 
  14096.  
  14097.      SHC_ENUMERATE_PROTOCOLS 
  14098.  
  14099.       Possible return codes: 
  14100.  
  14101.         -  ERROR_INSUFF_BUFFER 
  14102.  
  14103.       Return codes from the following APIs are also returned: 
  14104.  
  14105.         -  DosRequestMutexSem 
  14106.  
  14107.      SHC_NEGOTIATE_RESULT 
  14108.  
  14109.       Possible return codes: 
  14110.  
  14111.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  14112.         -  ERROR_INVALID_FUNCTION (must only be called directly after create). 
  14113.  
  14114.       Return codes from the following APIs are also returned: 
  14115.  
  14116.         -  DosRequestMutexSem 
  14117.  
  14118.  Base Stream Protocol Control Block Data Types Supported 
  14119.  
  14120.  The Compact Disc-Digital Audio Stream Handler has only 1 base SPCB.  It is 
  14121.  DATATYPE_WAVEFORM with DataSubType WAVE_FORMAT_4S16.  This SPCB has the 
  14122.  following defaults: 
  14123.  
  14124.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14125.   ΓöéSPCB Field          ΓöéDATATYPE_WAVEFORM Values                Γöé
  14126.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14127.   ΓöéulBufSize           Γöé48KB                                    Γöé
  14128.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14129.   ΓöéulMinBuf            Γöé8                                       Γöé
  14130.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14131.   ΓöéulMaxBuf            Γöé12                                      Γöé
  14132.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14133.   ΓöéulSrcStart          Γöé1                                       Γöé
  14134.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14135.   ΓöéulTgtStart          Γöé7                                       Γöé
  14136.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14137.   ΓöéulBufFlag           ΓöéSPCBBUF_FIXEDBUF                        Γöé
  14138.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14139.   ΓöéulHandFlag          ΓöéSPCBHAND_NOSYNC | SPCBHAND_PHYS_SEEK    Γöé
  14140.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14141.   ΓöéulBytesPerUnit      Γöé588                                     Γöé
  14142.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14143.   ΓöémmtimePerUnit       Γöé10                                      Γöé
  14144.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14145.  
  14146.  Stream Handler Limits 
  14147.  
  14148.  Maximum number of streams (only limited by available memory). 
  14149.  
  14150.  
  14151. ΓòÉΓòÉΓòÉ 9.6. CD-ROM XA Stream Handler ΓòÉΓòÉΓòÉ
  14152.  
  14153. The CD-ROM XA Stream Handler is used to stream interleaved data to multiple 
  14154. streams and therefore multiple target devices.  This is required to play 
  14155. multiple streams from a CD-ROM XA.  For example, a CD-ROM XA file could have 
  14156. one channel of audio and one channel of video that need to be streamed at the 
  14157. same time.  Because the audio and video are interleaved in the same file the 
  14158. CD-ROM XA Stream Handler can take these individual channels from the file and 
  14159. pass them to the Sync/Stream Manager as independent streams. 
  14160.  
  14161. External Interface Description 
  14162.  
  14163. The description for the CD-ROM XA Stream Handler external interface follows: 
  14164.  
  14165.  File Name           SSSH.DLL 
  14166.  
  14167.  Handler Name        SSSH 
  14168.  
  14169.  Handler Class       FILESYS 
  14170.  
  14171.  PDD/DLL             DLL 
  14172.  
  14173.  Source              This stream handler can be the source in a stream. 
  14174.  
  14175.  Target              This stream handler cannot be the target in a stream. 
  14176.  
  14177.  Device Control Blocks 
  14178.  
  14179.  This handler requires the standard DCB structure on the SHC_CREATE function. 
  14180.  The szDevName must have the drive letter of the CD-ROM XA drive. 
  14181.  
  14182.     typedef struct _dcb              /* dcb  -  Device Control Block   */
  14183.        {
  14184.        ULONG   ulDCBLen;                   /* Length of structure  */
  14185.        SZ      szDevName[MAX_SPI_NAME];    /* Device driver name   */
  14186.        } DCB;
  14187.  
  14188.  Associate Control Blocks 
  14189.  
  14190.  None. 
  14191.  
  14192.  Implicit (EVENT_IMPLICIT_TYPE) Events Supported 
  14193.  
  14194.  The following implicit (EVENT_IMPLICIT_TYPE) events for the CD-ROM XA Stream 
  14195.  Handler are supported: 
  14196.  
  14197.      EVENT_ERROR 
  14198.  
  14199.       The error type will be set in the ulFlag field of the event implicit 
  14200.       control block (EVCB). The three types of errors that will be reported 
  14201.       are: 
  14202.  
  14203.         -  Temporary Error (TEMPOARY_ERROR 0x0000L) 
  14204.  
  14205.            An error occurred during streaming but the stream handler, the 
  14206.            Sync/Stream Manager or both the stream handler and the Sync/Stream 
  14207.            Manager were able to continue streaming. 
  14208.  
  14209.         -  Recoverable Error (RECOVERABLE_ERROR 0x0001L) 
  14210.  
  14211.            An error occurred that required the stream to be stopped.  The 
  14212.            application can restart the stream if appropriate. 
  14213.  
  14214.         -  NonRecoverable Error (NONRECOVERABLE_ERROR 0x0002L) 
  14215.  
  14216.            A severe error occurred causing the stream handler to stop this 
  14217.            stream.  The stream cannot be restarted.  The application must issue 
  14218.            an SpiDestroyStream. 
  14219.  
  14220.       The ulStatus field will contain the error code.  The possible error codes 
  14221.       that can be generated and returned by this stream handler are: 
  14222.  
  14223.         -  None 
  14224.  
  14225.       Also, errors from the following APIs can be returned: 
  14226.  
  14227.         -  DosRequestMutexSem 
  14228.         -  DosGetInfoBlocks 
  14229.         -  SMHEntryPoint SMH_NOTIFY 
  14230.         -  DosDevIOCtl (from ReadLong command to CD device driver). 
  14231.  
  14232.  Explicit Events Supported 
  14233.  
  14234.  No explicit events are supported for the CD-ROM XA Stream Handler. 
  14235.  
  14236.  Stream Handler Commands Supported 
  14237.  
  14238.  The following stream handler commands (SHC) are supported.  Refer to the OS/2 
  14239.  Multimedia Programming Reference for a description of these SHC commands and 
  14240.  the error return codes. 
  14241.  
  14242.      SHC_ASSOCIATE 
  14243.  
  14244.       Note:  A stream requires a file to be opened and associated to the stream 
  14245.              before a stream can be started. 
  14246.  
  14247.       Possible return codes: 
  14248.  
  14249.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  14250.         -  ERROR_INVALID_OBJTYPE (only ACBTYPE_SSSH is supported) 
  14251.         -  ERROR_INVALID_BUFFER_SIZE (ulAcbLen is smaller than needed) 
  14252.         -  ERROR_STREAM_NOT_STOP (stream must be stopped to associate) 
  14253.         -  ERROR_FILE_FORMAT_INCORRECT (file is not cdxa mode 2) 
  14254.  
  14255.       Return codes from the following APIs are also returned: 
  14256.  
  14257.         -  DosRequestMutexSem 
  14258.         -  DosDevIOCtl (ReadLong on CD drive) 
  14259.         -  DosFSCtl (to CDFS) 
  14260.         -  DosSetFilePtr 
  14261.  
  14262.      SHC_CREATE 
  14263.  
  14264.       Note:  The primary stream is the stream that is created first for a 
  14265.              interleaved file.  The secondary streams must have the hstream 
  14266.              handle of the primary stream in the hstreambuf parameter of the 
  14267.              SpiCreateStream API. Only the CREATE for the primary stream needs 
  14268.              to have the DCB filled in with the drive letter.  Any DCB passed 
  14269.              in on the secondary stream creates is ignored by this stream 
  14270.              handler. 
  14271.  
  14272.       Possible return codes: 
  14273.  
  14274.         -  ERROR_INVALID_SPCBKEY 
  14275.         -  ERROR_ALLOC_RESOURCES 
  14276.         -  ERROR_TOO_MANY_STREAMS (only 16 streams per XA file) 
  14277.         -  ERROR_INVALID_BUFFER_SIZE (DCB is too small) 
  14278.         -  ERROR_INVALID_PARAMETER (DCB parameter is NULL). 
  14279.  
  14280.       Return codes from the following APIs are also returned: 
  14281.  
  14282.         -  DosRequestMutexSem 
  14283.         -  DosCreateThread 
  14284.         -  DosOpen for CD Drive 
  14285.  
  14286.      SHC_DESTROY 
  14287.  
  14288.       Note:  Destroying the primary stream will suspend the streaming of the 
  14289.              secondary streams because all the associated streams use the 
  14290.              buffers owned by the primary stream. 
  14291.  
  14292.       Possible return codes: 
  14293.  
  14294.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  14295.  
  14296.       Return codes from the following APIs are also returned: 
  14297.  
  14298.         -  DosRequestMutexSem 
  14299.  
  14300.      SHC_START 
  14301.  
  14302.       Note:  The streaming will only start when the SHC_START command is 
  14303.              received for the primary stream, because it owns the I/O thread 
  14304.              and the stream buffers. 
  14305.  
  14306.       Possible return codes: 
  14307.  
  14308.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  14309.         -  ERROR_DATA_ITEM_NOT_SPECIFIED (stream must be associated before it 
  14310.            is started). 
  14311.  
  14312.       Return codes from the following APIs are also returned: 
  14313.  
  14314.         -  DosRequestMutexSem 
  14315.  
  14316.      SHC_STOP 
  14317.  
  14318.       Note:  A stop for the primary stream will stop all the streams because it 
  14319.              owns the I/O thread and the buffers.  A stop for a secondary 
  14320.              stream will only stop the data for that stream.  If a secondary 
  14321.              stream is stopped and restarted while the primary stream is still 
  14322.              going, the secondary stream data will pick up at the interleaved 
  14323.              point where the primary stream is. 
  14324.  
  14325.       Possible return codes: 
  14326.  
  14327.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  14328.         -  ERROR_STREAM_NOT_STARTED 
  14329.  
  14330.       Return codes from the following APIs are also returned: 
  14331.  
  14332.         -  DosRequestMutexSem 
  14333.         -  DosResumeThread 
  14334.         -  DosSuspendThread 
  14335.  
  14336.      SHC_SEEK 
  14337.  
  14338.       Note:  SEEK is only valid on the primary stream.  A SEEK command on a 
  14339.              secondary stream will return ERROR_DATA_ITEM_NOT_SEEKABLE. 
  14340.  
  14341.       The seek point is granular to the mmtimePerUnit specified in the SPCB. 
  14342.  
  14343.       Possible return codes: 
  14344.  
  14345.         -  ERROR_INVALID_STREAM (invalid hstream or hid-or both-passed) 
  14346.         -  ERROR_DATA_ITEM_NOT_SEEKABLE 
  14347.         -  ERROR_DATA_ITEM_NOT_SPECIFIED 
  14348.         -  ERROR_STREAM_NOT_STOP 
  14349.         -  ERROR_SEEK_PAST_END 
  14350.         -  ERROR_SEEK_BEFORE_BEGINNING 
  14351.         -  ERROR_LARGE_SEEK_BY_TIME 
  14352.  
  14353.       Return codes from the following APIs are also returned: 
  14354.  
  14355.         -  DosRequestMutexSem 
  14356.         -  DosDevIOCtl (ReadLong command to CD device driver). 
  14357.  
  14358.      SHC_GET_PROTOCOL 
  14359.  
  14360.       Possible return codes: 
  14361.  
  14362.         -  ERROR_INVALID_SPCBKEY 
  14363.  
  14364.       Return codes from the following APIs are also returned: 
  14365.  
  14366.         -  DosRequestMutexSem 
  14367.  
  14368.      SHC_INSTALL_PROTOCOL 
  14369.  
  14370.       Note:  This stream handler allows only data types of DATATYPE_CDXA_AUDIO, 
  14371.              DATATYPE_CDXA_VIDEO, or DATATYPE_CDXA_DATA to be installed. 
  14372.  
  14373.       Possible return codes: 
  14374.  
  14375.         -  ERROR_INVALID_SPCBKEY 
  14376.         -  ERROR_ALLOC_RESOURCES 
  14377.  
  14378.       Return codes from the following APIs are also returned: 
  14379.  
  14380.         -  DosRequestMutexSem 
  14381.  
  14382.      SHC_ENUMERATE_PROTOCOLS 
  14383.  
  14384.       Possible return codes: 
  14385.  
  14386.         -  ERROR_INSUFF_BUFFER 
  14387.  
  14388.       Return codes from the following APIs are also returned: 
  14389.  
  14390.         -  DosRequestMutexSem 
  14391.  
  14392.      SHC_NEGOTIATE_RESULT 
  14393.  
  14394.       Possible return codes: 
  14395.  
  14396.         -  ERROR_INVALID_STREAM (invalid hstream, hid, or both passed) 
  14397.         -  ERROR_INVALID_FUNCTION (must only be called directly after create). 
  14398.  
  14399.       Return codes from the following APIs are also returned: 
  14400.  
  14401.         -  DosRequestMutexSem 
  14402.  
  14403.  Base Stream Protocol Control Block Data Types Supported 
  14404.  
  14405.  The CD-ROM XA Stream Handler has 7 base SPCBs. 
  14406.  
  14407.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14408.   ΓöéSPCB Field            ΓöéCDXA_LEVELB Values      ΓöéCDXA_LEVELC Values      Γöé
  14409.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14410.   Γöéspcbkey.ulDataType    ΓöéDATATYPE_CDXA_AUDIO     ΓöéDATATYPE_CDXA_AUDIO     Γöé
  14411.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14412.   Γöéspcbkey.ulDataSubType ΓöéCDXA_LEVELB             ΓöéCDXA_LEVELC             Γöé
  14413.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14414.   ΓöéulDataFlag            ΓöéSPCBDATA_CUETIME        ΓöéSPCBDATA_CUETIME        Γöé
  14415.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14416.   ΓöéulNumRec              Γöé17                      Γöé17                      Γöé
  14417.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14418.   ΓöéulBlockSize           Γöé1                       Γöé1                       Γöé
  14419.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14420.   ΓöéulBufSize             Γöé39984                   Γöé39984                   Γöé
  14421.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14422.   ΓöéulMinBuf              Γöé8                       Γöé8                       Γöé
  14423.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14424.   ΓöéulMaxBuf              Γöé16                      Γöé16                      Γöé
  14425.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14426.   ΓöéulSrcStart            Γöé1                       Γöé1                       Γöé
  14427.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14428.   ΓöéulTgtStart            Γöé1                       Γöé1                       Γöé
  14429.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14430.   ΓöéulBufFlag             ΓöéSPCBBUF_INTERLEAVED     ΓöéSPCBBUF_INTERLEAVED     Γöé
  14431.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14432.   ΓöéulHandFlag            ΓöéSPCBHAND_NOSYNC |       Γöé                        Γöé
  14433.   Γöé                      ΓöéSPCBHAND_PHYS_SEEK      Γöé                        Γöé
  14434.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14435.   ΓöéulBytesPerUnit        Γöé2304                    Γöé2304                    Γöé
  14436.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14437.   ΓöémmtimePerUnit         Γöé160                     Γöé320                     Γöé
  14438.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14439.  
  14440.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14441.   ΓöéSPCB Field            ΓöéLEVELB_MONO Values      ΓöéLEVELC_MONO Values      Γöé
  14442.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14443.   Γöéspcbkey.ulDataType    ΓöéDATATYPE_CDXA_AUDIO     ΓöéDATATYPE_CDXA_AUDIO     Γöé
  14444.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14445.   Γöéspcbkey.ulDataSubType ΓöéCDXA_LEVELB_MONO        ΓöéCDXA_LEVELC_MONO        Γöé
  14446.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14447.   ΓöéulDataFlag            ΓöéSPCBDATA_CUETIME        ΓöéSPCBDATA_CUETIME        Γöé
  14448.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14449.   ΓöéulNumRec              Γöé17                      Γöé17                      Γöé
  14450.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14451.   ΓöéulBlockSize           Γöé1                       Γöé1                       Γöé
  14452.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14453.   ΓöéulBufSize             Γöé39984                   Γöé39984                   Γöé
  14454.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14455.   ΓöéulMinBuf              Γöé8                       Γöé8                       Γöé
  14456.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14457.   ΓöéulMaxBuf              Γöé16                      Γöé16                      Γöé
  14458.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14459.   ΓöéulSrcStart            Γöé1                       Γöé1                       Γöé
  14460.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14461.   ΓöéulTgtStart            Γöé1                       Γöé1                       Γöé
  14462.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14463.   ΓöéulBufFlag             ΓöéSPCBBUF_INTERLEAVED     ΓöéSPCBBUF_INTERLEAVED     Γöé
  14464.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14465.   ΓöéulHandFlag            ΓöéSPCBHAND_NOSYNC |       Γöé                        Γöé
  14466.   Γöé                      ΓöéSPCBHAND_PHYS_SEEK      Γöé                        Γöé
  14467.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14468.   ΓöéulBytesPerUnit        Γöé2304                    Γöé2304                    Γöé
  14469.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14470.   ΓöémmtimePerUnit         Γöé320                     Γöé640                     Γöé
  14471.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14472.  
  14473.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14474.   ΓöéSPCB Field               ΓöéCDXA_AUDIO Values                              Γöé
  14475.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14476.   Γöéspcbkey.ulDataType       ΓöéDATATYPE_CDXA_AUDIO                            Γöé
  14477.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14478.   Γöéspcbkey.ulDataSubType    ΓöéCDXA_AUDIO_HD                                  Γöé
  14479.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14480.   ΓöéulDataFlag               ΓöéSPCBDATA_CUETIME                               Γöé
  14481.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14482.   ΓöéulNumRec                 Γöé17                                             Γöé
  14483.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14484.   ΓöéulBlockSize              Γöé1                                              Γöé
  14485.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14486.   ΓöéulBufSize                Γöé39984                                          Γöé
  14487.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14488.   ΓöéulMinBuf                 Γöé8                                              Γöé
  14489.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14490.   ΓöéulMaxBuf                 Γöé16                                             Γöé
  14491.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14492.   ΓöéulSrcStart               Γöé1                                              Γöé
  14493.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14494.   ΓöéulTgtStart               Γöé1                                              Γöé
  14495.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14496.   ΓöéulBufFlag                ΓöéSPCBBUF_INTERLEAVED                            Γöé
  14497.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14498.   ΓöéulHandFlag               ΓöéSPCBHAND_NOSYNC | SPCBHAND_PHYS_SEEK           Γöé
  14499.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14500.   ΓöéulBytesPerUnit           Γöé0                                              Γöé
  14501.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14502.   ΓöémmtimePerUnit            Γöé0                                              Γöé
  14503.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14504.  
  14505.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14506.   ΓöéSPCB Field            ΓöéCDXA_DATA Values        ΓöéCDXA_VIDEO Values       Γöé
  14507.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14508.   Γöéspcbkey.ulDataType    ΓöéDATATYPE_CDXA_DATA      ΓöéDATATYPE_CDXA_VIDEO     Γöé
  14509.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14510.   Γöéspcbkey.ulDataSubType Γöé0                       Γöé0                       Γöé
  14511.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14512.   ΓöéulNumRec              Γöé17                      Γöé17                      Γöé
  14513.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14514.   ΓöéulBlockSize           Γöé1                       Γöé1                       Γöé
  14515.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14516.   ΓöéulBufSize             Γöé39984                   Γöé39984                   Γöé
  14517.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14518.   ΓöéulMinBuf              Γöé8                       Γöé8                       Γöé
  14519.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14520.   ΓöéulMaxBuf              Γöé16                      Γöé16                      Γöé
  14521.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14522.   ΓöéulSrcStart            Γöé1                       Γöé1                       Γöé
  14523.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14524.   ΓöéulTgtStart            Γöé1                       Γöé1                       Γöé
  14525.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14526.   ΓöéulBufFlag             ΓöéSPCBBUF_INTERLEAVED     ΓöéSPCBBUF_INTERLEAVED     Γöé
  14527.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14528.   ΓöéulHandFlag            ΓöéSPCBHAND_NOSYNC |       Γöé                        Γöé
  14529.   Γöé                      ΓöéSPCBHAND_PHYS_SEEK      Γöé                        Γöé
  14530.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14531.   ΓöéulBytesPerUnit        Γöé0                       Γöé0                       Γöé
  14532.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14533.   ΓöémmtimePerUnit         Γöé0                       Γöé0                       Γöé
  14534.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14535.  
  14536.  Stream Handler Limits 
  14537.  
  14538.  Maximum number of streams associated to a primary stream is 15. 
  14539.  
  14540.  Maximum number of streams supported by the stream handler at one time is only 
  14541.  limited by available memory. 
  14542.  
  14543.  
  14544. ΓòÉΓòÉΓòÉ 10. P2STRING Tool ΓòÉΓòÉΓòÉ
  14545.  
  14546. The P2STRING tool processes script files (containing string commands and tool 
  14547. directives) to test the behavior of subsystems in OS/2 multimedia.  P2STRING 
  14548. extracts the strings from the script files and processes the commands through 
  14549. the mciSendString function.  Messages and error conditions of the processes 
  14550. included in the scripts are logged to an output file and displayed in windows 
  14551. (as shown in the following figure). Each process logs to its own display 
  14552. window, but all processes log to the same output file.  In addition, if you 
  14553. close the display window, the string execution thread is immediately destroyed 
  14554. and the entire process ends. 
  14555.  
  14556. Output messages include all non-comment lines read from the script (for 
  14557. example, script directives, command strings, expected return values, expected 
  14558. and received notify messages, and status lines). In addition, errors and 
  14559. debugging statements of unsuccessful string commands are logged to a file named 
  14560. P2STRING.LOG file. 
  14561.  
  14562.  
  14563. ΓòÉΓòÉΓòÉ 10.1. Setting Font Size and Type ΓòÉΓòÉΓòÉ
  14564.  
  14565. Before you start the P2STRING tool, you can change the size and type of font 
  14566. displayed in the P2STRING window on the desktop. For example, to specify Times 
  14567. Roman font with a 10 point font size, type: 
  14568.  
  14569. SET P2STRING_FONTFACE=TIMES
  14570. SET P2STRING_FONTSIZE=10
  14571.  
  14572. You can specify either font face, font size, or both. Possible FONTFACE values 
  14573. include SYSTEM, COURIER, TIMES, or HELVETICA (default).  Possible FONTSIZE 
  14574. values include 8 (default), 10, 12, 14, or 18. 
  14575.  
  14576.  
  14577. ΓòÉΓòÉΓòÉ 10.2. Starting P2STRING ΓòÉΓòÉΓòÉ
  14578.  
  14579. The P2STRING tool consists of two files: P2STRING.EXE and P2S_DLL.DLL. These 
  14580. files are located in the \TOOLKIT\BIN\BETA\P2STRING subdirectory. The following 
  14581. figure displays the syntax used to start the P2STRING program.  Associated 
  14582. parameters are described in the next table in this section. 
  14583.  
  14584.  
  14585. P2STRING inp_file [-a]out_file [-eerr_file] [-d|-D] [-E] [-t]
  14586.  
  14587. Note:  The parameters are case sensitive. 
  14588.  
  14589.  The following table describes the parameters associated with the P2STRING 
  14590.  program. 
  14591.  
  14592.  Parameter           Description 
  14593.  
  14594.  script_file         Specifies the script file name you want to process. 
  14595.  
  14596.                      Note:  See P2STRING Script Language for information on the 
  14597.                             contents of a script file and how to interpret the 
  14598.                             script language. 
  14599.  
  14600.  [-a]out_file        Specifies the output file name containing the results of 
  14601.                      the test. This file contains only the results of the test 
  14602.                      you are running, unless you specify the optional -a 
  14603.                      parameter. For example, to append the output of a script 
  14604.                      file named SAMPLE.SCR to output currently in a file named 
  14605.                      MDM.OUT, type: 
  14606.  
  14607.                                           P2STRING SAMPLE.SCR -aMDM.OUT
  14608.  
  14609.  [-eerr_file]        Specifies the optional error file name that receives 
  14610.                      messages from string commands that completed 
  14611.                      unsuccessfully. For example, to create an error file named 
  14612.                      MDM.ERR, type: 
  14613.  
  14614.                                           P2STRING SAMPLE.SCR MDM.OUT -eMDM.ERR
  14615.  
  14616.  [-d|-D]             Specifies one of the following optional parameters: 
  14617.  
  14618.                                           -d   Instructs P2STRING to end after processing a script file.
  14619.                                               Use this parameter when you are running test cases automatically.
  14620.                                               There is no change in the output.
  14621.                                               When the script file has completed processing, P2STRING prompts
  14622.                                               you with a message requiring you to end the test.
  14623.  
  14624.                                           -D   Behaves identically to the -d parameter except that the script
  14625.                                               directives requiring user input are ignored.
  14626.  
  14627.                      Note:  See Tool Directives for information on how to add 
  14628.                             execution directives (which require user input) in 
  14629.                             a script file. 
  14630.  
  14631.  -E                  Causes the script file to exit after the first error. By 
  14632.                      default, script files run to completion regardless of 
  14633.                      errors. For example, the following command ends the 
  14634.                      processing of SAMPLE.SCR after an error is encountered: 
  14635.  
  14636.                                           P2STRING SAMPLE.SCR -aMDM.OUT -d -eMDM.ERR -E
  14637.  
  14638.  -t                  Records time stamps for strings and MM_MCIPASSDEVICE 
  14639.                      notification messages. 
  14640.  
  14641.  
  14642. ΓòÉΓòÉΓòÉ 10.3. P2STRING Script Language ΓòÉΓòÉΓòÉ
  14643.  
  14644. This section describes the contents of a script file and how to interpret the 
  14645. script language.  Script files can contain the following types of lines: 
  14646.  
  14647.      Comments 
  14648.      Tool Directives 
  14649.      OS/2 Multimedia String Commands 
  14650.      Expected Return Strings 
  14651.      Expected Error Messages 
  14652.      Expected Notification Messages 
  14653.  
  14654.  The following discussion provides information on how to create a script file 
  14655.  containing these various line types. The following figure displays an example 
  14656.  of how a script file appears. 
  14657.  
  14658.   @PROCESSES=2
  14659.   @EVENTS={HASCTRL1=1,HASCTRL2=0}
  14660.   #
  14661.   #
  14662.   #
  14663.   @PROCESS 1
  14664.   ;
  14665.   ; set masteraudio level for session to 10% - will affect all
  14666.   ; 3 processes
  14667.   ;
  14668.   masteraudio volume 10
  14669.   ;
  14670.   ; open waveaudio device non-exclusively
  14671.   ;
  14672.   open waveaudio alias wav1 shareable notify
  14673.   +MM_MCINOTIFY MCI_NOTIFY_SUCCESSFUL MCI_OPEN #1
  14674.   @WAIT_NOTIFY 1 60000
  14675.   @WAIT_PASSDEVICE wav1 60000
  14676.   @WAIT_NOTIFY 21 60000
  14677.  
  14678.  
  14679. ΓòÉΓòÉΓòÉ 10.3.1. Comments ΓòÉΓòÉΓòÉ
  14680.  
  14681. Script comment lines must start with either a semi-colon (;) or pound sign (#) 
  14682. in the first column.  These comment lines are neither displayed nor echoed in 
  14683. the output file.  If you want a remark to appear in the output, use the @REM 
  14684. directive. 
  14685.  
  14686. P2STRING allows for a variable number of lines to be displayed in its window. 
  14687. Regular comment lines (header lines) are not displayed nor written to the 
  14688. output file. 
  14689.  
  14690.  
  14691. ΓòÉΓòÉΓòÉ 10.3.2. Tool Directives ΓòÉΓòÉΓòÉ
  14692.  
  14693. The P2STRING tool supports either multithreaded or multiprocess execution, but 
  14694. not both.  You can use tool directives to test either @PROCESSES or @THREADS in 
  14695. a script file. 
  14696.  
  14697. Tool directives start with an at sign (@) in the first column.  These 
  14698. directives affect the execution and appearance of the output.  The following 
  14699. classes of directives are recognized: 
  14700.  
  14701.      Initialization 
  14702.      Execution 
  14703.  
  14704.  
  14705. ΓòÉΓòÉΓòÉ 10.3.2.1. Initialization Directives ΓòÉΓòÉΓòÉ
  14706.  
  14707. Use initialization directives to set up the content of the script file.  These 
  14708. directives must appear before execution directives because the tool 
  14709. preprocesses the script file and builds process command buffers. 
  14710.  
  14711. The @THREADS and @PROCESSES directives are mutually exclusive.  In other words, 
  14712. the P2STRING tool supports either multithreaded or multiprocess execution in a 
  14713. script file (not both).  In addition, there is a limit of 10 processes or 
  14714. threads per script file. The following table lists the supported initialization 
  14715. directives. 
  14716.  
  14717.  Directive                            Description 
  14718.  
  14719.   @PROCESSES=x
  14720.                                       Specifies the number (x) of processes the 
  14721.                                       script file will be running.  For 
  14722.                                       example: 
  14723.  
  14724.                                                                             @PROCESSES=2
  14725.  
  14726.   @THREADS=x
  14727.                                       Specifies the number (x) of threads the 
  14728.                                       script file will be running. 
  14729.  
  14730.   @EVENTS={n[=0|1] [,n[=0|1]]}
  14731.                                       Specifies one or more names of events. 
  14732.                                       Events are user-defined with a maximum of 
  14733.                                       15 characters. Events can be set to 1 or 
  14734.                                       0. Set an event to 1 for an event that is 
  14735.                                       set with the @SET_EVENT execution 
  14736.                                       directive. Set an event to 0 to clear or 
  14737.                                       reset the event. If no initialization 
  14738.                                       values are specified, the event is 
  14739.                                       initialized to 0. For example: 
  14740.  
  14741.                                                                             @EVENTS={brad=1,john=1,test=0}
  14742.  
  14743.  
  14744. ΓòÉΓòÉΓòÉ 10.3.2.2. Execution Directives ΓòÉΓòÉΓòÉ
  14745.  
  14746. Use execution directives to process the script file.  Again, the @THREAD and 
  14747. @PROCESS directives are mutually exclusive. 
  14748.  
  14749. The following table lists the supported execution directives. 
  14750.  
  14751. Note:  Timing out on the @WAIT_EVENT and @WAIT_NOTIFY directives is not 
  14752.        considered a failure. 
  14753.  
  14754.  Directive                                Description 
  14755.  
  14756.   @THREAD x
  14757.                                           Specifies that the script lines 
  14758.                                           following this directive belong to 
  14759.                                           thread number x until the next 
  14760.                                           @THREAD directive is encountered. 
  14761.  
  14762.   @PROCESS x
  14763.                                           Specifies that the script lines 
  14764.                                           following this directive belong to 
  14765.                                           process number x until the next 
  14766.                                           @PROCESS directive is encountered. 
  14767.  
  14768.   @SET_EVENT name 0|1
  14769.                                           Sets the event name to either 1 or 0. 
  14770.                                           Use 1 to mark that the event has 
  14771.                                           happened. Use 0 to clear or reset the 
  14772.                                           event. 
  14773.  
  14774.                                           Note:  The event must be declared 
  14775.                                                  through the @EVENTS directive. 
  14776.  
  14777.   @WAIT_EVENT name [to]
  14778.                                           Waits until the event name is set to 
  14779.                                           1. @WAIT_EVENT does not cause a 
  14780.                                           change of the event state. If you 
  14781.                                           need a reusable event, use this 
  14782.                                           directive. 
  14783.  
  14784.                                           The timeout (to) is specified in 
  14785.                                           milliseconds. If omitted, it defaults 
  14786.                                           to 3 minutes. 
  14787.  
  14788.   @WAIT_NOTIFY x [to]
  14789.                                           Waits for a specific number (x) from 
  14790.                                           an expected MM_MCINOTIFY notification 
  14791.                                           message. This number must match the 
  14792.                                           index used in the MM_MCINOTIFY 
  14793.                                           reference line. The @WAIT_NOTIFY 
  14794.                                           events are not reusable because there 
  14795.                                           are no events that logically reset 
  14796.                                           it. 
  14797.  
  14798.                                           The timeout (to) is specified in 
  14799.                                           milliseconds. If omitted, it defaults 
  14800.                                           to 3 minutes. 
  14801.  
  14802.                                           If the associated mciSendString 
  14803.                                           function fails, the event is posted 
  14804.                                           to prevent delays for notifications 
  14805.                                           that are never going to be sent. 
  14806.  
  14807.   @WAIT_PASSDEVICE alias [to]
  14808.                                           Waits until the device instance with 
  14809.                                           an alias of alias gains use. This 
  14810.                                           assumes that the alias names used 
  14811.                                           within a script file are unique. The 
  14812.                                           maximum alias name length is 20 
  14813.                                           characters. 
  14814.  
  14815.                                           Note:  Use a unique alias for every 
  14816.                                                  OPEN command. 
  14817.  
  14818.                                           The timeout (to) is specified in 
  14819.                                           milliseconds. If omitted, it defaults 
  14820.                                           to 3 minutes. 
  14821.  
  14822.                                           The tool assumes that a unique alias 
  14823.                                           is specified on each OPEN string 
  14824.                                           command. If unique aliases are not 
  14825.                                           used, errors conditions might occur. 
  14826.  
  14827.   @REM comment
  14828.                                           Echoes the comment to the screen and 
  14829.                                           the output log file. All other script 
  14830.                                           comment lines (those starting with ; 
  14831.                                           or #) are neither transferred nor 
  14832.                                           displayed. 
  14833.  
  14834.   @PAUSE to
  14835.                                           Pauses processing of the current 
  14836.                                           thread or process in the input script 
  14837.                                           file for the specified time. It does 
  14838.                                           not stop the processing of the 
  14839.                                           notifications or window functions. 
  14840.                                           Other threads or processes are not 
  14841.                                           affected by this directive. 
  14842.  
  14843.   @BREAK [message]
  14844.                                           Causes a message box to appear with 
  14845.                                           message text. Script processing is 
  14846.                                           halted until the user responds with 
  14847.                                           the correct action. For example: 
  14848.  
  14849.                                                                                     @BREAK [replace the CD]
  14850.  
  14851.   @CHECK [message]
  14852.                                           Grades the success of the previous 
  14853.                                           command based on the user's response. 
  14854.                                           A pop-up window displays the message 
  14855.                                           and prompts the user with Yes or No 
  14856.                                           push buttons. The status is passed if 
  14857.                                           the user selects Yes, or failed if No 
  14858.                                           is selected. For example: 
  14859.  
  14860.                                                                                     @BREAK The music will play for 5 secs.  Ready to time it?
  14861.                                                                                     play cdaudio notify
  14862.                                                                                     @PAUSE 5000
  14863.                                                                                     @CHECK Did it play?
  14864.  
  14865.  
  14866. ΓòÉΓòÉΓòÉ 10.3.3. OS/2 Multimedia String Commands ΓòÉΓòÉΓòÉ
  14867.  
  14868. All lines that do not fall into any of the other categories are interpreted as 
  14869. OS/2 multimedia string commands.  These lines are passed to the Media Device 
  14870. Manager (MDM) through the mciSendString function after the environment 
  14871. variables have been substituted. 
  14872.  
  14873. Any token in the string command line bracketed by question marks (such as 
  14874. ?FOO?) is interpreted as an environment variable.  The actual value of the 
  14875. environment variable is substituted into the string before it is passed to the 
  14876. mciSendString function.  If the variable is not found, a warning is issued and 
  14877. the token is replaced with a NULL string.  For example, assuming the 
  14878. environment string MMDATA is set to D:\DATA, open ?mmdata?\temp.wav alias a is 
  14879. equal to open d:\data\temp.wav alias a. 
  14880.  
  14881.  
  14882. ΓòÉΓòÉΓòÉ 10.3.4. Expected Return Strings ΓòÉΓòÉΓòÉ
  14883.  
  14884. Many OS/2 multimedia commands return strings.  It is possible to check these 
  14885. strings against an expected value with an expected return string line. 
  14886.  
  14887. An expected return string line has the format: 
  14888.  
  14889. =result
  14890.  
  14891. The equal sign (=) must be in column 1 and should have no trailing spaces.  If 
  14892. an empty string is expected, nothing should follow the = (not even spaces). 
  14893. For example: 
  14894.  
  14895. status cdaudio ready wait
  14896. =TRUE
  14897. status cdaudio mode wait
  14898. =stopped
  14899.  
  14900. The expected result is always interpreted as a string.  This might produce some 
  14901. unusual outputs for commands that return binary data. 
  14902.  
  14903. Where the return is a textual numerical value, it may be matched to a tolerance 
  14904. range of ╤æ10% using a tilde (~) before the number.  This is typically used when 
  14905. the exact value cannot be known.  For example: 
  14906.  
  14907. set foo time format milliseconds wait
  14908. play foo notify
  14909. @PAUSE 1000
  14910. stop foo wait
  14911. status foo position wait
  14912. =~1000
  14913.  
  14914. Thus, the status command is considered successful if the returned string is in 
  14915. the range 900 - 1100. 
  14916.  
  14917.  
  14918. ΓòÉΓòÉΓòÉ 10.3.5. Expected Error Messages ΓòÉΓòÉΓòÉ
  14919.  
  14920. When an OS/2 multimedia string command is expected to fail with an error, use 
  14921. the expected error line to specify the expected error.  The expected error line 
  14922. has the format: 
  14923.  
  14924. =!error
  14925.  
  14926. The =! must start in column 1.  If any error is acceptable, then use the 
  14927. keyword ERROR.  If a specific error is expected, enter the exact error message 
  14928. after the =!.  For example: 
  14929.  
  14930. open sequencer alias mymidi wait
  14931. load mymidi nofile.foo
  14932. =!File not found.
  14933.  
  14934. Be careful about extra blanks in the expected-error and expected-result lines. 
  14935. The case of the strings is unimportant; however the comparison will fail if the 
  14936. spacing or punctuation does not match exactly. 
  14937.  
  14938.  
  14939. ΓòÉΓòÉΓòÉ 10.3.6. Expected Notification Messages ΓòÉΓòÉΓòÉ
  14940.  
  14941. Many OS/2 multimedia string commands cause notification messages to be sent to 
  14942. the P2STRING tool.  The system uses notification messages to respond to 
  14943. applications.  For example, notification messages indicate system status 
  14944. regarding completion of a media device function or passing of the ownership of 
  14945. a media control device from one process to another. 
  14946.  
  14947. It is possible to verify that the proper notifications are received by using an 
  14948. expected-notify line.  Each expected notification line begins with a plus sign 
  14949. (+) in column 1.  The following types of notification lines are possible: 
  14950.  
  14951.      Command completion/error notifications 
  14952.      Event notifications 
  14953.      Position change notifications 
  14954.  
  14955.  Note:  Any or all notification messages might be expected for a single OS/2 
  14956.         multimedia string command. 
  14957.  
  14958.  
  14959. ΓòÉΓòÉΓòÉ 10.3.6.1. Command Completion/Error Notifications ΓòÉΓòÉΓòÉ
  14960.  
  14961. An MM_MCINOTIFY line notifies an application when a device successfully 
  14962. completes the action indicated by a media message or when an error occurs. 
  14963.  
  14964. +MM_MCINOTIFY  notify-code[#x]
  14965.  
  14966. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14967. ΓöéKeyword             ΓöéDescription                                       Γöé
  14968. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14969. Γöénotify-code         ΓöéSpecifies the notification message code, for      Γöé
  14970. Γöé                    Γöéexample, MCI_NOTIFY_SUCCESSFUL.  The spelling mustΓöé
  14971. Γöé                    Γöébe the same as the #defines in the OS2ME.H file   Γöé
  14972. Γöé                    Γöéfor the notify codes.                             Γöé
  14973. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14974. Γöémessage             ΓöéSpecifies the media control interface message thatΓöé
  14975. Γöé                    Γöécaused the notification, for example, MCI_PLAY.   Γöé
  14976. Γöé                    ΓöéThe spelling must be the same as the #defines in  Γöé
  14977. Γöé                    Γöéthe OS2ME.H file for MCI messages.                Γöé
  14978. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14979. Γöéx                   ΓöéSpecifies a unique number (x) used to associate   Γöé
  14980. Γöé                    Γöé@WAIT_NOTIFY directives with particular           Γöé
  14981. Γöé                    Γöénotifications.  This number has nothing to do withΓöé
  14982. Γöé                    Γöéthe order in which strings are sent.  The number  Γöé
  14983. Γöé                    Γöémust be unique and in the range 1-99.             Γöé
  14984. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14985.  
  14986.  
  14987. ΓòÉΓòÉΓòÉ 10.3.6.2. Event Notifications ΓòÉΓòÉΓòÉ
  14988.  
  14989. An MM_MCIPOSITIONCHANGE line notifies an application of the current media 
  14990. position. 
  14991.  
  14992. +MM_MCIPOSITIONCHANGE position %user-parameter #x
  14993.  
  14994. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14995. ΓöéKeyword        ΓöéDescription                                  Γöé
  14996. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  14997. Γöéposition       ΓöéSpecifies the expected MMTIME position of theΓöé
  14998. Γöé               Γöéfirst position-change message.               Γöé
  14999. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15000. Γöéuser-parameter ΓöéSpecifies the user parameter to be returned. Γöé
  15001. Γöé               ΓöéThis should be the same as the return value  Γöé
  15002. Γöé               Γöéspecified in the SETPOSITIONADVISE string    Γöé
  15003. Γöé               Γöécommand.  Note that the return value must be Γöé
  15004. Γöé               Γöéa unique integer in the range of 1-99.       Γöé
  15005. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15006. Γöéx              ΓöéSpecifies the number (x) of position change  Γöé
  15007. Γöé               Γöémessages expected.  For further information, Γöé
  15008. Γöé               Γöésee Limitations of MM_MCIPOSITIONCHANGE      Γöé
  15009. Γöé               ΓöéVerification.                                Γöé
  15010. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15011.  
  15012.  
  15013. ΓòÉΓòÉΓòÉ 10.3.6.3. Position Change Notifications ΓòÉΓòÉΓòÉ
  15014.  
  15015. An MM_MCICUEPOINT line notifies an application that the playlist processor has 
  15016. encountered a message instruction. 
  15017.  
  15018. +MM_MCICUEPOINT position %user-parameter
  15019.  
  15020. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15021. ΓöéKeyword           ΓöéDescription                               Γöé
  15022. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15023. Γöéposition          ΓöéSpecifies the expected MMTIME position of Γöé
  15024. Γöé                  Γöéthe first position-change message.        Γöé
  15025. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15026. Γöéuser-parameter    ΓöéSpecifies the user parameter to be        Γöé
  15027. Γöé                  Γöéreturned.  This should be the same as the Γöé
  15028. Γöé                  Γöéreturn value specified in the             Γöé
  15029. Γöé                  ΓöéSETPOSITIONADVISE string command.  Note   Γöé
  15030. Γöé                  Γöéthat the return value must be a unique    Γöé
  15031. Γöé                  Γöéinteger in the range of 1-99.             Γöé
  15032. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15033.  
  15034. Note:  Other notifications cannot be compared because they do not allow for a 
  15035.        user-parameter as part of the message, which is essential for the 
  15036.        tracking of related notifications. 
  15037.  
  15038.  
  15039. ΓòÉΓòÉΓòÉ 10.4. Limitations of MM_MCIPOSITIONCHANGE Verification ΓòÉΓòÉΓòÉ
  15040.  
  15041. There are limitation to what you can verify in the P2STRING tool using event 
  15042. notification lines.  The MM_MCIPOSITIONCHANGE line requires the use of the 
  15043. "return value" item in the respective string commands.  This line also does not 
  15044. provide for timing start point; for example, playing has started.  The P2STRING 
  15045. tool can only count the number of messages received for a specific user 
  15046. parameter (used as a key) and check if subsequent messages have positions 
  15047. approximate to the given expected position interval.  The script writer must 
  15048. determine how many SETPOSITIONADVISE messages are expected, considering the 
  15049. duration of playing, time format, and start position of the play/record.  The 
  15050. reference position given in the expected notification line must be in MMTIME 
  15051. units.  If the "expected number of messages" parameter is omitted, the tool 
  15052. only verifies the position interval (not the number).  In case of scripts where 
  15053. play, seek, or record are used to cover non-monotonic ranges, P2STRING might 
  15054. report failures on position-advises because it expects each SETPOSITIONADVISE 
  15055. to be in the next position interval from the previous message.  If the script 
  15056. makes a jump to a position that does not conform to this, the status will be 
  15057. logged as failed. 
  15058.  
  15059. For example: 
  15060.  
  15061. setpositionadvise SomeDevice every 10000 on return 5
  15062. +MM_MCIPOSITIONCHANGE 10000 %5
  15063. play SomeDevice from 35000 to 55000 notify (produce 3 positionchange msgs)
  15064. seek SomeDevice to 30000 wait
  15065. play SomeDevice notify (produces a number of messages starting at 30000)
  15066.  
  15067. MM_MCIPOSITIONCHANGE messages are logged as failed, because of the lapse in 
  15068. position interval.  A way to handle this situation is to disable the 
  15069. MM_MCIPOSITIONCHANGE before an explicit position jump is made and enable the 
  15070. same SETPOSITIONADVISE with a different user parameter. 
  15071.  
  15072. For example: 
  15073.  
  15074. setpositionadvise SomeDevice every 10000 on return 5
  15075. +MM_MCIPOSITIONCHANGE 10000 %5
  15076. play SomeDevice from 35000 to 55000 notify (produce 3 positionchange msgs)
  15077. setpositionadvise SomeDevice every 10000 off
  15078. seek SomeDevice to 30000 wait
  15079. setpositionadvise SomeDevice every 10000 on return 6
  15080. +MM_MCIPOSITIONCHANGE 10000 %6
  15081. play SomeDevice notify (produce a number of messages starting at 30000)
  15082.  
  15083.  
  15084. ΓòÉΓòÉΓòÉ 10.5. Processing Logic ΓòÉΓòÉΓòÉ
  15085.  
  15086. A string command line can be followed by zero to one return value lines, or 
  15087. zero to three notification lines.  Note that this is an exclusive OR, meaning 
  15088. that specifying both expected return value and expected notification is not 
  15089. going to give reliable results due to the fact that the returned buffer does 
  15090. not become valid prior to the end of the notify message.  Also, in case of 
  15091. notify flags, return values are in the procedural interface format rather than 
  15092. in the string interface format. 
  15093.  
  15094. The MDM will not be able to convert return values to strings for commands 
  15095. processed with the notify flag because media control drivers will be sending 
  15096. their notify messages directly to the application. 
  15097.  
  15098. Status of each command is determined in two stages.  The first stage is at 
  15099. string execution.  If the mciSendString function returns an error and there was 
  15100. no =!ERROR reference line in the script following the command string line, the 
  15101. command is considered failed.  If a return value was found after mciSendString 
  15102. is processed, the tool will check for expected return and perform comparison of 
  15103. the two.  It they do not match, the command is considered failed.  In case of 
  15104. an error that is not in the range understood by the mciGetErrorString function, 
  15105. the command is considered failed even if the !ERROR was encountered. 
  15106.  
  15107. The second stage of the comparison is after a notification is received and 
  15108. after all the commands are issued.  If a notification was received and it 
  15109. successfully compared to the expected notification line, the command is 
  15110. considered successful.  If there was no reference notification line, status of 
  15111. the command will not be assigned, unless notify-error was returned.  After all 
  15112. the scripts are processed, expected reference notifications will be used to 
  15113. determine if all the notifications were received.  The commands that did not 
  15114. receive a notify, and had an expected notification line of the type, are marked 
  15115. failed.  Note that command strings are not examined for presence of a notify 
  15116. flag and it is the writer's responsibility to create an expected notify line if 
  15117. it is of importance.  In case of expected NOTIFY_SUCCESSFUL messages, all codes 
  15118. other than NOTIFY_ERROR are considered valid.  This includes NOTIFY_SUCCESSFUL, 
  15119. NOTIFY_ABORTED and NOTIFY_SUPERCEDED.  If any other notify code was specified 
  15120. as expected, and exact match will be checked for.  If NOTIFY_ERROR is expected, 
  15121. all errors in the range are verified as passed.  There is no facility for 
  15122. verification of an exact error code returned in the notification. 
  15123.  
  15124.  
  15125. ΓòÉΓòÉΓòÉ 11. Notices ΓòÉΓòÉΓòÉ
  15126.  
  15127. August 1996 
  15128.  
  15129. The following paragraph does not apply to the United Kingdom or any country 
  15130. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  15131. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  15132. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  15133. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  15134. do not allow disclaimer of express or implied warranties in certain 
  15135. transactions, therefore, this statement may not apply to you. 
  15136.  
  15137. This publication could include technical inaccuracies or typographical errors. 
  15138. Changes are periodically made to the information herein; these changes will be 
  15139. incorporated in new editions of the publication. IBM may make improvements 
  15140. and/or changes in the product(s) and/or the program(s) described in this 
  15141. publication at any time 
  15142.  
  15143. This publication was produced in the United States of America.  IBM may not 
  15144. offer the products, services, or features discussed in this document in other 
  15145. countries, and the information is subject to change without notice.  Consult 
  15146. your local IBM representative for information on the products, services, and 
  15147. features available in your area. 
  15148.  
  15149. Requests for technical information about IBM products should be made to your 
  15150. IBM reseller or IBM marketing representative. 
  15151.  
  15152.  
  15153. ΓòÉΓòÉΓòÉ 11.1. Copyright Notices ΓòÉΓòÉΓòÉ
  15154.  
  15155. COPYRIGHT LICENSE: This publication contains printed sample application 
  15156. programs in source language, which illustrate OS/2 programming techniques. You 
  15157. may copy, modify, and distribute these sample programs in any form without 
  15158. payment to IBM, for the purposes of developing, using, marketing or 
  15159. distributing application programs conforming to the OS/2 application 
  15160. programming interface. 
  15161.  
  15162. Each copy of any portion of these sample programs or any derivative work, which 
  15163. is distributed to others, must include a copyright notice as follows: "(C) 
  15164. (your company name) (year).  All rights reserved." 
  15165.  
  15166. (C)Copyright International Business Machines Corporation 1994, 1996. All rights 
  15167. reserved. 
  15168. Note to U.S. Government Users - Documentation related to restricted rights - 
  15169. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  15170. Schedule Contract with IBM Corp. 
  15171.  
  15172.  
  15173. ΓòÉΓòÉΓòÉ 11.2. Disclaimers ΓòÉΓòÉΓòÉ
  15174.  
  15175. References in this publication to IBM products, programs, or services do not 
  15176. imply that IBM intends to make these available in all countries in which IBM 
  15177. operates. Any reference to an IBM product, program, or service is not intended 
  15178. to state or imply that only that IBM product, program, or service may be used. 
  15179. Subject to IBM's valid intellectual property or other legally protectable 
  15180. rights, any functionally equivalent product, program, or service may be used 
  15181. instead of the IBM product, program, or service. The evaluation and 
  15182. verification of operation in conjunction with other products, except those 
  15183. expressly designated by IBM, are the responsibility of the user. 
  15184.  
  15185. IBM may have patents or pending patent applications covering subject matter in 
  15186. this document. The furnishing of this document does not give you any license to 
  15187. these patents. You can send license inquiries, in writing, to: 
  15188.  
  15189.       IBM Director of Licensing 
  15190.       IBM Corporation 
  15191.       500 Columbus Avenue 
  15192.       Thornwood, NY  10594 
  15193.       U.S.A. 
  15194.  
  15195.  Asia-Pacific users can inquire, in writing, to the IBM Director of 
  15196.  Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31 
  15197.  Roppongi 3-chome, Minato-ku, Tokyo 106, Japan. 
  15198.  
  15199.  Licensees of this program who wish to have information about it for the 
  15200.  purpose of enabling: (i) the exchange of information between independently 
  15201.  created programs and other programs (including this one) and (ii) the mutual 
  15202.  use of the information which has been exchanged, should contact IBM 
  15203.  Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A.  Such 
  15204.  information may be available, subject to appropriate terms and conditions, 
  15205.  including in some cases, payment of a fee. 
  15206.  
  15207.  
  15208. ΓòÉΓòÉΓòÉ 11.3. Trademarks ΓòÉΓòÉΓòÉ
  15209.  
  15210. The following terms are trademarks of the IBM Corporation in the United States 
  15211. or other countries or both: 
  15212.  
  15213.  Audio Visual Connection       Multimedia Presentation Manager/2 
  15214.  Common User Access            OS/2 
  15215.  CUA                           Presentation Manager 
  15216.  IBM                           Workplace Shell 
  15217.  
  15218.  The following terms are trademarks of other companies: 
  15219.  
  15220.  Helvetica                     Linotype Company 
  15221.  Pro AudioSpectrum 16          Media Vision, Inc. 
  15222.  Sound Blaster                 Creative Technology Ltd. 
  15223.  
  15224.  Other company, product, and service names, which may be denoted by a double 
  15225.  asterisk (**), may be trademarks or service marks of others. 
  15226.  
  15227.  
  15228. ΓòÉΓòÉΓòÉ 12. Glossary ΓòÉΓòÉΓòÉ
  15229.  
  15230.  
  15231. ΓòÉΓòÉΓòÉ <hidden> Glossary ΓòÉΓòÉΓòÉ
  15232.  
  15233. Select the starting letter of the glossary term you want to locate. 
  15234.  
  15235.  
  15236. ΓòÉΓòÉΓòÉ <hidden> A ΓòÉΓòÉΓòÉ
  15237.  
  15238.  AB roll  - Synchronized playback of two recorded video images so that one can 
  15239.    perform effects, such as dissolves, wipes, or inserts, using both images 
  15240.    simultaneously. 
  15241.  
  15242.  ACPA  - Audio capture and playback adapter. 
  15243.  
  15244.  active matrix  - A technology that gives every pel (dot) on the screen its own 
  15245.    transistor to control it more accurately.  (This allows for better contrast 
  15246.    and less motion smearing.) 
  15247.  
  15248.  adaptive differential pulse code modulation  - A bit-rate reduction technique 
  15249.    where the difference in pulse code modulation samples are not compressed 
  15250.    before being stored. 
  15251.  
  15252.  ADC  - Analog-to-digital converter. 
  15253.  
  15254.  ADPCM  - Adaptive differential pulse code modulation. 
  15255.  
  15256.  aliasing  - The phenomenon of generating a false (alias) frequency, along with 
  15257.    the correct one, as an artifact of sampling a signal at discrete points.  In 
  15258.    audio, this produces a "buzz."  In imagery, this produces a jagged edge, or 
  15259.    stair-step effect. See also moire. 
  15260.  
  15261.  all points addressable (APA)  - In computer graphics, pertaining to the 
  15262.    ability to address and display or not display each picture element on a 
  15263.    display surface. 
  15264.  
  15265.  AM  - Animation metafile. 
  15266.  
  15267.  ambience  - In audio, the reverberation pattern of a particular concert hall, 
  15268.    or listening space. 
  15269.  
  15270.  ambient noise  - In acoustics, the noise associated with a particular 
  15271.    environment, usually a composite of sounds from many distant or nearby 
  15272.    sources. 
  15273.  
  15274.  American National Standards Institute (ANSI)  - An organization consisting of 
  15275.    producers, consumers, and general interest groups, that establishes the 
  15276.    procedures by which accredited organizations create and maintain voluntary 
  15277.    industry standards in the United States. 
  15278.  
  15279.  AMF  - Animation metafile format. 
  15280.  
  15281.  amp  - See amplifier. 
  15282.  
  15283.  amplifier  - (1) A device that increases the strength of input signals (either 
  15284.    voltage or current). (2) Also referred to as an amp. 
  15285.  
  15286.  amp-mixer  - (1) A combination amplifier and mixer that is used to control the 
  15287.    characteristics of an audio signal from one or more audio sources. (2) Also 
  15288.    referred to as an amplifier-mixer. 
  15289.  
  15290.  analog  - Pertaining to data consisting of continuously variable physical 
  15291.    quantities. Contrast with digital. 
  15292.  
  15293.  analog audio  - Audio in which all information representing sounds is stored 
  15294.    or transmitted in a continuous-scale electrical signal, such as line level 
  15295.    audio in stereo components. See also digital audio. 
  15296.  
  15297.  analog-to-digital converter (ADC)  - A functional unit that converts data from 
  15298.    an analog representation to a digital representation. (I) (A) 
  15299.  
  15300.  analog video  - Video in which all the information representing images is in a 
  15301.    continuous-scale electrical signal for both amplitude and time. See also 
  15302.    digital video. 
  15303.  
  15304.  analog video overlay  - See overlay. 
  15305.  
  15306.  anchor  - An area of a display screen that is activated to accept user input. 
  15307.    Synonymous with hot spot, touch area, and trigger. 
  15308.  
  15309.  animate  - Make or design in such a way as to create apparently spontaneous, 
  15310.    lifelike movement. 
  15311.  
  15312.  animated  - Having the appearance of something alive. 
  15313.  
  15314.  animated screen capture  - Recording a computing session for replay on a 
  15315.    similar computer with voice annotation.  (An example is sending a 
  15316.    spreadsheet with an accompanying screen recording as an explanation and 
  15317.    overview.) 
  15318.  
  15319.  animatic  - A limited animation consisting of artwork shot on film or 
  15320.    videotape and edited to serve as an on-screen storyboard. 
  15321.  
  15322.  animation metafile  - A compound file format, the elements of which are the 
  15323.    frames of animation themselves.  These frames are stored sequentially so 
  15324.    that they can be played back in time by streaming to the video agent. 
  15325.  
  15326.  animation metafile format (AMF)  - The file format used to store animated 
  15327.    frame sequences. 
  15328.  
  15329.  annotation  - The linking of an object with another, where the second contains 
  15330.    some information related to the first.  For example, an audio annotation of 
  15331.    a spreadsheet cell might contain verbal explanation about the contents of 
  15332.    the cell. 
  15333.  
  15334.  ANSI  - American National Standards Institute. 
  15335.  
  15336.  anthropomorphic software agent  - The concept of a simulated agent, seemingly 
  15337.    living inside the computer, that talks to and listens to the user, and then 
  15338.    acts for the user on command. 
  15339.  
  15340.  antialiasing  - (1) In imagery, using several intensities of colors (a ramp) 
  15341.    between the color of the line and the background color to create the effect 
  15342.    of smoother curves and fewer jagged edges on curves and diagonals. (2) In 
  15343.    imagery or audio, removing aliases by eliminating frequencies above half the 
  15344.    sample frequencies. 
  15345.  
  15346.  AOCA  - Audio Object Content Architecture. 
  15347.  
  15348.  APA  - All points addressable. 
  15349.  
  15350.  APA graphics  - All Points Addressable graphics. See bitmap graphics. 
  15351.  
  15352.  API  - Application programming interface. 
  15353.  
  15354.  application programming interface (API)  - A functional interface supplied by 
  15355.    the operating system or an IBM separately orderable licensed program that 
  15356.    allows an application program written in a high-level language to use 
  15357.    specific data or functions of the operating system or the licensed program. 
  15358.  
  15359.  application-supplied video window  - (1) An application can specify to MMPM/2 
  15360.    that it wants video played in a specific window (controlled by the 
  15361.    application) instead of the default window (controlled by MMPM/2).  The 
  15362.    application supplied video window can be used to implement advanced features 
  15363.    not supported by the default video window. (2) Also referred to as an 
  15364.    alternate video window. 
  15365.  
  15366.  artifact  - A product resulting from human activity; in computer activity, a 
  15367.    (usually unwanted) by-product of a process. 
  15368.  
  15369.  aspect ratio  - (1) On a display screen, the ratio of the maximum length of a 
  15370.    display line to the maximum length of a display column. (2) The ratio of 
  15371.    height to width.  (This term applies to areas or individual pels.)  Refer to 
  15372.    enhanced graphics adapter and video graphics adapter. 
  15373.  
  15374.  asymmetric video compression  - In multimedia applications, the use of a 
  15375.    powerful computer to compress a video for mastering so that a less powerful 
  15376.    (less expensive) system is needed to decompress it. Contrast with symmetric 
  15377.    video compression. 
  15378.  
  15379.  audible cue  - A sound generated by the computer to draw a user's attention 
  15380.    to, or provide feedback about, an event or state of the computer.  Audible 
  15381.    cues enhance and reinforce visible cues. 
  15382.  
  15383.  audio  - Pertaining to the portion of recorded information that can be heard. 
  15384.  
  15385.  audio attribute control  - Provides access to and operation of the standard 
  15386.    audio attributes: mute, volume, balance, treble, and bass. All device 
  15387.    communication and user interface support is handled by the control. 
  15388.  
  15389.  audio attributes  - Refers to the standard audio attributes: mute, volume, 
  15390.    balance, treble and bass. 
  15391.  
  15392.  audio clip  - A section of recorded audio material. 
  15393.  
  15394.  Audio Object Content Architecture  - A data format for multimedia products. 
  15395.  
  15396.  audio processing  - Manipulating digital audio to, for example, edit or create 
  15397.    special effects. 
  15398.  
  15399.  audio segment  - A contiguous set of recorded data from an audio track.  An 
  15400.    audio segment might or might not be associated with a video segment. 
  15401.  
  15402.  audio track  - (1) The audio (sound) portion of the program. (2) The physical 
  15403.    location where the audio is placed beside the image.  (A system with two 
  15404.    audio tracks can have either stereo sound or two independent audio tracks.) 
  15405.    (3) Synonym for sound track. 
  15406.  
  15407.  audiovisual  - A generic term referring to experiences, equipment, and 
  15408.    materials used for communication that make use of both hearing and sight. 
  15409.  
  15410.  Audio Visual Connection* (AVC)  - An authoring system used on an IBM PS/2* to 
  15411.    develop and display audiovisual productions. 
  15412.  
  15413.  audiovisual computer program  - A computer program that makes use of both 
  15414.    hearing and sight. 
  15415.  
  15416.  authoring  - A structured approach to combining all media elements within an 
  15417.    interactive production, assisted by computer software designed for this 
  15418.    purpose. 
  15419.  
  15420.  authoring system  - A set of tools used to create an interactive multimedia 
  15421.    application without implementing formal programming. 
  15422.  
  15423.  AVI file format  - The Audio/Video Interleaved (AVI) file format is the 
  15424.    standard file format used to support software motion video.  AVI files can 
  15425.    contain multiple streams (tracks) of data (for example, a video and an audio 
  15426.    stream).  The streams are interleaved to improve access times during 
  15427.    playback.  The present implementation is limited to a single video stream 
  15428.    and a single, optional, audio stream. 
  15429.  
  15430.  
  15431. ΓòÉΓòÉΓòÉ <hidden> B ΓòÉΓòÉΓòÉ
  15432.  
  15433.  background image  - The part of a display image, such as a form overlay, that 
  15434.    is not changed during a particular sequence of transactions. Contrast with 
  15435.    foreground image. 
  15436.  
  15437.  background music  - In videotaping, music that accompanies dialog or action. 
  15438.  
  15439.  balance  - For audio, refers to the relative strength of the left and right 
  15440.    channels.  A balance level of 0 is left channel only.  A balance level of 
  15441.    100 is right channel only. 
  15442.  
  15443.  basic input/output system (BIOS)  - In an IBM personal computer, microcode 
  15444.    that controls basic hardware operations, such as interactions with diskette 
  15445.    drives, hard disk drives, and the keyboard.  (For example, the IBM Enhanced 
  15446.    Graphics Adapter has an addressable BIOS, located on the adapter itself, 
  15447.    that is used to control the IBM InfoWindow* graphics functions.) 
  15448.  
  15449.  beta format  - A consumer and industrial 0.5-inch tape format. 
  15450.  
  15451.  BG  - Script abbreviation for background. 
  15452.  
  15453.  BIOS  - Basic input/output system. 
  15454.  
  15455.  bitmap  - A coded representation in which each bit, or group of bits, 
  15456.    represents or corresponds to an item, for example, a configuration of bits 
  15457.    in main storage in which each bit indicates whether a peripheral device or a 
  15458.    storage block is available or in which each group of bits corresponds to one 
  15459.    pel of a display image. 
  15460.  
  15461.  bit-block transfer  - Transfer of a rectangular array of bitmap data. 
  15462.  
  15463.  bitblt  - Bit-block transfer.  Synonym for blit. 
  15464.  
  15465.  bitmap graphics  - A form of graphics whereby all points on the display are 
  15466.    directly addressable. See also all points addressable. 
  15467.  
  15468.  blit  - Synonym for bitblt. 
  15469.  
  15470.  blitter  - Hardware that performs bit-block transfer operations. 
  15471.  
  15472.  BND  - (1) An internal I/O procedure, provided by the MMPM/2 system, that 
  15473.    supports RIFF compound files (commonly called bundle files). (2) The 
  15474.    four-character code (FOURCC) of a bundle file. (3) See also RIFF compound 
  15475.    file. 
  15476.  
  15477.  BND file  - A RIFF compound file. 
  15478.  
  15479.  BND IOProc  - An internal I/O procedure, provided by the MMPM/2 system, that 
  15480.    supports the elements in a RIFF compound file. See also CF IOProc. 
  15481.  
  15482.  boom  - A long, relatively horizontal supporting brace used for holding a 
  15483.    microphone or camera; sometimes used to refer to the machinery that supports 
  15484.    the camera and allows it to move while shooting. 
  15485.  
  15486.  brightness  - Refers to the level of luminosity of the video signal. A 
  15487.    brightness level of 0 produces a maximally white signal.  A brightness level 
  15488.    of 100 produces a maximally black signal. 
  15489.  
  15490.  buffer  - A portion of storage used to hold input or output data temporarily. 
  15491.  
  15492.  bundle file (BND)  - (1) A file that contains many individual files, called 
  15493.    file elements, bound together.  The MMIO file manager provides services to 
  15494.    locate, query, and access file elements in a bundle file. (2) A RIFF 
  15495.    compound file. 
  15496.  
  15497.  bus  - A facility for transferring data between several devices located 
  15498.    between two end points, only one device being able to transmit at a given 
  15499.    moment. 
  15500.  
  15501.  buy  - (1) In videotaping, footage that is judged acceptable for use in the 
  15502.    final video. (2) Synonym for keeper. 
  15503.  
  15504.  
  15505. ΓòÉΓòÉΓòÉ <hidden> C ΓòÉΓòÉΓòÉ
  15506.  
  15507.  CAI  - Computer-assisted instruction.  Synonym for CBT. 
  15508.  
  15509.  calibration  - The adjustment of a piece of equipment so that it meets normal 
  15510.    operational standards.  (For example, for the IBM InfoWindow system, 
  15511.    calibration refers to touching a series of points on the screen so that the 
  15512.    system can accurately determine their location for further reference.) 
  15513.  
  15514.  camcorder  - A compact, hand-held video camera with integrated videotape 
  15515.    recorder. 
  15516.  
  15517.  capture  - To take a snapshot of motion video and retain it in memory.  The 
  15518.    video image may then be saved to a file or restored to the display. 
  15519.  
  15520.  cast animation  - (1) A sequence of frames consisting of manipulations of 
  15521.    graphical objects. (2) The action of bringing a computer program, routine, 
  15522.    or subroutine into effect, usually by specifying the entry conditions and 
  15523.    jumping to an entry point. (3) See also frame animation. 
  15524.  
  15525.  CAV  - Constant angular velocity. 
  15526.  
  15527.  CBT  - Computer-based training.  Synonym for CAI. 
  15528.  
  15529.  CCITT  - Comite Consultatif International Telegraphique et Telephonique. The 
  15530.    International Telegraph and Telephone Consultative Committee. 
  15531.  
  15532.  CD  - Compact disc. 
  15533.  
  15534.  CD-DA  - Compact disc, digital audio. 
  15535.  
  15536.  CD-I  - Compact Disc-Interactive. 
  15537.  
  15538.  CD-ROM  - Compact disc, read-only memory. 
  15539.  
  15540.  CD-ROM XA  - Compact disc, read-only memory extended architecture. 
  15541.  
  15542.  cel  - A single frame (display screen) of an animation.  (The term originated 
  15543.    in cartooning days when the artist drew each image on a sheet of celluloid 
  15544.    film.) 
  15545.  
  15546.  CF IOProc  - An internal I/O procedure, provided by the MMPM/2 system, that 
  15547.    supports RIFF compound files.  The CF IOProc operates on the entire compound 
  15548.    file (rather than on the elements in a RIFF compound file, as with the BND 
  15549.    IOProc).  The CF IOProc is limited to operations required by the system to 
  15550.    ensure storage system transparency at the application level. See also BND 
  15551.    IOProc. 
  15552.  
  15553.  CGA  - Color graphics adapter. 
  15554.  
  15555.  CGRP  - Compound file resource group. 
  15556.  
  15557.  channel mapping  - The translation of a MIDI channel number for a sending 
  15558.    device to an appropriate channel for a receiving device. 
  15559.  
  15560.  channel message  -  A type of non-SysEx MIDI message that has a channel 
  15561.    identifier in it, implying that these messages are specific to one channel. 
  15562.  
  15563.  check disc  - A videodisc produced from the glass master that is used to check 
  15564.    the quality of the finished interactive program. 
  15565.  
  15566.  chord  - To press more than one button at a time on a pointing device. 
  15567.  
  15568.  chroma-key color  - The specified first color in a combined signal. See also 
  15569.    chroma-keying. 
  15570.  
  15571.  chroma-keying  - Combining two video signals that are in sync.  The combined 
  15572.    signal is the second signal whenever the first is of some specified color, 
  15573.    called the chroma-key color, and is the first signal otherwise.  (For 
  15574.    example, the weatherman stands in front of a blue background-blue is the 
  15575.    chroma-key color.)  At home, the TV viewer sees the weather map in place of 
  15576.    the chroma-key color, with the weatherman suspended in front. 
  15577.  
  15578.  chroma signal  - The portion of image information that provides the color (hue 
  15579.    and saturation). 
  15580.  
  15581.  chrominance  - The difference between a color and a reference white of the 
  15582.    same luminous intensity. 
  15583.  
  15584.  chunk  - (1) The basic building block of a RIFF file. (2) A RIFF term for a 
  15585.    formalized data area.  There are different types of chunks, depending on the 
  15586.    chunk ID. (3) See LIST chunk and RIFF chunk. 
  15587.  
  15588.  chunk ID  - A four-character code (FOURCC) that identifies the representation 
  15589.    of the chunk data. 
  15590.  
  15591.  circular slider control  - A knob-like control that performs like a control on 
  15592.    a TV or stereo. 
  15593.  
  15594.  circular slider knob  - A knob-like dial that operates like a control on a 
  15595.    television or stereo. 
  15596.  
  15597.  class  -  (1) A categorization or grouping of objects that share similar 
  15598.    behaviors and characteristics.  Synonym for object class. (2) See node 
  15599.    class.  (RTMIDI-specific term) 
  15600.  
  15601.  click  - To press and release a button on a pointing device without moving the 
  15602.    pointer off the choice. See double-click. See also drag select. 
  15603.  
  15604.  clip  - A section of recorded, filmed, or videotaped material.  See also audio 
  15605.    clip and video clip. 
  15606.  
  15607.  closed circuit  - A system of transmitting television signals from a point of 
  15608.    origin to one or many restricted destination points specially equipped to 
  15609.    receive the signals. 
  15610.  
  15611.  close-up  - In videotaping, the picture obtained when the camera is positioned 
  15612.    to show only the head and shoulders of a subject; in the case of an object, 
  15613.    the camera is close enough to show details clearly. See also extreme 
  15614.    close-up. 
  15615.  
  15616.  CLP  - Common loader primitive. 
  15617.  
  15618.  CLUT  - Color look-up table.  Synonym for color palette. 
  15619.  
  15620.  CLV  - Constant linear velocity. 
  15621.  
  15622.  CODEC  - compressor/decompressor (CODEC) -  An algorithm implemented either in 
  15623.    hardware or software that can either compress or decompress a data object. 
  15624.    For example, a CODEC can compress raw digital images into a smaller form so 
  15625.    that they use less storage space. When used in the context of playing motion 
  15626.    video, decompressors reconstruct the original image from the compressed 
  15627.    data.  This is done at a high rate of speed to simulate motion. 
  15628.  
  15629.  collaborative document production  - A system feature that provides the 
  15630.    ability for a group of people to manage document production. 
  15631.  
  15632.  collision  - An unwanted condition that results from concurrent transmissions 
  15633.    on a channel. (T)  (For example, an overlapping condition that occurs when 
  15634.    one sprite hides another as it passes over it.) 
  15635.  
  15636.  color cycling  - An animation effect in which colors in a series are displayed 
  15637.    in rapid succession. 
  15638.  
  15639.  color graphics adapter (CGA)  - An adapter that simultaneously provides four 
  15640.    colors and is supported on all IBM Personal Computer and Personal System/2* 
  15641.    models. 
  15642.  
  15643.  colorization  - The color tinting of a monochrome original. 
  15644.  
  15645.  color palette  - (1) A set of colors that can be displayed on the screen at 
  15646.    one time.  This can be a standard set used for all images or a set that can 
  15647.    be customized for each image. (2) Synonym for CLUT. (3) See also standard 
  15648.    palette and custom palette. 
  15649.  
  15650.  common loader primitive  - A system service that provides a high-level 
  15651.    interface to hardware-specific loaders. 
  15652.  
  15653.  common user access (CUA)  - (1) Guidelines for the dialog between a human and 
  15654.    a workstation or terminal. (2) One of the three SAA architectural areas. 
  15655.  
  15656.  compact disc (CD)  - A disc, usually 4.75 inches in diameter, from which data 
  15657.    is read optically by means of a laser. 
  15658.  
  15659.  compact disc, digital audio (CD-DA)  - The specification for audio compact 
  15660.    discs. See also Redbook audio. 
  15661.  
  15662.  Compact Disc-Interactive (CD-I)  - A low-cost computer, being developed by 
  15663.    N.V. Phillips (The Netherlands) and Sony (Japan), that plugs into standard 
  15664.    television sets to display text and video stored on compact discs. 
  15665.  
  15666.  compact disc, read-only memory (CD-ROM)  - High-capacity, read-only memory in 
  15667.    the form of an optically read compact disc. 
  15668.  
  15669.  compact disc, read-only memory extended architecture (CD-ROM XA)  - An 
  15670.    extension to CD-ROM supporting additional audio and video levels for 
  15671.    compression and interlacing of audio, video, and digital data. 
  15672.  
  15673.  component video  - A video signal using three signals, one of which is 
  15674.    luminance, and the other two of which are the color vectors. See also 
  15675.    composite video and S-video. 
  15676.  
  15677.  composed view  - A view of an object in which relationships of the parts 
  15678.    contribute to the overall meaning.  Composed views are provided primarily 
  15679.    for data objects. 
  15680.  
  15681.  composite  - The combination of two or more film, video, or electronic images 
  15682.    into a single frame or display. See also composite video. 
  15683.  
  15684.  composite monitor  - A monitor that can decode a color image from a single 
  15685.    signal, such as NTSC or PAL. Contrast with RGB. 
  15686.  
  15687.  composite object  - An object that contains other objects.  For example, a 
  15688.    document object that contains not only text, but graphics, audio, image, 
  15689.    and/or video objects, each of which can be manipulated separately as an 
  15690.    individual object. 
  15691.  
  15692.  composite video  - A single signal composed of chroma, luminance, and sync. 
  15693.    NTSC is the composite video that is currently the U.S. standard for 
  15694.    television. See also component video and S-video. 
  15695.  
  15696.  compound device  - A multimedia device model for hardware that requires 
  15697.    additional data objects, referred to as data elements, before multimedia 
  15698.    operations can be performed. 
  15699.  
  15700.  compound file  - A file that contains multiple file elements. 
  15701.  
  15702.  compound file resource group (CGRP)  - A RIFF chunk that contains all the 
  15703.    compound file elements, concatenated together. 
  15704.  
  15705.  compound file table of contents (CTOC)  - A RIFF chunk that indexes the CGRP 
  15706.    chunk, which contains the actual multimedia data elements.  Each entry 
  15707.    contains the name of, and other information about, the element, including 
  15708.    the offset of the element within the CGRP chunk.  All the CTOC entries of a 
  15709.    table are of the same length and can be specified when the file is created. 
  15710.  
  15711.  compound message  - A structure which combines a time stamp, a source instance 
  15712.    identifier, a track number, and a MIDI message.  Each of these fields is 32 
  15713.    bits, so the structure is 16 bytes in length.  (RTMIDI-specific term) 
  15714.  
  15715.  computer-animated graphics  - Graphics animated by using a computer, compared 
  15716.    to using videotape or film. 
  15717.  
  15718.  computer-assisted instruction (CAI)  - (1) A data processing application in 
  15719.    which a computing system is used to assist in the instruction of students. 
  15720.    The application usually involves a dialog between the student and a computer 
  15721.    program.  An example is the OS/2 tutorial. (2) Synonym for computer-based 
  15722.    training. 
  15723.  
  15724.  computer-based training (CBT)  - Synonym for computer-assisted instruction. 
  15725.  
  15726.  computer-controlled device  - An external video source device with 
  15727.    frame-stepping capability, usually a videodisc player, whose output can be 
  15728.    controlled by the multimedia subsystem. 
  15729.  
  15730.  conforming  - Performing final editing on film or video using an offline 
  15731.    edited master as a guide. 
  15732.  
  15733.  connection  - The establishment of the flow of information from a connector on 
  15734.    one device to a compatible connector on another device. A connection can be 
  15735.    made that is dependent on a physical connection, for example the attachment 
  15736.    of a speaker to an audio adapter with a speaker wire.  A connection can also 
  15737.    be made that is completely internal to the PC, such as the connection 
  15738.    between the waveaudio media device and the ampmix device. See also 
  15739.    connector. 
  15740.  
  15741.  connector  - A software representation of the physical way in which multimedia 
  15742.    data moves from one device to another. A connector can have an external 
  15743.    representation, such as a headphone jack on a CD-ROM player. A connector can 
  15744.    also have an internal representation, such as the flow of digital 
  15745.    information into an audio adapter. See also connection. 
  15746.  
  15747.  constant angular velocity (CAV)  - Refers to both the format of data stored on 
  15748.    a videodisc and the videodisc player rotational characteristics.  CAV 
  15749.    videodiscs contain 1 frame per track.  This allows approximately 30 minutes 
  15750.    of playing time per videodisc side.  CAV videodisc players spin at a 
  15751.    constant rotational speed (1800 rpm for NTSC or 1500 rpm for PAL) and play 1 
  15752.    frame per disc revolution.  CAV players support frame-accurate searches. See 
  15753.    also constant linear velocity. 
  15754.  
  15755.  constant linear velocity (CLV)  - Refers to both the format of data stored on 
  15756.    a videodisc and the videodisc player characteristics.  CLV videodiscs 
  15757.    contain 1 frame on the innermost track and 3 frames of data on the outermost 
  15758.    track.  This allows approximately 1 hour of playing time per videodisc side. 
  15759.    CLV videodisc players vary the rotational speed from approximately 1800 rpm 
  15760.    at the inner tracks to 600 rpm at the outer tracks (for NTSC). 
  15761.  
  15762.    Currently, few CLV players support frame-accurate searches They only support 
  15763.    search or play to within one second (30 frames for NTSC or 25 frames for 
  15764.    PAL). See also constant angular velocity. 
  15765.  
  15766.  container  - An object whose specific purpose is to hold other objects.  A 
  15767.    folder is an example of a container object. 
  15768.  
  15769.  contents view  - A view of an object that shows the contents of the object in 
  15770.    list form.  Contents views are provided for container objects and for any 
  15771.    object that has container behavior, for example, a device object such as a 
  15772.    printer. 
  15773.  
  15774.  continuity  - In videotaping, consistency maintained from shot to shot and 
  15775.    throughout the take.  For example, a switch that is on in one shot should 
  15776.    not be off in the next unless it was shown being turned off. 
  15777.  
  15778.  continuous media object  - A data object that varies over time; a 
  15779.    stream-oriented data object.  Examples include audio, animation, and video. 
  15780.  
  15781.  contrast  - The difference in brightness or color between a display image and 
  15782.    the area in which it is displayed. A contrast level of 0 is minimum 
  15783.    difference. A contrast level of 100 is maximum difference. 
  15784.  
  15785.  control  - A visual user interface component that allows a user to interact 
  15786.    with data. 
  15787.  
  15788.  coordinate graphics  - (1) Computer graphics in which display images are 
  15789.    generated from display commands and coordinate data. (2) Contrast with 
  15790.    raster graphics. (3) Synonym for line graphics. 
  15791.  
  15792.  crop  - To cut off; to trim (for example, a tape). 
  15793.  
  15794.  crossfade  - Synonym for dissolve. 
  15795.  
  15796.  cross-platform  - Used to describe applications that are operable with more 
  15797.    than one operating system. 
  15798.  
  15799.  cross-platform transmission  - Electronic transmission of information (such as 
  15800.    mail) between incompatible operating systems. 
  15801.  
  15802.  CTOC  - Compound file table of contents. 
  15803.  
  15804.  CU  - Script abbreviation for close-up. 
  15805.  
  15806.  CUA  - Common User Access. 
  15807.  
  15808.  cue point  - A point that the system recognizes as a signal that may be acted 
  15809.    upon. 
  15810.  
  15811.  custom palette  - (1) A set of colors that is unique to one image or one 
  15812.    application. (2) See also standard palette and color palette. 
  15813.  
  15814.  cut  - The procedure of instantly replacing a picture from one source with a 
  15815.    picture from another.  (This is the most common form of editing scene to 
  15816.    scene.) 
  15817.  
  15818.  
  15819. ΓòÉΓòÉΓòÉ <hidden> D ΓòÉΓòÉΓòÉ
  15820.  
  15821.  DAC  - Digital-to-analog converter. 
  15822.  
  15823.  data object  - In an application, an element of a data structure (such as a 
  15824.    file, an array, or an operand) that is needed for program execution and that 
  15825.    is named or otherwise specified by the allowable character set of the 
  15826.    language in which the program is coded. 
  15827.  
  15828.  data stream  - All data transmitted through a data channel. 
  15829.  
  15830.  data streaming  - Real-time, continuous flowing of data. 
  15831.  
  15832.  DCP  -  See device control panel. 
  15833.  
  15834.  decode  - (1) To convert data by reversing the effect of previous encoding. 
  15835.    (2) To interpret a code. (3) To convert encoded text into plaintext by means 
  15836.    of a code system. (4) Contrast with encode. 
  15837.  
  15838.  default video window  - (1) Refers to where video is displayed when an 
  15839.    application does not indicate an application-defined window with the 
  15840.    MCI_WINDOW message. This is provided by and managed for the application by 
  15841.    MMPM/2. (2) See also application-defined window. 
  15842.  
  15843.  default window  - See default video window. 
  15844.  
  15845.  delta frame  - Refers to one or more frames occurring between reference frames 
  15846.    in the output stream.  Unlike a reference frame, which stores a complete 
  15847.    image, a delta frame stores only the changes in the image from one frame to 
  15848.    the next. See reference frame. 
  15849.  
  15850.  destination rectangle  - An abstract region which defines the size of an image 
  15851.    to be created when recording images for software motion video playback.  The 
  15852.    ratio of this rectangle's size to that of the source rectangle determines 
  15853.    the scaling factor to be applied to the video. 
  15854.  
  15855.  destination window  - See destination rectangle. 
  15856.  
  15857.  device capabilities  - The functionality of a device, including supported 
  15858.    component functions. 
  15859.  
  15860.  device context  - The device status and characteristics associated with an 
  15861.    opened instance of an Media Control Interface device. 
  15862.  
  15863.  device control panel (DCP)  -  An integrated set of controls that is used to 
  15864.    control a device or media object (such as by playing, rewinding, increasing 
  15865.    volume, and so on). 
  15866.  
  15867.  device controls  - See standard multimedia device controls. 
  15868.  
  15869.  device driver  - (1) A file that contains the code needed to use an attached 
  15870.    device. (2) A program that enables a computer to communicate with a specific 
  15871.    peripheral device; for example, a printer, a videodisc player, or a CD 
  15872.    drive. 
  15873.  
  15874.  device element  - A data object, such as a file, utilized by a compound 
  15875.    device. 
  15876.  
  15877.  device object  -  An object that provides a means for communication between a 
  15878.    computer and the outside world.  A printer is an example of a device object. 
  15879.  
  15880.  device sharing  - (1) The ability to share a device among many different 
  15881.    applications simultaneously.  If a device is opened shareable, the device 
  15882.    context will be saved by the operating system when going from one 
  15883.    application to another application. (2) Allowing a device context to be 
  15884.    switched between Media Control Interface devices. 
  15885.  
  15886.  device-specific format  - The storage or transmission format used by a device, 
  15887.    especially if it is different from an accepted standard. 
  15888.  
  15889.  dialog  - In an interactive system, a series of related inquiries and 
  15890.    responses similar to a conversation between two people. 
  15891.  
  15892.  digital  - (1) Pertaining to data in the form of numeric characters. (2) 
  15893.    Contrast with analog. 
  15894.  
  15895.  digital audio  - (1) Material that can be heard that has been converted to 
  15896.    digital form. (2) Synonym for digitized audio. 
  15897.  
  15898.  digital signal processor (DSP)  - A high-speed coprocessor designed to do 
  15899.    real-time manipulation of signals. 
  15900.  
  15901.  digital video  - (1) Material that can be seen that has been converted to 
  15902.    digital form. (2) Synonym for digitized video. 
  15903.  
  15904.  digital video effects (DVE)  - An online editing technique that manipulates 
  15905.    on-screen a full video image; activity for creating sophisticated 
  15906.    transitions and special effects.  Digital video effects (DVE) can involve 
  15907.    moving, enlarging, or overlaying pictures. 
  15908.  
  15909.  Digital Video Interactive (DVI)  - A system for bringing full-screen, 
  15910.    full-motion television pictures and sound to a regular PC.  DVI is a chip 
  15911.    set and uses delta compression; that is, only the image-to-image changes in 
  15912.    each frame are saved rather than the whole frame.  Data (video footage) is 
  15913.    compressed into a form that reduces memory requirements by factors of 100 or 
  15914.    greater.  This compressed data is stored on optical discs and can be 
  15915.    retrieved at a rate of 30 frames per second.  (The DVI technology was 
  15916.    developed by RCA and then sold to Intel.  IBM has chosen this technology for 
  15917.    future use in the PS/2.) 
  15918.  
  15919.  digital-to-analog converter (DAC)  - (1) A functional unit that converts data 
  15920.    from a digital representation to an analog representation. (2) A device that 
  15921.    converts a digital value to a proportional analog signal. 
  15922.  
  15923.  digitize  - To convert an analog signal into digital format. (An analog signal 
  15924.    during conversion must be sampled at discrete points and quantized to 
  15925.    discrete numbers.) 
  15926.  
  15927.  digitized audio  - Synonym for digital audio. 
  15928.  
  15929.  digitized video  - Synonym for digital video. 
  15930.  
  15931.  digitizer  - A device that converts to digital format any image captured by 
  15932.    the camera. 
  15933.  
  15934.  direct manipulation  -  A set of techniques that allow a user to work with an 
  15935.    object by dragging it with a pointing device or interacting with its pop-up 
  15936.    menu. 
  15937.  
  15938.  direct memory access  - The transfer of data between memory and input and 
  15939.    output units without processor intervention. 
  15940.  
  15941.  direct-read-after-write (DRAW) disc  - A videodisc produced directly from a 
  15942.    videotape, one copy at a time.  A DRAW disc usually is used to check program 
  15943.    material and author applications before replicated discs are available. 
  15944.  
  15945.  disc  - Alternate spelling for disk. 
  15946.  
  15947.  discard stop  - In data streaming, requests that the data stream be stopped 
  15948.    and the data remaining in the stream buffers be discarded. 
  15949.  
  15950.  disk  - A round, flat, data medium that is rotated in order to read or write 
  15951.    data. 
  15952.  
  15953.  display image  - A collection of display elements or segments that are 
  15954.    represented together at any one time on a display surface. See also 
  15955.    background image and foreground image. 
  15956.  
  15957.  dissolve  - To fade down one picture as the next fades up. Synonym for 
  15958.    crossfade. 
  15959.  
  15960.  dithering  - When different pixels in an image are prebiased with a varying 
  15961.    threshold to produce a more continuous gray scale despite a limited palette. 
  15962.    This technique is used to soften a color line or shape.  This technique also 
  15963.    is used for alternating pixel colors to create the illusion of a third 
  15964.    color. 
  15965.  
  15966.  DLL  - Dynamic-link library. 
  15967.  
  15968.  dolly  - A wheeled platform for a camera; a camera movement where the tripod 
  15969.    on which the camera is mounted physically moves toward or away from the 
  15970.    subject. 
  15971.  
  15972.  DOS IOProc  - An internal I/O procedure, provided by the MMPM/2 system, that 
  15973.    supports DOS files. 
  15974.  
  15975.  double-click  - In SAA Advanced Common User Access, to press and release a 
  15976.    mouse button twice within a time frame defined by the user, without moving 
  15977.    the pointer off the choice. See click.  See also drag select. 
  15978.  
  15979.  drag select  - In SAA Advanced Common User Access, to press a mouse button and 
  15980.    hold it down while moving the pointer so that the pointer travels to a 
  15981.    different location on the screen. Dragging ends when the mouse button is 
  15982.    released. All items between the button-down and button-up points are 
  15983.    selected. See also click, double-click. 
  15984.  
  15985.  DRAW disc  - Direct-read-after-write disc. 
  15986.  
  15987.  drop-frame time code  - A nonsequential time code used to keep tape time code 
  15988.    matched to real time. Must not be used in tapes intended for videodisc 
  15989.    mastering. 
  15990.  
  15991.  DSP  - Digital signal processor. 
  15992.  
  15993.  DTMF  - Dual-tone modulation frequency. 
  15994.  
  15995.  dual plane video system  - Refers to when graphics from the graphics adapter 
  15996.    are separate from the analog video.  That is, there is a separate graphics 
  15997.    plane and video plane. The analog video appears behind the graphics, showing 
  15998.    through only in the areas that are transparent. Since graphics and video are 
  15999.    separate, capturing the graphics screen will only obtain graphics, and 
  16000.    capturing the video screen will  only obtain video.  This is also true for 
  16001.    restoring images. See also single plane video system. 
  16002.  
  16003.  dual-state push button  -  A push button that has two states, in and out.  It 
  16004.    is used for setting and resetting complementary states, such as Mute and 
  16005.    Unmute. 
  16006.  
  16007.  dual-tone modulation frequency (DTMF)  - Pushbutton phone tones. 
  16008.  
  16009.  dub  - To copy a tape; to add (sound effects or new dialog) to a film; to 
  16010.    provide a new audio track of dialog in a different language.  (Often used 
  16011.    with "in" as "dub in".) 
  16012.  
  16013.  DVE  - Digital video effects. 
  16014.  
  16015.  DVI  - Digital Video Interface 
  16016.  
  16017.  dynamic icon  - An icon that changes to convey some information about the 
  16018.    object that it represents.  For example, a folder icon can show a count, 
  16019.    indicating the number of objects contained within the folder.  Also, a tape 
  16020.    player icon can show an animation of turning wheels to indicate that the 
  16021.    machine playing. 
  16022.  
  16023.  dynamic linking  - In the OS/2 operating system, the delayed connection of a 
  16024.    program to a routine until load time or run time. 
  16025.  
  16026.  dynamic link library (DLL)  - A file containing executable code and data bound 
  16027.    to a program at load time or run time, rather than during linking. The code 
  16028.    and data in a dynamic link library can be shared by several applications 
  16029.    simultaneously. 
  16030.  
  16031.  dynamic resource allocation  - An allocation technique in which the resources 
  16032.    assigned for execution of computer programs are determined by criteria 
  16033.    applied at the moment of need. (I)  (A)
  16034.  
  16035.  dynamic resource  - A multimedia program unit of data that resides in system 
  16036.    memory. Contrast with static resource. 
  16037.  
  16038.  
  16039. ΓòÉΓòÉΓòÉ <hidden> E ΓòÉΓòÉΓòÉ
  16040.  
  16041.  earcon  - An icon with an audio enhancement, such as a ringing telephone. 
  16042.  
  16043.  ECB  -  Event control block. 
  16044.  
  16045.  ECU  - Script abbreviation for extreme close-up. 
  16046.  
  16047.  edit decision list (EDL)  - Synonym for edit list. 
  16048.  
  16049.  edit list  - A list of the specific video footage, with time-code numbers, 
  16050.    that will be edited together to form the program.  It is completed during 
  16051.    the offline edit and used during the online edit. Synonym for edit decision 
  16052.    list (EDL). 
  16053.  
  16054.  edit master  - The final videotape from which all copies are made. See also 
  16055.    glass master. 
  16056.  
  16057.  editing  - Assembling various segments into the composite program. 
  16058.  
  16059.  EDL  - Edit decision list. 
  16060.  
  16061.  EGA  - Enhanced graphics adapter. 
  16062.  
  16063.  element  - (1) A file or other stored data item. (2) An individual file that 
  16064.    is part of a RIFF compound file.  An element of a compound file also could 
  16065.    be an entire RIFF file, a non-RIFF file, an arbitrary RIFF chunk, or 
  16066.    arbitrary binary data. (3) The particular resource within a subarea that is 
  16067.    identified by an element address. 
  16068.  
  16069.  emphasis  - Highlighting, color change, or other visible indication of the 
  16070.    condition of an object or choice and the effect of that condition on a 
  16071.    user's ability to interact with that object or choice.  Emphasis can also 
  16072.    give a user additional information about the state of an object or choice. 
  16073.  
  16074.  encode  - To convert data by the use of a code in such a manner that 
  16075.    reconversion to the original form is possible.  Contrast with decode.(T)
  16076.  
  16077.  enhanced graphics adapter (EGA)  - A graphics controller for color displays. 
  16078.    The pel resolution of an enhanced graphics adapter is 3:4. 
  16079.  
  16080.  entry field  - An area into which a user places text.  Its boundaries are 
  16081.    usually indicated. 
  16082.  
  16083.  erasable optical discs  - Optical discs that can be erased and written to 
  16084.    repeatedly. 
  16085.  
  16086.  establishing shot  - In videotaping, a long shot used in the beginning of a 
  16087.    program or segment to establish where the action is taking place and to give 
  16088.    the sense of an environment. 
  16089.  
  16090.  EVCB  - Event control block. 
  16091.  
  16092.  event  - An occurrence of significance to a task; for example, the completion 
  16093.    of an asynchronous operation, such as I/O. 
  16094.  
  16095.  event control block (ECB or EVCB)  - A control block used to represent the 
  16096.    status of an event. 
  16097.  
  16098.  event queue  - In computer graphics, a queue that records changes in input 
  16099.    devices such as buttons, valuators, and the keyboard.  The event queue 
  16100.    provides a time-ordered list of input events. 
  16101.  
  16102.  event semaphore  - (1) Used when one or more threads must wait for a single 
  16103.    event to occur. (2) A blocking flag used to signal when an event has 
  16104.    occurred. 
  16105.  
  16106.  explicit event  - An event supported by only some handlers, such as a custom 
  16107.    event unique to a particular type of data. 
  16108.  
  16109.  EXT  - Script abbreviation for exterior. 
  16110.  
  16111.  extended selection  - A type of selection optimized for the selection of a 
  16112.    single object.  A user can extend selection to more than one object, if 
  16113.    required.  The two kinds of extended selection are contiguous extended 
  16114.    selection and discontiguous extended selection. 
  16115.  
  16116.  extreme close-up  - The shot obtained when the camera is positioned to show 
  16117.    only the   face or a single feature of the subject; in the case of an 
  16118.    object, the camera is close enough to reveal an individual part of the 
  16119.    object clearly. 
  16120.  
  16121.  
  16122. ΓòÉΓòÉΓòÉ <hidden> F ΓòÉΓòÉΓòÉ
  16123.  
  16124.  facsimile machine  - A functional unit that converts images to signals for 
  16125.    transmission over a telephone system or that converts received signals back 
  16126.    to images. 
  16127.  
  16128.  fade  - To change the strength or loudness of a video or audio signal, as in 
  16129.    "fade up" or "fade down." 
  16130.  
  16131.  fast threads  - Threads created by an application that provide minimal process 
  16132.    context, for example, just stack, register, and memory.  With the reduced 
  16133.    function, fast threads can be processed quickly. 
  16134.  
  16135.  FAX machine  - Synonym for facsimile machine. 
  16136.  
  16137.  file cleanup  - The removal of superfluous or obsolete data from a file. 
  16138.  
  16139.  file compaction  - Any method of encoding data to reduce its required storage 
  16140.    space. 
  16141.  
  16142.  file element  - An individual file that is part of a RIFF compound file. An 
  16143.    element of a compound file can also be an entire RIFF file, a non-RIFF file, 
  16144.    an arbitrary RIFF chunk, or arbitrary binary data. See media element. 
  16145.  
  16146.  file format  - A language construct that specifies the representation, in 
  16147.    character form, of data objects in a file.  For example, MIDI, M-Motion, or 
  16148.    AVC. 
  16149.  
  16150.  file format handler  - (1) I/O procedure. (2) Provides functions that operate 
  16151.    on the media object of a particular data format.  These functions include 
  16152.    opening, reading, writing, seeking, and closing elements of a storage 
  16153.    system. 
  16154.  
  16155.  file format IOProc  - (1) An installable I/O procedure that is responsible for 
  16156.    all technical knowledge of the format of a specific type of data, such as 
  16157.    headers and data compression schemes.  A file format IOProc manipulates 
  16158.    multimedia data at the element level.  A file format IOProc handles the 
  16159.    element type it was written for and does not rely on any other file format 
  16160.    IOProcs to do any processing.  However, a file format IOProc might need to 
  16161.    call a storage system IOProc to obtain data within a file containing 
  16162.    multiple file elements. (2) See IOProc. (3) See also storage system IOProc. 
  16163.  
  16164.  filter  - A certain type of node that modifies messages and forwards them. 
  16165.    Filters are used to perform real-time processing of MIDI data. When a filter 
  16166.    receives a message, it may perform some manipulation on it. It will then 
  16167.    forward the message.  (RTMIDI-specific term) 
  16168.  
  16169.  final script  - The finished script that will be used as a basis for shooting 
  16170.    the video.  Synonym for shooting script. 
  16171.  
  16172.  first draft  - A rough draft of the complete script. 
  16173.  
  16174.  first generation  - In videotaping, the original or master tape; not a copy. 
  16175.  
  16176.  flashback  - Interruption of chronological sequence by interjection of events 
  16177.    occurring earlier. 
  16178.  
  16179.  flush stop  - In data streaming, requests that the source stream handler be 
  16180.    stopped but the target stream handler continue until the last buffer held at 
  16181.    the time the stop was requested is consumed by the target stream handler. 
  16182.  
  16183.  flutter  - A phenomenon that occurs in a videodisc freeze-frame when both 
  16184.    video fields are not identically matched, thus creating two different 
  16185.    pictures alternating every 1/60th of a second. 
  16186.  
  16187.  fly-by  - Animation simulating a bird's-eye view of a three-dimensional 
  16188.    environment. 
  16189.  
  16190.  fly-in  - A DVE where one picture "flies" into another. 
  16191.  
  16192.  folder  - A file used to store and organize documents or electronic mail. 
  16193.  
  16194.  footage  - The total number of running feet of film used (as for a scene). 
  16195.  
  16196.  foreground image  - The part of a display image that can be changed for every 
  16197.    transaction. Contrast with background image. 
  16198.  
  16199.  form overlay  - A pattern such as a report form, grid, or map used as 
  16200.    background for a display image. 
  16201.  
  16202.  form type  -  A field in the first four bytes of the data field of a RIFF 
  16203.    chunk.  It is a four-character code identifying the format of the data 
  16204.    stored in the file.  A RIFF form is a chunk with a chunk ID of RIFF. For 
  16205.    example, waveform audio files (WAVE files) have a form type of WAVE. 
  16206.  
  16207.  Format 0 MIDI file  - All MIDI data is stored on a single track. 
  16208.  
  16209.  Format 1 MIDI file  - All MIDI data is stored on multiple tracks. 
  16210.  
  16211.  forward  -  To re-transmit a message that was received.  Each instance can 
  16212.    have any number of links from it.  When an instance receives a message, it 
  16213.    may decide to send the same message along its links.  This is known as 
  16214.    forwarding. (RTMIDI-specific term) 
  16215.  
  16216.  four-character code (FOURCC)  - A 32-bit quantity representing a sequence of 
  16217.    one to four ASCII alphanumeric characters (padded on the right with blank 
  16218.    characters). Four-character codes are unique identifiers that represent the 
  16219.    file format and I/O procedure. 
  16220.  
  16221.  FOURCC  - Four-character code. 
  16222.  
  16223.  fps  - Frames per second. 
  16224.  
  16225.  frame  - In film, a complete television picture that is composed of two 
  16226.    scanned fields, one of the even lines and one of the odd lines.  In the NTSC 
  16227.    system, a frame has 525 horizontal lines and is scanned in 1/30th of a 
  16228.    second. 
  16229.  
  16230.  frame-step recording  - Refers to the capturing of video and audio data frame 
  16231.    by frame, from a computer-controlled, frame-steppable video source device, 
  16232.    or a previously recorded AVI file. 
  16233.  
  16234.  frame-accurate searches  - The ability of a videodisc player to play or search 
  16235.    to specific frames on the videodisc via software or remote control.  This 
  16236.    capability is available on all CAV players, but currently only on a few CLV 
  16237.    players. Most CLV players can only search or play to within one second (30 
  16238.    frames for NTSC or 25 frames for PAL). 
  16239.  
  16240.  frame animation  - A process where still images are shown at a constant rate. 
  16241.    See also cast animation. 
  16242.  
  16243.  frame grabber  - A device that digitizes video images. 
  16244.  
  16245.  frame number  - The number used to identify a frame.  On videodisc, frames are 
  16246.    numbered sequentially from 1 to 54,000 on each side and can be accessed 
  16247.    individually; on videotape, the numbers are assigned by way of the SMPTE 
  16248.    time code. 
  16249.  
  16250.  frame rate  - The speed at which the frames are scanned-30 frames a second in 
  16251.    NTSC video, 25 frames a second in PAL video, and 24 frames a second in most 
  16252.    film. 
  16253.  
  16254.    A complete television picture frame is composed of two scanned fields, one 
  16255.    of the even lines and one of the odd lines.  In the NTSC system, a frame has 
  16256.    525 horizontal lines and is scanned in 1/30th of a second. In the PAL 
  16257.    system, a frame has 625 horizontal lines and is scanned in 1/25th of a 
  16258.    second. 
  16259.  
  16260.  freeze  - Disables updates to all or part of the video buffer. The last video 
  16261.    displayed remains visible. See also unfreeze. 
  16262.  
  16263.  freeze-frame  - A frame of a motion-picture film that is repeated so as to 
  16264.    give the illusion of a still picture. 
  16265.  
  16266.  full-frame time code  - (1) A standardized method, set by the Society of 
  16267.    Motion Picture and Television Engineers (SMPTE), of address coding a 
  16268.    videotape.  It gives an accurate frame count rather than an accurate clock 
  16269.    time. (2) Synonym for nondrop time code. 
  16270.  
  16271.  full-motion video  - Video playback at 30 frames per second for NTSC signals 
  16272.    or 25 frames per second for PAL signals. 
  16273.  
  16274.  
  16275. ΓòÉΓòÉΓòÉ <hidden> G ΓòÉΓòÉΓòÉ
  16276.  
  16277.  game port  - On a personal computer, a port used to connect devices such as 
  16278.    joysticks and paddles. 
  16279.  
  16280.  GDT  - Global Descriptor Table. 
  16281.  
  16282.  general purpose interface bus  - An adapter that controls the interface 
  16283.    between the PC, Personal Computer XT*, or Personal Computer AT* and, for 
  16284.    example, the InfoWindow display; also known as the IBM IEEE 488. 
  16285.  
  16286.  genlock  - A device that comes on an adapter or plugs into a computer port and 
  16287.    provides the technology to overlay computer-generated titles and graphics 
  16288.    onto video images.  It does this by phase-locking the sync generation of two 
  16289.    video signals together so they can be merged. Genlock also converts a 
  16290.    digital signal to NTSC or PAL format.  (For example, flying logos and 
  16291.    scrolling text on television shows are overlaid using a genlock.) 
  16292.  
  16293.  glass master  - The final videodisc format from which copies are made. 
  16294.  
  16295.  Global Descriptor Table (GDT)  - Defines code and data segments available to 
  16296.    all tasks in an application. 
  16297.  
  16298.  GOCA  - Graphic Object Content Architecture. 
  16299.  
  16300.  Graphic Object Content Architecture (GOCA)  - (1) A data format for multimedia 
  16301.    products. (2) A push button with graphic, two-state, and animation 
  16302.    capabilities. 
  16303.  
  16304.  graphics overlay  - The nature of dual plane video systems makes it possible 
  16305.    to place graphics over video.  Only the pels of the designated transparent 
  16306.    color allows the video to show through.  All other graphics pels appear on 
  16307.    top of the video.  Note that the video still exists in the video buffer 
  16308.    under the non-transparent graphics pels. 
  16309.  
  16310.  graphics plane  - In a dual plane video system, the graphics plane contains 
  16311.    material drawn or generated by the graphics adapter.  The graphics plane 
  16312.    will be combined with the video plane to create an entire display image. 
  16313.  
  16314.  grayscale  - See greyscale. 
  16315.  
  16316.  greyscale  - When video is displayed in shades of black and white. 
  16317.  
  16318.  grouping  - For Media Control Interface devices, refers to the ability to 
  16319.    associate dissimilar devices for a common purpose.  Grouping MCI devices 
  16320.    aids resource management by insuring that all devices in a group are kept 
  16321.    together. 
  16322.  
  16323.  
  16324. ΓòÉΓòÉΓòÉ <hidden> H ΓòÉΓòÉΓòÉ
  16325.  
  16326.  handshaking  - The exchange of predetermined signals when a connection is 
  16327.    established between two data set devices. 
  16328.  
  16329.  help view  - A view of an object that provides information to assist users in 
  16330.    working with that object. 
  16331.  
  16332.  Hi8  - High-band 8mm videotape format. 
  16333.  
  16334.  HID  - Handler identification. 
  16335.  
  16336.  High Sierra Group (HSG)  - (1) A group that set the standards for information 
  16337.    exchange for a CD-ROM. (2) HSG also refers to those standards (HSG 
  16338.    standards). 
  16339.  
  16340.  HMS  - (1) Hours-minutes-seconds. (2) A time format for videodisc players. 
  16341.  
  16342.  HMSF  -  (1) Hours-minutes-seconds-frames. (2) A time format for videodisc 
  16343.    players. 
  16344.  
  16345.  hot spot  - The area of a display screen that is activated to accept user 
  16346.    input.  Synonym for touch area. 
  16347.  
  16348.  HSG  - High Sierra Group. 
  16349.  
  16350.  HSI  - Hue saturation intensity. 
  16351.  
  16352.  hue  - Describes the position of a color in a range from blue to green.  A hue 
  16353.    level of 0 is maximum blue.  A hue level of 100 is maximum green. Synonym 
  16354.    for tint. 
  16355.  
  16356.  hue saturation intensity (HSI)  - A method of describing color in 
  16357.    three-dimensional color space. 
  16358.  
  16359.  HWID  - Hardware identifier. 
  16360.  
  16361.  hypermedia  - Navigation or data transfer between connected objects of 
  16362.    different media types.  For example, a user might navigate from an image 
  16363.    object to an audio object that describes the image over a hypermedia link. 
  16364.    Or, a representation of a graph object might be embedded in a document 
  16365.    object with a hypermedia data transfer link, such that when the graph object 
  16366.    is changed, the representation of that object in the document is also 
  16367.    changed. 
  16368.  
  16369.  Hytime  - An ANSI standard proposal that addresses the synchronization and 
  16370.    linking of multimedia objects. 
  16371.  
  16372.  
  16373. ΓòÉΓòÉΓòÉ <hidden> I ΓòÉΓòÉΓòÉ
  16374.  
  16375.  IDC  - Inter-device communication mechanism provided by the OS/2 function 
  16376.    ATTACHDD DevHelp. 
  16377.  
  16378.  identifier  - (1) A sequence of bits or characters that identifies a program, 
  16379.    device, or system to another program, device, or system. (2) In the C 
  16380.    language, a sequence of letters, digits, and underscores used to identify a 
  16381.    data object or function. (3) See four-character code (FOURCC). 
  16382.  
  16383.  IDOCA  - Integrated Data Object Content Architecture. 
  16384.  
  16385.  image  - An electronic representation of a video still. 
  16386.  
  16387.  image bitsperpel  - Pertaining to the number of colors supported by the 
  16388.    current pel format. The currently accepted standard values are those 
  16389.    supported by OS/2 bitmaps, for example, 1, 4, 8, or 24 bits per pel.  In 
  16390.    addition, 12 bits per pel formats are accepted for YUV images (including the 
  16391.    'yuvb' pel format for RDIB files). 
  16392.  
  16393.  image buffer  - A location in memory where video images are stored for later 
  16394.    use. 
  16395.  
  16396.  image buffer formats  - The format or representation of data buffers 
  16397.    containing video images. 
  16398.  
  16399.  image compression  - The method of compressing video image data to conserve 
  16400.    storage space. 
  16401.  
  16402.  image file format  - The format or representation of data files containing 
  16403.    video images. 
  16404.  
  16405.  Image Object Content Architecture (IOCA)  - A data format for multimedia 
  16406.    products. 
  16407.  
  16408.  image pelformat  - Indicates the color representation that is to be used for 
  16409.    images that are captured and saved.  This normally includes palettized RGB, 
  16410.    true-color RGB, or YUV color formats. 
  16411.  
  16412.  image quality  -  Represents the user's or application's subjective evaluation 
  16413.    of complexity and quality of the image to be captured or saved. This setting 
  16414.    is used to determine specific compression methods to use for saving the 
  16415.    image. 
  16416.  
  16417.  implicit event  - An event that all stream handlers always must support, such 
  16418.    as end of stream or preroll complete). 
  16419.  
  16420.  in-betweening  - Synonym for tweening. 
  16421.  
  16422.  in frame  - Refers to a subject that is included within the frame. See also 
  16423.    frame. 
  16424.  
  16425.  InfoWindow system  - A display system that can combine text, graphics, and 
  16426.    video images on a single display.  The minimum system configuration is the 
  16427.    IBM InfoWindow Color Display, a system unit, a keyboard, and one or two 
  16428.    videodisc players. 
  16429.  
  16430.  input locking mask  - A filter, or mask, that controls which areas of the 
  16431.    display can display or freeze video. 
  16432.  
  16433.  input/output control (IOCtl)  - A system function that provides a method for 
  16434.    an application to send device-specific control commands to a device driver. 
  16435.  
  16436.  installable I/O procedure  - A file format handler that provides functions 
  16437.    that operate on the media object of a particular data format.  These 
  16438.    functions include opening, reading, writing, seeking, and closing elements. 
  16439.  
  16440.  instance  -  See node instance.  (RTMIDI-specific term) 
  16441.  
  16442.  INT  - Script abbreviation for interior. 
  16443.  
  16444.  Integrated Data Object Control Architecture (IDOCA)  - A data format for 
  16445.    multimedia products. 
  16446.  
  16447.  interactive multimedia  - The delivery of information content through 
  16448.    combinations of video, computer graphics, sound, and text in a manner that 
  16449.    allows the user to interact. 
  16450.  
  16451.  interactive program  - A running program that can receive input from the 
  16452.    keyboard or another input device.  Contrast with noninteractive program. 
  16453.  
  16454.  interactive videodisc system (IVS)  - A system in which a user can interact 
  16455.    with a videodisc display image by entering commands to the computer through 
  16456.    a device such as a keyboard or keypad or by touching a touch-sensitive 
  16457.    screen at specific points on the display surface. 
  16458.  
  16459.  interlace flicker  - The apparent flicker when one field of an interlaced 
  16460.    image contains more light than the other field due to the placement of image 
  16461.    details with respect to the separate fields.  Two methods used to avoid 
  16462.    interlace flicker:  limit the vertical resolution on natural images (as 
  16463.    opposed to text or graphics); design characters so that each character has 
  16464.    an equal number of pels in each field. 
  16465.  
  16466.  interlacing  - In multimedia applications, a characteristic of video image 
  16467.    display that results in greater image clarity.  In effect, the video image 
  16468.    is traced across the screen twice.  (The time delay between the two tracings 
  16469.    makes this effect undesirable for normal computer-generated graphics.) 
  16470.    Synonymous with interleaving. 
  16471.  
  16472.  interleaving  -  (1) The simultaneous accessing of two or more bytes or 
  16473.    streams of data from distinct storage units. (2) The alternating of two or 
  16474.    more operations or functions through the overlapped use of a computer 
  16475.    facility. (3) In a duplicator, the process of inserting absorbent sheets 
  16476.    between successive sheets of the copy paper to prevent set-off. (T)  (4) 
  16477.    Synonym for interlacing. 
  16478.  
  16479.  internal I/O procedure  - An I/O procedure that is built in to the MMPM/2 
  16480.    system, including DOS, MEM, BND, and CF IOProcs. 
  16481.  
  16482.  International Organization for Standardization (ISO)  - An organization of 
  16483.    national standards bodies from various countries established to promote 
  16484.    development of standards to facilitate international exchange of goods and 
  16485.    services, and develop cooperation in intellectual, scientific, 
  16486.    technological, and economic activity. 
  16487.  
  16488.  IOCtl  - Input/output control. 
  16489.  
  16490.  IOProc  - A file format handler that provides functions that operate on the 
  16491.    media object of a particular data format.  These processes include opening, 
  16492.    reading, writing, seeking, and closing elements of a storage system.  There 
  16493.    are two classes of I/O procedures: file format and storage system. 
  16494.  
  16495.  iris  - To fade a picture by operating the iris (aperture) on the camera in a 
  16496.    certain way; the type of computer image dissolve accomplished by operating 
  16497.    the aperture in a certain way. 
  16498.  
  16499.  ISO  - International Organization for Standardization. 
  16500.  
  16501.  ISP  - IBM Signal Processor.  An IBM proprietary digital signal processor. 
  16502.  
  16503.  ISPOS  - IBM Signal Processor Operating System. 
  16504.  
  16505.  ISV  - Independent software vendor. 
  16506.  
  16507.  items  - Options, choices or keywords such as one or more of the following 
  16508.    options, choices or keywords can or should be specified.  Sometimes use of 
  16509.    these items can also be exclusive or some items may not be compatible with 
  16510.    other items. 
  16511.  
  16512.  IVS  - Interactive videodisc system. 
  16513.  
  16514.  
  16515. ΓòÉΓòÉΓòÉ <hidden> J ΓòÉΓòÉΓòÉ
  16516.  
  16517.  JIT  - Just in time.  (Often used with "learning" as "JIT learning".) 
  16518.    Multimedia help functions, closely integrated with applications, that employ 
  16519.    voice output to guide the user. 
  16520.  
  16521.  Joint Photographic Experts Group (JPEG)  - A group that is working to 
  16522.    establish a standard for compressing and storing still images in digital 
  16523.    form.  JPEG also refers to the standard under development by this group 
  16524.    (JPEG standard). 
  16525.  
  16526.  joy stick  - In computer graphics, a lever that can pivot in all directions 
  16527.    and that is used as a locater device.  (Resembles an airplane's joy stick). 
  16528.  
  16529.  JPEG  - Joint Photographic Experts Group. 
  16530.  
  16531.  
  16532. ΓòÉΓòÉΓòÉ <hidden> K ΓòÉΓòÉΓòÉ
  16533.  
  16534.  keeper  - Synonym for buy. 
  16535.  
  16536.  kernel  -  (1) The part of an operating system that performs basic functions 
  16537.    such as allocating hardware resources. (2) A program that can run under 
  16538.    different operating system environments. (3) A part of a program that must 
  16539.    be in main storage in order to load other parts of the program. 
  16540.  
  16541.  key frames  - The start and end frames of a single movement in an animation 
  16542.    sequence; also can refer to the periodic full-frame image interspersed in 
  16543.    the stream to allow random starts from these full-frame images (key frames). 
  16544.  
  16545.  keypad  - A small, often hand-held, keyboard. 
  16546.  
  16547.  
  16548. ΓòÉΓòÉΓòÉ <hidden> L ΓòÉΓòÉΓòÉ
  16549.  
  16550.  laser  - Light amplification by stimulated emission of radiation; the device 
  16551.    that produces this light. 
  16552.  
  16553.  latency  - In video, the time it takes for the light from the phosphor screen 
  16554.    to decay after the excitation is removed. Long-persistence phosphor has less 
  16555.    flicker of still images, but more blurring of moving images. 
  16556.  
  16557.  level one videodisc applications  - Interactive applications based on manual 
  16558.    keypad functions, picture stops, and chapter stops. 
  16559.  
  16560.  level three videodisc applications  - Interactive applications controlled by 
  16561.    an external computer that uses the videodisc player as a peripheral device. 
  16562.  
  16563.  level two videodisc applications  - Interactive applications controlled by the 
  16564.    keypad and the videodisc player's internal computer. The control program is 
  16565.    recorded on the videodisc itself. 
  16566.  
  16567.  LIB  - Dynamic-link definition library.  A file containing the data needed to 
  16568.    build a program .EXE file but which does not contain the dynamic-link 
  16569.    programs themselves. Contrast with dynamic-link library. 
  16570.  
  16571.  light pen  - A light-sensitive pick device that is used by pointing it at the 
  16572.    display surface. 
  16573.  
  16574.  line graphics  - Synonym for coordinate graphics. 
  16575.  
  16576.  line pairing  - A faulty interlace pattern in which the lines of the second 
  16577.    field begin to pair with the lines of the first field rather than fit 
  16578.    exactly within them. 
  16579.  
  16580.  linear audio  - The analog audio on the linear track of videotape that can be 
  16581.    recorded without erasing existing video; used for audio dubbing after video 
  16582.    is edited. 
  16583.  
  16584.  linear video  - A sequence of motion footage played from start to finish 
  16585.    without stops or branching, like a movie. 
  16586.  
  16587.  link  - A one-way link (directed edge) from one instance to another.  If an 
  16588.    instance wishes to send a message, it is sent along all the links from it. 
  16589.    An instance can have any number of links coming from it, and any number of 
  16590.    other instances can have links to it.  An instance cannot select along which 
  16591.    links the message should be sent.  See also slot.  (RTMIDI-specific term) 
  16592.  
  16593.  LIST chunk  - A chunk that contains a list or an ordered sequence of 
  16594.    subchunks. 
  16595.  
  16596.  list type  - (1) A field in the first four bytes of the data field of a LIST 
  16597.    chunk. (2) A four-character code identifying the contents of the list. 
  16598.  
  16599.  locked memory  - An area of memory that is not available for use because it is 
  16600.    being held by another process. 
  16601.  
  16602.  long shot  - (1) A camera angle that reveals the subject and the surroundings. 
  16603.    Often used as an establishing shot. (2) Synonym for wide shot. 
  16604.  
  16605.  LS  - Script abbreviation for long shot. 
  16606.  
  16607.  luminance signal  - The portion of image information that provides brightness. 
  16608.    Alone, luminance provides a monochrome image. 
  16609.  
  16610.  
  16611. ΓòÉΓòÉΓòÉ <hidden> M ΓòÉΓòÉΓòÉ
  16612.  
  16613.  M-ACPA  -  M-Audio Capture and Playback Adapter. 
  16614.  
  16615.  M-Audio Capture and Playback Adapter (M-ACPA)  - An adapter card (for use with 
  16616.    the IBM PS/2 product line) that provides the ability to record and play back 
  16617.    high quality sound.  The adapter converts the audio input (analog) signals 
  16618.    to a digital format that is compressed and stored for later use. 
  16619.  
  16620.  master stream handler  - Controls the behavior of one or more subordinate 
  16621.    objects (the slave streams). 
  16622.  
  16623.  matte  - In film, an opaque piece of art or a model that leaves a selected 
  16624.    area unexposed to be filled on a subsequent pass or in composite. 
  16625.  
  16626.  MCD  - Media control driver. 
  16627.  
  16628.  MCI  - Media Control Interface. 
  16629.  
  16630.  M-Control Program/2  - The software interface required for the M-Motion Video 
  16631.    Adapter/A.  It consists of APIs or toolkits for DOS, Windows, Windows MCI, 
  16632.    OS/2, and OS/2 MMPM/2.  It also includes Pioneer and Sony videodisc player 
  16633.    drivers for these environments. See also M-Motion Video Adapter/A. 
  16634.  
  16635.  MDM  - Media device manager. 
  16636.  
  16637.  media  -  More than one hardware medium. 
  16638.  
  16639.  media component  - A processor of audiovisual information or media.  Media 
  16640.    components can be either internal or external physical devices or defined 
  16641.    mechanisms for effecting higher-level function from internal hardware and 
  16642.    software subsystems.  (An example is a waveform player component that 
  16643.    utilizes the DSP subsystem and data streaming services to effect audio 
  16644.    playback functions.) 
  16645.  
  16646.  media component capabilities  - The functionality of a media component, 
  16647.    including component functions that are supported. 
  16648.  
  16649.  media component type  - A class of media components that exhibit similar 
  16650.    behavior and capabilities.  Examples of media component types are analog 
  16651.    video display hardware and MIDI synthesizers. 
  16652.  
  16653.  media control driver (MCD)  - A software implementation or method that effects 
  16654.    the function of a media component.  For OS/2, a media control driver or 
  16655.    media driver is a dynamic-link library (or set of libraries) that utilizes 
  16656.    physical device drivers, Media Device Manager services, and OS/2 to 
  16657.    implement the function of the media component. 
  16658.  
  16659.  Media Control Interface (MCI)  - A generalized interface to control multimedia 
  16660.    devices.  Each device has its own MCI driver that implements a standard set 
  16661.    of MCI functions.  In addition, each media driver can implement functions 
  16662.    that are specific to the particular device. 
  16663.  
  16664.  media device  - A processor of audiovisual information or media.  Media 
  16665.    components can be either internal or external physical devices or defined 
  16666.    mechanisms for effecting higher-level function from internal hardware and 
  16667.    software subsystems.  (An example is a waveform player component that 
  16668.    utilizes the DSP (Digital Signal Processor) subsystem and data-streaming 
  16669.    services to effect audio-playback functions.) 
  16670.  
  16671.  media device capabilities  - The functionality of a media component, including 
  16672.    supported component functions. 
  16673.  
  16674.  media device connection  - A physical or logical link between media component 
  16675.    connectors for a particular set of media component instances. 
  16676.  
  16677.  media device connector  - A physical or logical input or output on a media 
  16678.    component. 
  16679.  
  16680.  media device connector index  - An identifier for a media component connector. 
  16681.  
  16682.  media device ID  - Media component identification.  A unique identifier for a 
  16683.    component. 
  16684.  
  16685.  media device instance  - A case of an application's use of a media component. 
  16686.  
  16687.  media device manager (MDM)  - A system service that, when two or more 
  16688.    applications attempt to control a media device, determines which process 
  16689.    gains access. 
  16690.  
  16691.  media driver  - A device driver for a multimedia device. See also device 
  16692.    driver. 
  16693.  
  16694.  media driver  - A software implementation or method that effects the function 
  16695.    of a media device. 
  16696.  
  16697.  media element manager (MEM)  - A system service that manipulates multimedia 
  16698.    data. 
  16699.  
  16700.  media programming interface (MPI)  - A subsystem that provides a comprehensive 
  16701.    system programming API layer for multimedia applications. 
  16702.  
  16703.  media segment  - An audiovisual object of some type, such as a waveform, song, 
  16704.    video clip, and so on. 
  16705.  
  16706.  media unit  - A medium on which files are stored; for example, a diskette. 
  16707.  
  16708.  media volume  - A (possibly heterogeneous) physical or logical collection of 
  16709.    media segments.  (Examples are a videodisc, video tape, compact audio disc, 
  16710.    OFF file, and RIFF file.) 
  16711.  
  16712.  media volume file  - A media volume that is embodied as a conventional binary 
  16713.    computer file within a computer file system on storage devices such as 
  16714.    disks, diskettes, or CD-ROMs.  Such storage devices can be either local or 
  16715.    remote.  Media volume files can be of various formats, such as OFF or RIFF, 
  16716.    and contain segments of various types. 
  16717.  
  16718.  medium shot  - A camera angle that reveals more of the subject than a close-up 
  16719.    but less than a wide shot, usually from face to waistline; sometimes called 
  16720.    a mid-shot. 
  16721.  
  16722.  MEM  - Media element manager. 
  16723.  
  16724.  MEM IOProc  - An internal I/O procedure provided by the MMPM/2 system that 
  16725.    supports memory files. 
  16726.  
  16727.  memory file  - A block of memory that is perceived as a file by an 
  16728.    application. 
  16729.  
  16730.  memory playlist  - A data structure in the application used to specify the 
  16731.    memory addresses to play from or record to.  The application can modify the 
  16732.    playlist to achieve various effects in controlling the memory stream. 
  16733.  
  16734.  message interface  - See command message interface. 
  16735.  
  16736.  MIDI Mapper  - Provides the ability to translate and redirect MIDI messages to 
  16737.    achieve device-independent playback of MIDI sequences. 
  16738.  
  16739.  MIDI message  - A sequence of bytes that conform to the MIDI standard.  There 
  16740.    are two categories:  System Exclusive (SysEx) and non-SysEx messages.  SysEx 
  16741.    messages can be of any length, whereas non-SysEx messages are between one 
  16742.    and three bytes. 
  16743.  
  16744.  mid-shot  - See medium shot. 
  16745.  
  16746.  millisecond  - One thousandth of a second. 
  16747.  
  16748.  minutes-seconds-frames (MSF)  - A time format based on the 
  16749.    75-frames-per-second CD digital audio standard. 
  16750.  
  16751.  MIPS  - Millions of instructions per second.  A unit of measure of processing 
  16752.    performance equal to one million instructions per second. 
  16753.  
  16754.  mix  - The combination of audio or video sources during postproduction. 
  16755.  
  16756.  mixed-media system  - Synonym for multimedia system. 
  16757.  
  16758.  Mixed Object : Document Content Architecture (MO:DCA)  - A data format for 
  16759.    multimedia products. 
  16760.  
  16761.  mixer  - A device used to simultaneously combine and blend several inputs into 
  16762.    one or two outputs. 
  16763.  
  16764.  mixing  - (1) In computer graphics, the result of the intersection of two or 
  16765.    more colors. (2) In filming, the combining of audio and video sources that 
  16766.    is accomplished during postproduction at the mix. (3) In recording, the 
  16767.    combining of audio sources. 
  16768.  
  16769.  MMIO  - Multimedia input/output. 
  16770.  
  16771.  MMIO file services  - System services that enable an application to access and 
  16772.    manipulate multimedia data files. 
  16773.  
  16774.  MMIO manager  - Multimedia input/output manager.  The MMIO manager provides 
  16775.    services to find, query, and access multimedia data objects. It also 
  16776.    supports the functions of memory allocation and file compaction.  The MMIO 
  16777.    manager uses IOProcs to direct the input and output associated with reading 
  16778.    from and writing to different types of storage systems or file formats. 
  16779.  
  16780.  M-Motion  - A multimedia platform that offers analog video in addition to 
  16781.    quality sound and images.  The M-Motion environment consists of the M-Motion 
  16782.    Video Adapter/A and the M-Control Program/2 master stream handler. 
  16783.  
  16784.  M-Motion Video Adapter/A  - (1) A Micro Channel adapter that receives and 
  16785.    processes signals from multiple video and audio sources, and then sends 
  16786.    these signals to a monitor and speakers. (2) Dual plane video hardware that 
  16787.    offers analog video in addition to quality sound and images. (3) The 
  16788.    M-Motion Video Adapter/A requires the M-Control Program/2. 
  16789.  
  16790.  MMPM/2  - Multimedia Presentation Manager/2.  See OS/2 multimedia. 
  16791.  
  16792.  MMTIME  - Standard time and media position format supported by the media 
  16793.    control interface.  This time unit is 1/3000 second, or 333 microseconds. 
  16794.  
  16795.  MO:DCA  - Mixed Object : Document Content Architecture. 
  16796.  
  16797.  mode  - A method of operation in which the actions that are available to a 
  16798.    user are determined by the state of the system. 
  16799.  
  16800.  model  - The conceptual and operational understanding that a person has about 
  16801.    something. 
  16802.  
  16803.  module  - A language construct that consists of procedures or data 
  16804.    declarations and that can interact with other constructs. 
  16805.  
  16806.  moire  - An independent, usually shimmering pattern seen when two 
  16807.    geometrically regular patterns (as a sampling frequency and a correct 
  16808.    frequency) are superimposed.  The moire pattern is an alias frequency. See 
  16809.    also aliasing. 
  16810.  
  16811.  monitor  - See video monitor. 
  16812.  
  16813.  monitor window  - A graphical window, available from a digital video device, 
  16814.    which displays the source rectangle, and any subset of this video capture 
  16815.    region.  See destination rectangle for related information. 
  16816.  
  16817.  motion-control photography  - A system for using computers to precisely 
  16818.    control camera movements so that the different elements of a shot-models and 
  16819.    backgrounds, for example-can later be composited with a natural and 
  16820.    believable unity. 
  16821.  
  16822.  motion video capture adapter  - An adapter that, when attached to a computer, 
  16823.    allows an ordinary television picture to be displayed on all or part of the 
  16824.    screen, mixing high-resolution computer graphics with video; also enables a 
  16825.    video camera to become an input device. 
  16826.  
  16827.  Motion Video Object Content Architecture (MVOCA)  - A data format for 
  16828.    multimedia products. 
  16829.  
  16830.  Moving Pictures Experts Group (MPEG)  - A group that is working to establish a 
  16831.    standard for compressing and storing motion video and animation in digital 
  16832.    form. 
  16833.  
  16834.  MPEG  - Moving Pictures Experts Group. 
  16835.  
  16836.  MPI  - Media Programming Interface. 
  16837.  
  16838.  MPI application services  - Media Programming Interface application services. 
  16839.    Functional services provided by MPI to application programs and higher-level 
  16840.    programming constructs, such as multimedia controls. 
  16841.  
  16842.  MS  - Script abbreviation for medium shot. 
  16843.  
  16844.  MSF  - Minutes-seconds-frames. 
  16845.  
  16846.  multimedia  - Material presented in a combination of text, graphics, video, 
  16847.    image, animation, and sound. 
  16848.  
  16849.  multimedia data object  - In an application, an element of a data structure 
  16850.    (such as a file, an array, or an operand) that is needed for program 
  16851.    execution and that is named or otherwise specified by the allowable 
  16852.    character set of the language in which the program is coded. 
  16853.  
  16854.  Multimedia File I/O Services  - System services that provide a generalized 
  16855.    interface to manipulate multimedia data.  The services support buffered and 
  16856.    unbuffered file I/O, standard RIFF files, and installable I/O procedures. 
  16857.  
  16858.  multimedia input/output (MMIO)  - (1) System services that provide a variety 
  16859.    of functions for media file access and manipulation. (2) A consistent 
  16860.    programming interface where an application, media driver, or stream handler 
  16861.    can refer to multimedia files, read and write data to the files, and query 
  16862.    the contents of the files, while remaining independent of the underlying 
  16863.    file formats or the storage systems that contain the files. 
  16864.  
  16865.  multimedia navigation system  - A tool that gives the information product 
  16866.    designer the freedom to link various kinds and pieces of data in a variety 
  16867.    of ways so that users can move through it nonsequentially. 
  16868.  
  16869.  multimedia system  - (1) A system capable of presenting multimedia material in 
  16870.    its entirety. (2) Synonym for mixed-media system. 
  16871.  
  16872.  multiple selection  - A selection technique in which a user can select any 
  16873.    number of objects, or not select any. 
  16874.  
  16875.  Musical Instrument Digital Interface (MIDI)  - A protocol that allows a 
  16876.    synthesizer to send signals to another synthesizer or to a computer, or a 
  16877.    computer to a musical instrument, or a computer to another computer. 
  16878.  
  16879.  mute  - To temporarily turn off the audio for the associated medium. 
  16880.  
  16881.  mux  - An abbreviation for multiplexer. See also mixer. 
  16882.  
  16883.  MVOCA  - Motion Video Object Content Architecture. 
  16884.  
  16885.  
  16886. ΓòÉΓòÉΓòÉ <hidden> N ΓòÉΓòÉΓòÉ
  16887.  
  16888.  NAPLPS  - North American Presentation Level Protocol Syntax. 
  16889.  
  16890.  National Television Standard Committee (NTSC)  - A committee that set the 
  16891.    standard for color television broadcasting and video in the United States 
  16892.    (currently in use also in Japan); also refers to the standard set by this 
  16893.    committee (NTSC standard). 
  16894.  
  16895.  node  -  An abstract term indicating either a node class or a node instance. 
  16896.    When used with a class qualifier (for example, application node) it implies 
  16897.    an instance (for example, instance of an application class). 
  16898.    (RTMIDI-specific term) 
  16899.  
  16900.  node class  -  A definition of the behavior of a node instance.  All instances 
  16901.    of the same class are expected to have the same behavior and purpose, 
  16902.    although this restriction is not enforced by the driver.  (RTMIDI-specific 
  16903.    term) 
  16904.  
  16905.  node instance  -  A vertex in the node network that can receive and transmit 
  16906.    MIDI messages.  (RTMIDI-specific term) 
  16907.  
  16908.  node network  -  The collection (graph) of node instances and links. 
  16909.    (RTMIDI-specific term) 
  16910.  
  16911.  nondrop time code  - Synonym for full-frame time code. 
  16912.  
  16913.  noninteractive program  - A running program that cannot receive input from the 
  16914.    keyboard or other input device. 
  16915.  
  16916.  non-streaming device  - (1) A device that contains both source and destination 
  16917.    information for multimedia. (2) A device that transmits data (usually 
  16918.    analog) directly, without streaming to system memory. 
  16919.  
  16920.  North American Presentation Level Protocol Syntax (NAPLPS)  - A protocol used 
  16921.    for display and communication of text and graphics in a videotex system; a 
  16922.    form of vector graphics. 
  16923.  
  16924.  notebook  - A graphical representation that resembles a perfect-bound or 
  16925.    spiral-bound notebook that contains pages separated into sections by tabbed 
  16926.    divider pages. A user can turn the pages of a notebook to move from one 
  16927.    section to another. 
  16928.  
  16929.  NTSC  - National Television Standard Committee. 
  16930.  
  16931.  null streaming  - (1) The behavior of a stream that can be created and started 
  16932.    but which has no associated data flow. (2) The behavior of a stream that can 
  16933.    be created and started but which has no associated data flow.  For example, 
  16934.    a CD-DA is a non-streaming device. (3) A device that does not stream its 
  16935.    data through the MMPM/2 streaming system For example, a CDDA device is a 
  16936.    non-streaming device. 
  16937.  
  16938.  
  16939. ΓòÉΓòÉΓòÉ <hidden> O ΓòÉΓòÉΓòÉ
  16940.  
  16941.  object  - (1) Anything that exists in and occupies space in storage and on 
  16942.    which operations can be performed; for example, programs, files, libraries, 
  16943.    and folders. (2) Anything to which access is controlled; for example, a 
  16944.    file, a program, an area of main storage. (3) See also data object and media 
  16945.    object. 
  16946.  
  16947.  object-action paradigm  - A method where users select the object that they 
  16948.    want to work with, then choose the action they wish to perform on that 
  16949.    object.  See object orientation. 
  16950.  
  16951.  object class  - A categorization or grouping of objects that share similar 
  16952.    behaviors and characteristics. 
  16953.  
  16954.  object connection  - A link between two objects.  Connections can be used for 
  16955.    navigation, as with hypermedia, or for data transfer between objects. 
  16956.  
  16957.  Object Content Architecture (OCA)  - A data format for multimedia products. 
  16958.  
  16959.  object decomposition  - The process of breaking an object into its component 
  16960.    parts. 
  16961.  
  16962.  object orientation  - An orientation in a user interface in which a user's 
  16963.    attention is directed toward the objects the user works with, rather than 
  16964.    applications, to perform a task. 
  16965.  
  16966.  object-oriented user interface  - A type of user interface that implements 
  16967.    object orientation and the object-action paradigm. 
  16968.  
  16969.  object template  - An object that can be used to create another object of the 
  16970.    same object class.  The template is a basic framework of the object class, 
  16971.    and the newly created object is an instance of the object class. 
  16972.  
  16973.  OCA  - Object Content Architecture. 
  16974.  
  16975.  OEM  - Original equipment manufacturer. 
  16976.  
  16977.  OFF  - Operational file format. 
  16978.  
  16979.  offline edit  - A preliminary or test edit usually done on a low-cost editing 
  16980.    system using videocassette work tapes.  (An offline edit is done so that 
  16981.    decisions can be made and approvals given prior to the final edit.) 
  16982.  
  16983.  online edit  - The final edit, using the master tapes to produce a finished 
  16984.    program. 
  16985.  
  16986.  operational file format (OFF)  - A file format standard. 
  16987.  
  16988.  optical disc  - A disc with a plastic coating on which information (as sound 
  16989.    or visual images) is recorded digitally as tiny pits and read using a laser. 
  16990.    The three categories of optical discs are CD-ROM, WORM, and erasable. 
  16991.  
  16992.  optical drive  - Drives that run optical discs. 
  16993.  
  16994.  optical reflective disc  - A designation of the means by which the laser beam 
  16995.    reads data on an optical videodisc.  In the case of a reflective disc, the 
  16996.    laser beam is reflected off a shiny surface on the disc. 
  16997.  
  16998.  opticals  - Visual effects produced optically by means of a device (an optical 
  16999.    printer) that contains one camera head and several projectors.  The 
  17000.    projectors are precisely aligned so as to produce multiple exposures in 
  17001.    exact registration on the film as in the camera head. 
  17002.  
  17003.  original footage  - The footage from which the program is constructed. 
  17004.  
  17005.  OS/2 multimedia  - A subsystem service of OS/2 that provides a software 
  17006.    platform for multimedia applications.  It defines standard interfaces 
  17007.    between multimedia devices and OS/2 multimedia applications. 
  17008.  
  17009.  overlay  - The ability to superimpose text and graphics over video. 
  17010.  
  17011.  overlay device  - Provides support for video overlaying along with video 
  17012.    attribute elements. The video overlaying handles tasks such as displaying, 
  17013.    and sizing video. Synonym for video overlay device. 
  17014.  
  17015.  
  17016. ΓòÉΓòÉΓòÉ <hidden> P ΓòÉΓòÉΓòÉ
  17017.  
  17018.  PAL  - Phase Alternation Line. 
  17019.  
  17020.  palette  - See color palette, standard palette, and custom palette. 
  17021.  
  17022.  pan  - A camera movement where the camera moves sideways on its stationary 
  17023.    tripod; left-to-right balance in an audio system. 
  17024.  
  17025.  panel  - A particular arrangement of information grouped together for 
  17026.    presentation to users in a window. 
  17027.  
  17028.  panning  - Progressively translating an entire display image to give the 
  17029.    visual impression of lateral movement of the image. 
  17030.  
  17031.    In computer graphics, the viewing of an image that is too large to fit on a 
  17032.    single screen by moving from one part of the image to another. 
  17033.  
  17034.  paradigm  - An example, pattern, or model. 
  17035.  
  17036.  patch mapping  - The reassignment of an instrument patch number associated 
  17037.    with a specific synthesizer to the corresponding standard patch number in 
  17038.    the General MIDI specification. 
  17039.  
  17040.  pause  - To temporarily halt the medium. The halted visual should remain 
  17041.    displayed but no audio should be played. 
  17042.  
  17043.  pause stop  - In data streaming, a stop that pauses the data stream but does 
  17044.    not disturb any data. 
  17045.  
  17046.  PDC  - Physical device component. 
  17047.  
  17048.  PDD  - Physical device driver. 
  17049.  
  17050.  pedestal up/down  - A camera movement where the camera glides up or down on a 
  17051.    boom. 
  17052.  
  17053.  pel  - The dimensions of a toned area at a picture element. See also picture 
  17054.    element. 
  17055.  
  17056.  Phase Alternation Line (PAL)  - Television broadcast standard for European 
  17057.    video outside of France and the Soviet Union. 
  17058.  
  17059.  physical device driver (PDD)  - A program that handles hardware interrupts and 
  17060.    supports a set of input and output functions. 
  17061.  
  17062.  picon  - A  graphic or natural image reduced to icon size.  Similar to 
  17063.    thumbnail. 
  17064.  
  17065.  picture element  - In computer graphics, the smallest element of a display 
  17066.    surface that can be independently assigned color and intensity. See also 
  17067.    pel. 
  17068.  
  17069.  picture-in-picture  - A video window within a larger video window. 
  17070.  
  17071.  pixel  - See picture element. 
  17072.  
  17073.  plaintext  - Nonencrypted data. 
  17074.  
  17075.  platform  - In computer technology, the principles on which an operating 
  17076.    system is based. 
  17077.  
  17078.  play backward  - To play the medium in the backward direction. 
  17079.  
  17080.  playback window  - The graphic window in which software motion video is 
  17081.    displayed. This window can be supplied by an application, or a default 
  17082.    window can be created by a digital video device. 
  17083.  
  17084.  play forward  - To play the medium in the forward direction. 
  17085.  
  17086.  pointer  - A symbol, usually in the shape of an arrow, that a user can move 
  17087.    with a pointing device.  Users place the pointer over objects they want to 
  17088.    work with. 
  17089.  
  17090.  pointing device  - A device, such as a mouse, trackball, or joystick, used to 
  17091.    move a pointer on the screen. 
  17092.  
  17093.  polish  - The version of the script submitted for final approval. 
  17094.  
  17095.  polyphony  - A synthesizer mode where more than 1 note can be played at a 
  17096.    time. Most synthesizers are 16-note to 32-note polyphonic. 
  17097.  
  17098.  postproduction  - The online and offline editing process. 
  17099.  
  17100.  PPQN  - (1) Parts-per-quarter-note. (2) A time format used in musical 
  17101.    instrument digital interface (MIDI). 
  17102.  
  17103.  preproduction  - The preparation stage for video production, when all 
  17104.    logistics are planned and prepared. 
  17105.  
  17106.  preroll  - The process of preparing a device to begin a playback or recording 
  17107.    function with minimal latency.  During a multimedia sequence, it might 
  17108.    require that two devices be cued (prerolled) to start playing and recording 
  17109.    at the same time. 
  17110.  
  17111.  primary window  - A window in which the main interaction between a user and an 
  17112.    object takes place. 
  17113.  
  17114.  Proc  - A custom procedure, called by the particular utility manager, to 
  17115.    handle input or output to files of a format different from DOS, MEM, or BND; 
  17116.    for example, AVC or TIFF.  By installing custom procedures, existing 
  17117.    applications no longer need to store multiple copies of the same media file 
  17118.    for running on various platforms using different file formats.  See also 
  17119.    static resource and dynamic resource. 
  17120.  
  17121.  production  - In videotaping, the actual shooting. 
  17122.  
  17123.  production control room  - The room or location where the monitoring and 
  17124.    switching equipment is placed for the direction and control of a television 
  17125.    production. 
  17126.  
  17127.  progress indicator  - A control, usually a read-only slider, that informs the 
  17128.    user about the status of a user request. 
  17129.  
  17130.  props  - In videotaping, support material for the shoot, for example, 
  17131.    equipment being promoted, auxiliary equipment, software, or supplies; 
  17132.    anything provided to make the set look realistic and attractive. 
  17133.  
  17134.  protection master  - A copy of the edit master that is stored as a backup. 
  17135.  
  17136.  PS/2 CD-ROM-II Drive  - An IBM CD-ROM drive that can play compact disc digital 
  17137.    audio (CD-DA) and CD-ROM/XA interleaved audio, video, and text, and adheres 
  17138.    to the Small Computer System Interface (SCSI).  The drive can be installed 
  17139.    on Micro Channel and non-Micro Channel IBM PS/2 systems. 
  17140.  
  17141.  pulse code modulation (PCM)  - In data communication, variation of a digital 
  17142.    signal to represent information. 
  17143.  
  17144.  push button  - A graphical control, labeled with text, graphics, or both, that 
  17145.    represents an action that will be initiated when a user selects it. For 
  17146.    example, when a user clicks on a Play button, a media object begins playing. 
  17147.  
  17148.  
  17149. ΓòÉΓòÉΓòÉ <hidden> R ΓòÉΓòÉΓòÉ
  17150.  
  17151.  raster graphics  - Computer graphics in which a display image is composed of 
  17152.    an array of pels arranged in rows and columns. 
  17153.  
  17154.  raw footage  - Synonym for original footage. 
  17155.  
  17156.  ray-tracing  - A technique used by 3-D rendering software programs that 
  17157.    automatically figures an object's position in three dimensions and 
  17158.    calculates shadows, reflections, and hidden surfaces based on user-entered 
  17159.    light locations and material characteristics.  (In other words, if the user 
  17160.    orders an object to be a mirror, the computer produces the mirror with all 
  17161.    its correct reflective properties.) 
  17162.  
  17163.  real time  - (1) Pertaining to the processing of data by a computer in 
  17164.    connection with another process outside the computer according to time 
  17165.    requirements imposed by the outside process.  This term is also used to 
  17166.    describe systems operating in conversational mode and processes that can be 
  17167.    influenced by human intervention while they are in progress. (2) A process 
  17168.    control system or a computer-assisted instruction program, in which response 
  17169.    to input is fast enough to affect subsequent output. 
  17170.  
  17171.  real-time recording  - Refers to the capturing of video and audio data in real 
  17172.    time, as the analog signals are generated from the video source device. The 
  17173.    video source device can be a camcorder, or a videotape or videodisc player. 
  17174.  
  17175.  record  - To transfer data from one source (for example, microphone, CD, 
  17176.    videodisc) or set of sources to another medium. 
  17177.  
  17178.  Redbook audio  - The storage format of standard audio CDs. See also compact 
  17179.    disc, digital audio (CD-DA). 
  17180.  
  17181.  reference frame  - (1) Refers to the complete frame that is created at 
  17182.    periodic intervals in the output stream.  An editing operation always begins 
  17183.    at a reference frame. (2) Synonymous with key frame and I-frame. (3) See 
  17184.    delta frame. 
  17185.  
  17186.  reflective disc  - See optical reflective disc. 
  17187.  
  17188.  render  - In videotaping, to create a realistic image from objects and light 
  17189.    data in a scene. 
  17190.  
  17191.  repeat  - A mode which causes the medium to go to the beginning and start 
  17192.    replaying when it reaches the medium's end. 
  17193.  
  17194.  resolution  - (1) In computer graphics, a measure of the sharpness of an 
  17195.    image, expressed as the number of lines and columns on the display screen or 
  17196.    the number of pels per unit of area. (2) The number of lines in an image 
  17197.    that an imaging system (for example, a telescope, the human eye, a camera, 
  17198.    and so on) can resolve. A higher resolution makes text and graphics appear 
  17199.    clearer. 
  17200.  
  17201.  resource  - As used in the multimedia operating system, any specific unit of 
  17202.    data created or used by a multimedia program. See also static resource and 
  17203.    dynamic resource. 
  17204.  
  17205.  resource handler  - A system service that loads, saves, and manipulates 
  17206.    multimedia program units of data. 
  17207.  
  17208.  resource interchange file format (RIFF)  - A tagged file format framework 
  17209.    intended to be the basis for defining new file formats. 
  17210.  
  17211.  resync  -  Recovery processing performed by sync-point services when the 
  17212.    failure of a session, transaction program, or LU occurs during sync-point 
  17213.    processing.  The purpose of resync is to return protected resources to 
  17214.    consistent states. 
  17215.  
  17216.  resync tolerance value  - A minimum time difference expressed in MMTIME 
  17217.    format. 
  17218.  
  17219.  Revisable Form Text : Document Content Architecture (RFT:DCA)  - A data format 
  17220.    for multimedia products. 
  17221.  
  17222.  rewind  - To advance the medium in the backward direction quickly, and 
  17223.    optionally allow the user to scan the medium. 
  17224.  
  17225.  RFT:DCA  - Revisable Form Text : Document Content Architecture. 
  17226.  
  17227.  RGB  - Color coding where the brightness of the additive primary colors of 
  17228.    light, red, green, and blue, are specified as three distinct values of white 
  17229.    light. 
  17230.  
  17231.  RIFF  - Resource interchange file format. 
  17232.  
  17233.  RIFF chunk  - A chunk with a chunk ID of RIFF.  In a RIFF file, this must be 
  17234.    the first chunk. 
  17235.  
  17236.  RIFF compound file  - A file containing multiple file elements or one file 
  17237.    element that makes up the entire RIFF file.  The MMIO manager provides 
  17238.    services to find, query, and access any file elements in a RIFF compound 
  17239.    file. Synonym for bundle file. 
  17240.  
  17241.  rotoscope  - A camera setup that projects live-action film, one frame at a 
  17242.    time, onto a surface so that an animator can trace complicated movements. 
  17243.    When filmed, the completed animation matches the motion of the original 
  17244.    action. 
  17245.  
  17246.  rough cut  - (1) The result of the offline edit. (2) A video program that 
  17247.    includes the appropriate footage in the correct order but does not include 
  17248.    special effects. 
  17249.  
  17250.  RTMIDI  - Real-time MIDI subsystem. 
  17251.  
  17252.  
  17253. ΓòÉΓòÉΓòÉ <hidden> S ΓòÉΓòÉΓòÉ
  17254.  
  17255.  SAA  - Systems Application Architecture. 
  17256.  
  17257.  safety  - An extra shot of a scene that is taken as a backup after an 
  17258.    acceptable shot (the buy) has been acquired. 
  17259.  
  17260.  saturation  - The amounts of color and grayness in a hue that affect its 
  17261.    vividness;  that is, a hue with high saturation contains more color and less 
  17262.    gray than a hue with low saturation.  See also hue. 
  17263.  
  17264.  sampler  - A device that converts real sound into digital information for 
  17265.    storage on a computer. 
  17266.  
  17267.  scan backward  - To display the video and optionally play the audio while the 
  17268.    medium is advancing in the backward direction rapidly. 
  17269.  
  17270.  scan converter  - A device that converts digital signal to NTSC or PAL format. 
  17271.  
  17272.  scan forward  - To display the video and optionally play the audio while the 
  17273.    medium is advancing in the forward direction rapidly. 
  17274.  
  17275.  scan line  - (1) In a laser printer, one horizontal sweep of the laser beam 
  17276.    across the photoconductor. (2) A single row of picture elements. 
  17277.  
  17278.  scanner  - A device that examines a spatial pattern, one part after another, 
  17279.    and generates analog or digital signals corresponding to the pattern. 
  17280.  
  17281.  SCB  - Subsystem control block. 
  17282.  
  17283.  scene  - A portion of video captured by the camera in one continuous shot. 
  17284.    The scene is shot repeatedly (each attempt is called a take) until an 
  17285.    acceptable version, called the buy, is taken. 
  17286.  
  17287.  scheduler  - The code responsible for passing messages to instances.  The 
  17288.    scheduler has two queues, one for normal real-time MIDI messages (Q1), and 
  17289.    the other for low-priority SysEx messages (Q2).  (RTMIDI-specific term) 
  17290.  
  17291.  scheduler daemon  - A small executable program, MIDIDMON.EXE, which is used to 
  17292.    provide deferred-interrupt processing for the scheduler.  The daemon is a 
  17293.    super high-priority thread which gets blocked in ring 0. When the scheduler 
  17294.    needs to run, this thread is unblocked.  When the scheduler is finished, it 
  17295.    re-blocks itself.  When the unblocking occurs during an interrupt, the OS/2 
  17296.    kernel runs the daemon thread immediately after the interrupt handler has 
  17297.    exited.  This approach guarantees that the scheduler runs at task time. 
  17298.  
  17299.  scripting  - Writing needed dialog. 
  17300.  
  17301.  scroll bar  - A window component that shows a user that more information is 
  17302.    available in a particular direction and can be scrolled into view. Scroll 
  17303.    bars should not be used to represent an analog setting, like volume. 
  17304.    Sliders should be used. 
  17305.  
  17306.  SCSI  - Small computer system interface. 
  17307.  
  17308.  SECAM  - Sequential Couleurs a Memoire.  The French standard for color 
  17309.    television. 
  17310.  
  17311.  secondary window  - A window that contains information that is dependent on 
  17312.    information in a primary window and is used to supplement the interaction in 
  17313.    the primary window. 
  17314.  
  17315.  secondary window manager  -  A sizable dialog manager that enables application 
  17316.    writers to use CUA-defined secondary windows instead of dialog boxes. 
  17317.  
  17318.  second generation  - A direct copy from the master or original tape. 
  17319.  
  17320.  selection  - The act of explicitly identifying one or more objects to which a 
  17321.    subsequent choice will apply. 
  17322.  
  17323.  selection technique  - The method by which users indicate objects on the 
  17324.    interface that they want to work with. 
  17325.  
  17326.  semaphore  - (1) A variable that is used to enforce mutual exclusion. (T) (2) 
  17327.    An indicator used to control access to a file; for example, in a multiuser 
  17328.    application, a flag that prevents simultaneous access to a file. 
  17329.  
  17330.  sequencer  - A digital tape recorder. 
  17331.  
  17332.  set  - In videotaping, the basic background or area for production. 
  17333.  
  17334.  settings  - Characteristics of objects that can be viewed and sometimes 
  17335.    altered by the user.  Examples of a file's settings include name, size, and 
  17336.    creation date.  Examples of video clip's settings include brightness, 
  17337.    contrast, color, and tint. 
  17338.  
  17339.  settings view  - A view of an object that provides a way to change 
  17340.    characteristics and options associated with the object. 
  17341.  
  17342.  SFX  - Script abbreviation for special effects. 
  17343.  
  17344.  shade  - To darken with, or as if with, a shadow; to add shading to. 
  17345.  
  17346.  sharpness  - Refers to the clarity and detail of a video image.  A sharpness 
  17347.    value of 0 causes the video to be generally fuzzy with little detail.  A 
  17348.    sharpness value of 100 causes the video to be generally very detailed, and 
  17349.    may appear grainy. 
  17350.  
  17351.  SHC  -  Stream handler command. 
  17352.  
  17353.  shoot  - To videotape the needed pictures for the production. 
  17354.  
  17355.  shooting script  - Synonym for final script. 
  17356.  
  17357.  shot list  - A list containing each shot needed to complete a production, 
  17358.    usually broken down into a schedule. 
  17359.  
  17360.  simple device  - A multimedia device model for hardware which does not require 
  17361.    any additional objects, known as device elements, to perform multimedia 
  17362.    functions. 
  17363.  
  17364.  sine wave  - A waveform that represents periodic oscillations of a pure 
  17365.    frequency. 
  17366.  
  17367.  single plane video system  - Refers to when video and graphics are combined 
  17368.    into one buffer.  This may appear the same as a dual plane video system, but 
  17369.    since all the data is in one buffer, capture and restore operations will 
  17370.    obtain both graphics and video components in one operation. See also dual 
  17371.    plane video system. 
  17372.  
  17373.  single selection  - A selection technique in which a user selects one, and 
  17374.    only one, item at a time. 
  17375.  
  17376.  slave stream  - A stream that is dependent on the master stream to maintain 
  17377.    synchronization. 
  17378.  
  17379.  slave stream handler  - In SPI, regularly updates the sync pulse EVCB with the 
  17380.    stream time.  The Sync/Stream Manager checks the slave stream handler time 
  17381.    against the master stream time to determine whether to send a sync pulse to 
  17382.    the slave stream handler. 
  17383.  
  17384.  slider  - A visual component of a user interface that represents a quantity 
  17385.    and its relationship to the range of possible values for that quantity.  A 
  17386.    user can also change the value of the quantity.  Sliders are used for volume 
  17387.    and time control. 
  17388.  
  17389.  slider arm  - The visual indicator in the slider that a user can move to 
  17390.    change the numerical value. 
  17391.  
  17392.  slider button  - A button on a slider that a user clicks on to move the slider 
  17393.    arm one increment in a particular direction, as indicated by the directional 
  17394.    arrow on the button. 
  17395.  
  17396.  slide-show presentation  - Synonym for storyboard. 
  17397.  
  17398.  slot  - A distinct position in an instance from which links can be attached. 
  17399.    The same message is sent along all links on a slot, but an instance can 
  17400.    determine at run-time on which slots the message should be sent.  An 
  17401.    instance can support multiple slots if it wants to be able to send different 
  17402.    messages to different targets.  (RTMIDI-specific term) 
  17403.  
  17404.  small computer system interface (SCSI)  - An input and output bus that 
  17405.    provides a standard interface between the OS/2* multimedia system and 
  17406.    peripheral devices. 
  17407.  
  17408.  SMH  - Stream manager helper. 
  17409.  
  17410.  SMPTE  - Society of Motion Picture and Television Engineers. 
  17411.  
  17412.  SMPTE time code  - A frame-numbering system developed by SMPTE that assigns a 
  17413.    number to each frame of video.  The 8-digit code is in the form HH:MM:SS:FF 
  17414.    (hours, minutes, seconds, frame number).  The numbers track elapsed hours, 
  17415.    minutes, seconds, and frames from any chosen point. 
  17416.  
  17417.  SMV  - Software motion video. 
  17418.  
  17419.  socketable user interface  - An interface defined by multimedia controls that 
  17420.    enable the interface to be plugged into and unplugged from applications 
  17421.    without affecting the underlying object control subsystem. 
  17422.  
  17423.  sound track  - Synonym for audio track. 
  17424.  
  17425.  source node  - An instance which can generate a compound message.  Hardware 
  17426.    nodes generate messages from data received from Type A drivers.  Application 
  17427.    nodes generate them from data sent from an application. (RTMIDI-specific 
  17428.    term) 
  17429.  
  17430.  source rectangle  - An abstract region representing the area available for use 
  17431.    by a video capture adapter.  This window is displayed in the monitor window 
  17432.    of the digital video device.  A subset of the maximum possible region to be 
  17433.    captured can be defined; such a subset is shown by an animated dashed 
  17434.    rectangle in the monitor window. 
  17435.  
  17436.  source window  - See source rectangle. 
  17437.  
  17438.  SPCB  - Stream protocol control block. 
  17439.  
  17440.  special effects  - In videotaping, any activity that is not live footage, such 
  17441.    as digital effects, computer manipulation of the picture, and nonbackground 
  17442.    music. 
  17443.  
  17444.  SPI  - Stream programming interface. 
  17445.  
  17446.  split streaming  - A mechanism provided by the Sync/Stream Manager to create 
  17447.    one data stream source with multiple targets. 
  17448.  
  17449.  SPP  - A time format based on the number of beats-per-minute in the MIDI file. 
  17450.  
  17451.  sprite  - An animated object that moves around the screen without affecting 
  17452.    the background. 
  17453.  
  17454.  sprite graphics  - A small graphics picture, or series of pictures, that can 
  17455.    be moved independently around the screen, producing animated effects. 
  17456.  
  17457.  squeeze-zoom  - A DVE where one picture is reduced in size and displayed with 
  17458.    a full-screen picture. 
  17459.  
  17460.  SSM  - Sync/Stream Manager. 
  17461.  
  17462.  standard multimedia device controls  - These controls provide the application 
  17463.    developer with a CUA compliant interface for controlling audio attributes, 
  17464.    video attributes, and videodisc players. These controls simplify the 
  17465.    programming task required to create the interface and handle the 
  17466.    presentation of the interface and all interaction with the user.  They also 
  17467.    send the Media Control Interface (MCI) commands to the Media Device Manager 
  17468.    (MDM) for processing. 
  17469.  
  17470.  standard objects  - A set of common, cross-product objects provided and 
  17471.    supported by the system.  Examples include folders, printers, shredders, and 
  17472.    media players. 
  17473.  
  17474.  standard palette  - A set of colors that is common between applications or 
  17475.    images. See also custom palette and color palette. 
  17476.  
  17477.  static resource  - A resource that resides on any read-and-write or read-only 
  17478.    medium. Contrast with dynamic resource. 
  17479.  
  17480.  status area  - Provides information as to the state of the medium and device, 
  17481.    or both.  It should indicate what button is currently pressed and what modes 
  17482.    (for example, mute) are active. 
  17483.  
  17484.  step backward  - To move the medium backward one frame or segment at a time. 
  17485.  
  17486.  step forward  - To move the medium forward one frame or segment at a time. 
  17487.  
  17488.  still  - A static photograph. 
  17489.  
  17490.  still image  - See video image. 
  17491.  
  17492.  still video capture adapter  - An adapter that, when attached to a computer, 
  17493.    enables a video camera to become an input device.  See also motion video 
  17494.    capture adapter. 
  17495.  
  17496.  stop  - Halt (stops) the medium. 
  17497.  
  17498.  storage system  - The method or format a functional unit uses to retain or 
  17499.    retrieve data placed within the unit. 
  17500.  
  17501.  storage system IOProc  - A procedure that unwraps data objects such as RIFF 
  17502.    files, RIFF compound files, and AVC files.  IOProcs are ignorant of the 
  17503.    content of the data they contain.  A storage system IOProc goes directly to 
  17504.    the OS/2 file system (or to memory in the case of a MEM file) and does not 
  17505.    pass information to any other file format or storage system IOProc.  The 
  17506.    internal I/O procedures provided for DOS files, memory files, and RIFF 
  17507.    compound files are examples of storage system IOProcs, because they operate 
  17508.    on the storage mechanism rather than on the data itself. See also file 
  17509.    format IOProc. 
  17510.  
  17511.  storyboard  - (1) A visual representation of the script, showing a picture of 
  17512.    each scene and describing its corresponding audio. (2) Synonym for 
  17513.    slide-show presentation. 
  17514.  
  17515.  storyboarding  - Producing a sequence of still images, such as titles, 
  17516.    graphics, and images, to work out the visual details of a script. 
  17517.  
  17518.  stream  - To send data from source to destination via buffered system memory. 
  17519.  
  17520.  stream connector  - A port or connector that a device uses to send or receive. 
  17521.    See also connector. 
  17522.  
  17523.  stream handler  - A routine that controls a program's reaction to a specific 
  17524.    external event through a continuous string of individual data values. 
  17525.  
  17526.  stream handler command (SHC)  - Synchronous calls provided by both ring 3 DLL 
  17527.    stream handlers as a DLL call and by ring 0 PDD stream handlers as a IDC 
  17528.    call.  The stream handler commands are provided through a single entry 
  17529.    point, SHCEntryPoint, which accepts a parameter structure on input.  This 
  17530.    enables the DLL and PDD interfaces to the stream manager to be the same. 
  17531.  
  17532.  stream manager  - A system service that controls the registration and 
  17533.    activities of all stream handlers. 
  17534.  
  17535.  stream manager helper (SMH)  - Routines provided by the stream manager for use 
  17536.    by all stream handlers.  The stream handlers use these helper routines to 
  17537.    register with the manager, report events, and synchronize cues to the 
  17538.    manager to request or return buffers to the manager.  They are synchronous 
  17539.    functions and are available to both ring 3 DLL stream handlers as a DLL call 
  17540.    and to ring 0 PDD stream handlers. 
  17541.  
  17542.  stream programming interface  - A system service that supports continual flow 
  17543.    of data between physical devices. 
  17544.  
  17545.  stream programming interface (SPI)  - A system service that supports continual 
  17546.    flow of data between physical devices. 
  17547.  
  17548.  stream protocol control block (SPCB)  - The system service that controls the 
  17549.    behavior of a specified stream type.  This enables you to subclass a 
  17550.    stream's data type, change data buffering characteristics, and alter 
  17551.    synchronization behavior and other stream events. 
  17552.  
  17553.  strike  - In videotaping, to clear away, remove, or dismantle anything on the 
  17554.    set. 
  17555.  
  17556.  subchunk  - The first chunk in a RIFF file is a RIFF chunk; all other chunks 
  17557.    in the file are subchunks of the RIFF chunk. 
  17558.  
  17559.  subclassing  - The act of intercepting messages and passing them on to their 
  17560.    original intended recipient. 
  17561.  
  17562.  super  - Titles or graphics overlaid on the picture electronically. See also 
  17563.    superimpose. 
  17564.  
  17565.  superimpose  - To overlay titles or graphics on the picture electronically. 
  17566.  
  17567.  S-video  - (1) Separated video or super video. (2) A signal system using a Y/C 
  17568.    format. (3) See also Y/C, composite video, and component video. 
  17569.  
  17570.  S-Video input connector  - A special connector that separates the chrominance 
  17571.    from the luminance signal. 
  17572.  
  17573.  sweetening  - (1) The equalization of audio to eliminate noise and obtain the 
  17574.    cleanest and most level sound possible. (2) The addition of laughter to an 
  17575.    audio track. 
  17576.  
  17577.  switching  - Electronically designating, from between two or more video 
  17578.    sources, which source's pictures are recorded on tape.  Switching can occur 
  17579.    during a shoot or during an edit. 
  17580.  
  17581.  symmetric video compression  - A technology in which the computer can be used 
  17582.    to create, as well as play back, full-motion, full-color video. 
  17583.  
  17584.  sync  - Synchronization or synchronized. 
  17585.  
  17586.  synchronization  - The action of forcing certain points in the execution 
  17587.    sequences of two or more asynchronous procedures to coincide in time. 
  17588.  
  17589.  synchronous  - Pertaining to two or more processes that depend upon the 
  17590.    occurrence of specific events such as common timing signals. 
  17591.  
  17592.  sync group  - A master stream and all its slaves that can be started, stopped, 
  17593.    and searched as a group by using the slaves flag on each of the following 
  17594.    SPI functions: 
  17595.  
  17596.        SpiStartStream 
  17597.        SpiStopStream 
  17598.        SpiSeekStream 
  17599.  
  17600.  sync pulse  - A system service that enables each slave stream handler to 
  17601.    adjust the activity of that stream so that synchronization can be 
  17602.    maintained. Sync pulses are introduced by transmission equipment into the 
  17603.    receiving equipment to keep the two equipments operating in step. 
  17604.  
  17605.  sync signal  - Video signal used to synchronize video equipment. 
  17606.  
  17607.  synthesizer  - A musical instrument that allows its user to produce and 
  17608.    control electronically generated sounds. 
  17609.  
  17610.  system message  - A predefined message sent by the MMIO manager for the 
  17611.    message's associated function.  For example, when an application calls 
  17612.    mmioOpen, the MMIO manager sends an MMIOM_OPEN message to an I/O procedure 
  17613.    to open the specified file. 
  17614.  
  17615.  Systems Application Architecture (SAA)  - A set of IBM software interfaces, 
  17616.    conventions, and protocols that provide a framework for designing and 
  17617.    developing applications that are consistent across systems. 
  17618.  
  17619.  
  17620. ΓòÉΓòÉΓòÉ <hidden> T ΓòÉΓòÉΓòÉ
  17621.  
  17622.  tagged image file format (TIFF)  - An easily transportable image file type 
  17623.    used by a wide range of multimedia software. 
  17624.  
  17625.  take  - During the shoot in videotaping, each separate attempt at shooting a 
  17626.    scene. This is expressed as: Scene 1, Take 1; Scene 1, Take 2, and so on. 
  17627.  
  17628.  talent  - On-screen person (professional or amateur) who appears before the 
  17629.    camera or does voice-over narration. 
  17630.  
  17631.  TAM  - Telephone answering machine. 
  17632.  
  17633.  target node  - An instance which receives a message but does not forward it 
  17634.    because it is the final instance in a chain of processing.  For example, a 
  17635.    hardware node is a target node because when it receives a message, it sends 
  17636.    it to another device driver, and not to another instance. (RTMIDI-specific 
  17637.    term) 
  17638.  
  17639.  tearing  - Refers to when video is displaced horizontally.  This may be caused 
  17640.    by sync problems. 
  17641.  
  17642.  TelePrompTer  - A special monitor mounted in front of a camera so that talent 
  17643.    can read text and will appear to be looking at the camera. 
  17644.  
  17645.  thaw  - See unfreeze. 
  17646.  
  17647.  thumbnail  - A small representation of an object.  For example, a full screen 
  17648.    image might be presented in a much smaller area in an authoring system time 
  17649.    line.  A picon is an example of a thumbnail. 
  17650.  
  17651.  TIFF  - Tagged Image File Format time code. 
  17652.  
  17653.  tilt  - A camera movement where the camera pivots up or down on its stationary 
  17654.    tripod. 
  17655.  
  17656.  timbre  - The distinctive tone of a musical instrument or human voice that 
  17657.    distinguishes it from other sounds. 
  17658.  
  17659.  time code  - See SMPTE time code. 
  17660.  
  17661.  time-line processor  - A type of authoring facility that displays an event as 
  17662.    elements that represent time from the start of the event. 
  17663.  
  17664.  tint  - See hue. 
  17665.  
  17666.  TMSF  - A time format expressed in tracks, minutes, seconds, and frames, which 
  17667.    is used primarily by compact disc audio devices. 
  17668.  
  17669.  tone (bass, treble, etc... )  - A control that adjusts the various attributes 
  17670.    of the audio. 
  17671.  
  17672.  tool palette  - A palette containing choices that represent tools, often used 
  17673.    in media editors (such as graphics and audio editors).  For example, a user 
  17674.    might select a "pencil"  choice from the tool palette to draw a line in the 
  17675.    window. 
  17676.  
  17677.  touch area  - (1) An area of a display screen that is activated to accept user 
  17678.    input. (2) Synonymous with anchor, hot spot, and trigger. 
  17679.  
  17680.  track  - A path associated with a single Read/Write head as the data medium 
  17681.    moves past it. 
  17682.  
  17683.  track advance  - To advance the medium to the beginning of the next track. 
  17684.  
  17685.  track reverse  - To rewind the medium to the beginning of the current track. 
  17686.    If it is at the beginning of the track it will then jump to the beginning of 
  17687.    the previous track. 
  17688.  
  17689.  transform device  -  A device that modifies a signal or stream received from a 
  17690.    transport device.  Examples are amplifier-mixer and overlay devices. 
  17691.  
  17692.  translator  - A computer program that can translate.  In telephone equipment 
  17693.    the device that converts dialed digits into call-routine information. 
  17694.  
  17695.  transparency  - Refers to when a selected color on a graphics screen is made 
  17696.    transparent to allow the video "behind it" to become visible.  Often found 
  17697.    in dual plane video subsystems. 
  17698.  
  17699.  transparent color  - Video information is considered as being present on the 
  17700.    video plane which is maintained behind the graphics plane.  When an area on 
  17701.    the graphics plane is painted with a transparent color, the video 
  17702.    information in the video plane is made visible. See also dual plane video 
  17703.    system. 
  17704.  
  17705.  transport device  - A device that plays, records, and positions a media 
  17706.    element, and either presents the result directly or sends the material to a 
  17707.    transform device.  Examples are videodisc players, CD-ROMs, and digital 
  17708.    audio (wave) player. 
  17709.  
  17710.  treatment  - A detailed design document of the video. 
  17711.  
  17712.  tremolo  - A vibrating effect of a musical instrument produced by small and 
  17713.    rapid amplitude variations to produce special musical effects. 
  17714.  
  17715.  trigger  - (1) An area of a display screen that is activated to accept user 
  17716.    input. (2) Synonymous with anchor, hot spot, and touch area. 
  17717.  
  17718.  truck  - In videotaping, a sideways camera movement of the tripod on which the 
  17719.    camera is mounted. 
  17720.  
  17721.  tweening  - (1) The process of having the computer draw intermediate animation 
  17722.    frames between key frames.  In other words, the animation tool requires only 
  17723.    that pictures of key sections of a motion be provided; the software 
  17724.    calculates all the in-between movements. (2) Synonym for in-betweening. 
  17725.  
  17726.  
  17727. ΓòÉΓòÉΓòÉ <hidden> U ΓòÉΓòÉΓòÉ
  17728.  
  17729.  Ultimatte  - The trade name of a very high-quality, special-effects system 
  17730.    used for background replacement and image composites. 
  17731.  
  17732.  U-matic  - A video cassette system using 0.75-inch tape format. 
  17733.  
  17734.  underrun  - Loss of data caused by the inability of a transmitting device or 
  17735.    channel to provide data to the communication control logic (SDLC or BSC/SS) 
  17736.    at a rate fast enough for the attached data link or loop. 
  17737.  
  17738.  unfreeze  - (1) To return to action after a freeze. (2) Enables updates to the 
  17739.    video buffer. (3) Synonym for thaw. 
  17740.  
  17741.  unidirectional microphone  - A microphone that responds to sound from only one 
  17742.    direction and is not subject to change of direction.  (A unidirectional 
  17743.    microphone is the type of microphone employed in computers capable of voice 
  17744.    recognition.) 
  17745.  
  17746.  unload  - To eject the medium from the device. 
  17747.  
  17748.  user-defined message  - A private message sent directly to an I/O procedure by 
  17749.    using the mmioSendMessage function.  All messages begin with an MMIOM 
  17750.    prefix, with user-defined messages starting at MMIOM_USER or above. 
  17751.  
  17752.  user interface  - The area at which a user and an object come together to 
  17753.    interact. As applied to computers, the ensemble of hardware and software 
  17754.    that allows a user to interact with a computer. 
  17755.  
  17756.  user's conceptual model  - A user's mental model about how things should work. 
  17757.    Much of the concepts and expectations that make up the model are derived 
  17758.    from the user's experience with real-world objects of similar type, and 
  17759.    experience with other computer systems. 
  17760.  
  17761.  
  17762. ΓòÉΓòÉΓòÉ <hidden> V ΓòÉΓòÉΓòÉ
  17763.  
  17764.  value set  - A control used to present a series of mutually exclusive 
  17765.    graphical choices.  A tool palette in a paint program can be implemented 
  17766.    using a value set. 
  17767.  
  17768.  VCR  - Videocassette recorder. 
  17769.  
  17770.  VDD  - Virtual device driver. 
  17771.  
  17772.  VDH  - Virtual device helper. 
  17773.  
  17774.  VDP  - Video display processor. 
  17775.  
  17776.  vector graphics  - See coordinate graphics. 
  17777.  
  17778.  vendor specific drivers  - An extension to an MCD to execute hardware specific 
  17779.    commands. 
  17780.  
  17781.  VHS  - Very high speed.  A consumer and industrial tape format (VHS format). 
  17782.  
  17783.  vicon  - A vicon, or video icon, can be an animation or motion video segment 
  17784.    in icon size.  Usually this would be a short, repeating segment, such as an 
  17785.    animation of a cassette tape with turning wheels. 
  17786.  
  17787.  video  - Pertaining to the portion of recorded information that can be seen. 
  17788.  
  17789.  video aspect ratio  - See aspect ratio. 
  17790.  
  17791.  video attribute control  - Provides access to and operation of the standard 
  17792.    video attributes: brightness, contrast, freeze, hue, saturation, and 
  17793.    sharpness. All device communication and user interface support is handled by 
  17794.    the control. 
  17795.  
  17796.  video attributes  - Refers to the standard video attributes: brightness, 
  17797.    contrast, freeze, hue, saturation, and sharpness. 
  17798.  
  17799.  video clip  - A section of filmed or videotaped material. 
  17800.  
  17801.  video clipping  - See clipping. 
  17802.  
  17803.  video digitizer  - Any system for converting analog video material to digital 
  17804.    representation.  (For example, see DVI.) 
  17805.  
  17806.  video display buffer  - The buffer containing the visual information to be 
  17807.    displayed.  This buffer is read by the video display controller. 
  17808.  
  17809.  video display controller  - The graphics or video adapter that connects to a 
  17810.    display and presents visual information. 
  17811.  
  17812.  video encoder  - A device (adapter) that transforms the high-resolution 
  17813.    digital image from the computer into a standard television signal, thereby 
  17814.    allowing the computer to create graphics for use in video production. 
  17815.  
  17816.  video graphics adapter  - A graphics controller for color displays.  The pel 
  17817.    resolution of the video graphics adapter is 4:4. 
  17818.  
  17819.  video image  - (1) A still video image that has been captured. (2) Synonymous 
  17820.    with image and still image. 
  17821.  
  17822.  video monitor  - A display device capable of accepting a video signal that is 
  17823.    not modulated for broadcast either on cable or over the air; in videotaping, 
  17824.    a television screen located away from the set where the footage can be 
  17825.    viewed as it is being recorded. 
  17826.  
  17827.  video overlay  - See overlay. 
  17828.  
  17829.  video overlay device  - See overlay device. 
  17830.  
  17831.  video plane  - In a dual plane video system, the video plane contains the 
  17832.    video.  This video plane will be combined with the graphics plane to create 
  17833.    an entire display image. 
  17834.  
  17835.  video programming interface (VPI)  - A subsystem that performs output from 
  17836.    video source to video window. 
  17837.  
  17838.  video quality  - The compression quality level setting to be set for the 
  17839.    CODEC. This value is in the range of 0 (min) - 100 (max). 
  17840.  
  17841.  video record rate  - Frame rate for recording as an integral number of frames 
  17842.    per second. This sets the target capture rate, but there are no assurances 
  17843.    this rate will be attained.  Drop frame records will be inserted into the 
  17844.    output data stream to indicate frames dropped during the capture/record 
  17845.    process. 
  17846.  
  17847.  video record frame duration  - Frame rate for recording as the time duration 
  17848.    of each frame in microseconds. Useful for setting non-integer frame rates, 
  17849.    for example, 12.5 FPS of a PAL videodisc:  1000000/12.5 = 8000 microseconds. 
  17850.  
  17851.  video signal  - An electrical signal containing video information.  The signal 
  17852.    must be in some standard format, such as NTSC or PAL. 
  17853.  
  17854.  VSD  - Vendor Specific Driver 
  17855.  
  17856.  video scaling  - (1) Expanding or reducing video information in size or area. 
  17857.    (2) See also aspect ratio. 
  17858.  
  17859.  video scan converter  - A device that emits a video signal in one standard 
  17860.    into another device of different resolution or scan rate. 
  17861.  
  17862.  video segment  - A contiguous set of recorded data from a video track.  A 
  17863.    video segment might or might not be associated with an audio segment. 
  17864.  
  17865.  video signal  - An electrical signal containing video information.  The signal 
  17866.    must be in some standard format, such as NTSC or PAL. 
  17867.  
  17868.  video source selection  - The ability of an application to change to an 
  17869.    alternate video input using the connector command. 
  17870.  
  17871.  video tearing  - See tearing. 
  17872.  
  17873.  video teleconferencing  - A means of telecommunication characterized by audio 
  17874.    and video transmission, usually involving several parties.  Desktop video 
  17875.    teleconferencing could involve having the audio and video processed by the 
  17876.    user's computer system, that is, with the other users' voices coming through 
  17877.    the computer's speaker, and video windows of the other users displayed on 
  17878.    the computer's screen. 
  17879.  
  17880.  videocassette recorder (VCR)  - A device for recording or playing back 
  17881.    videocassettes. 
  17882.  
  17883.  videodisc  - A disc on which programs have been recorded for playback on a 
  17884.    computer (or a television set); a recording on a videodisc.  The most common 
  17885.    format in the United States and Japan is an NTSC signal recorded on the 
  17886.    optical reflective format. 
  17887.  
  17888.  videodisc player control  - Provides access to and operation of the following 
  17889.    videodisc functions: eject, pause, play forward, play reverse, position, 
  17890.    record, repeat, rewind, scan forward, scan reverse, step forward, step 
  17891.    reverse, and stop. All device communication and user interface support is 
  17892.    handled by the control. 
  17893.  
  17894.  videotape  - (1) The tape used to record visual images and sound. (2) To make 
  17895.    a videotape of. (3) A recording of visual images and sound made on magnetic 
  17896.    tape.  (All shooting is done in this format, even if the results are later 
  17897.    transferred to videodisc or film.) 
  17898.  
  17899.  videotape recorder (VTR)  - A device for recording and playing back 
  17900.    videotapes.  (The professional counterpart of a consumer VCR.) 
  17901.  
  17902.  videotex  - A system that provides two-way interactive information services, 
  17903.    including the exchange of alphanumeric and graphic information, over common 
  17904.    carrier facilities to a mass consumer market using modified TV displays with 
  17905.    special decoders and modems. 
  17906.  
  17907.  video windows  - Graphical PM-style windows in which video is displayed.  Most 
  17908.    often associated with the video overlay device. 
  17909.  
  17910.  view  - The form in which an object is presented.  The four kinds of views 
  17911.    are:  composed, contents, settings, and help. 
  17912.  
  17913.  viewport  - An area on the usable area of the display surface over which the 
  17914.    developer has control of the size, location, and scaling, and in which the 
  17915.    user can view all or a portion of the data outlined by the window. 
  17916.  
  17917.  virtual device helper  - A system service that is available to perform 
  17918.    essential functions. 
  17919.  
  17920.  VO  - Script abbreviation for voice-over. 
  17921.  
  17922.  voice-over  - (1) The voice of an unseen narrator in a video presentation. (2) 
  17923.    A voice indicating the thoughts of a visible character without the 
  17924.    character's lips moving. 
  17925.  
  17926.  volume  - The intensity of sound.  A volume of 0 is minimum volume.  A volume 
  17927.    of 100 is maximum volume. 
  17928.  
  17929.  VPI  - Video programming interface. 
  17930.  
  17931.  VTR  - Videotape recorder. 
  17932.  
  17933.  
  17934. ΓòÉΓòÉΓòÉ <hidden> W ΓòÉΓòÉΓòÉ
  17935.  
  17936.  walk-through  - A type of animated presentation that simulates a walking tour 
  17937.    of a three-dimensional scene. 
  17938.  
  17939.  walk-up-and-use interface  - An interface that the target audience should be 
  17940.    able to use without having to read manuals or instructions, even if they 
  17941.    have never seen the interface. 
  17942.  
  17943.  waveform  - (1) A graphic representation of the shape of a wave that indicates 
  17944.    its characteristics (such as frequency and amplitude). (2) A digital method 
  17945.    of storing and manipulating audio data. 
  17946.  
  17947.  wide shot  - Synonym for long shot. 
  17948.  
  17949.  wild footage  - Synonym for original footage. 
  17950.  
  17951.  window  -  An area of the screen with visible boundaries within which 
  17952.    information is displayed.  A window can be smaller than or the same size as 
  17953.    the screen.  Windows can appear to overlap on the screen. 
  17954.  
  17955.  window coordinates  - The size and location of a window. 
  17956.  
  17957.  wipe  - Technical effect of fading away one screen to reveal another. 
  17958.  
  17959.  workplace  - A container that fills the entire screen and holds all of the 
  17960.    objects that make up the user interface. 
  17961.  
  17962.  write once/read many (WORM)  - Describes an optical disc that once written to, 
  17963.    cannot be overwritten.  Storage capacity ranges from 400MB to 3.2GB. 
  17964.    Present technology allows only one side to be read at a time; to access the 
  17965.    other side, the disk must be turned over. 
  17966.  
  17967.  WS  - Script abbreviation for wide shot. 
  17968.  
  17969.  WYSIWYG  - What You See Is What You Get.  The appearance of the object is in 
  17970.    actual form.  For example, a document that looks the same on a display 
  17971.    screen as it does when it is printed.  Composed views of objects are often 
  17972.    WYSIWYG. 
  17973.  
  17974.  
  17975. ΓòÉΓòÉΓòÉ <hidden> X Y Z ΓòÉΓòÉΓòÉ
  17976.  
  17977.  Y  - Refers to the luminance portion of a Y/C video signal. 
  17978.  
  17979.  Y/C  - Color image encoding that separates luminance ((Y) and chrominance (C) 
  17980.    signals. 
  17981.  
  17982.  YIQ  - Image encoding scheme similar to YUV that selects the direction of the 
  17983.    two color axes, I and Q, to align with natural images.  As an average, the I 
  17984.    signal bears much more information than the Q signal.  (YIQ is used in the 
  17985.    NTSC video standard.) 
  17986.  
  17987.  YUV  - Color image encoding scheme that separates luminance (Y) and two color 
  17988.    signals: red minus Y (U), and blue minus Y (V).  Transmission of YUV can 
  17989.    take advantage of the eye's greater sensitivity to luminance detail than 
  17990.    color detail. 
  17991.  
  17992.  zoom in  - An optical camera change where the camera appears to approach the 
  17993.    subject it is shooting. 
  17994.  
  17995.  zooming  - The progressive scaling of an image in order to give the visual 
  17996.    impression of movement of all or part of a display group toward or away from 
  17997.    an observer. 
  17998.  
  17999.  zoom out  - An optical camera change where the camera appears to back up from 
  18000.    the subject it is shooting. 
  18001.