Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

211 lines
6.9 KiB

  1. Files for \NT\PRIVATE\WINDOWS\MEDIA
  2. (Not all the files for media are here - VIDCAP is also
  3. part of media, but is (currently) a separate project.
  4. Some of the parts have the common Daytona/Chicago master
  5. sources in Redmond - e.g. Soundrec. Look at ssyncme.bat
  6. and read.me files to spot these).
  7. The "I" in the rest of this is NigelT. It's not been
  8. kept up to date, but there still seems to be some value in it,
  9. so I (LaurieGr 3/94) have just left it.
  10. ---------------------------------------------------------------
  11. NT / Win32 Multimedia Project
  12. =============================
  13. This note will tell you about the project tree structure, how to
  14. enlist, what each element is for and what items are complete.
  15. Enlisting
  16. ---------
  17. Enlist in the MEDIA project as a subdirectory of the WINDOWS project.
  18. Example:
  19. [C:\nt\private\windows] md media
  20. [C:\nt\private\windows] cd media
  21. [C:\nt\private\windows\media] enlist -s \\rastaman\ntwin -p media
  22. Project tree
  23. ------------
  24. The media project consists of a number of DLLs and some test applications.
  25. media
  26. |
  27. +- inc Assorted header files
  28. +- sounds Licensed Prosonus sounds for the PDK
  29. +- winmm Source for WINMM.DLL
  30. +- mciwave Source for MCIWAVE.DLL
  31. +- mcicda Source for MCICDA.DLL
  32. |
  33. +- test
  34. | |
  35. | +- playsnd Source for PLAYSND.EXE
  36. | +- mci Source for MCI.EXE
  37. | +- mcitest Source for MCITEST.EXE
  38. | +- mmiotest Source for MMIOTEST.EXE
  39. |
  40. +- tools
  41. |
  42. +- extract Source for EXTRACT.EXE
  43. +- docfmt Source for DOCFMT.EXE
  44. A bit more detail on each item follows. As a general note: when
  45. viewing the sources, remember that much of the code and headers were
  46. taken directly from Win16 sources and consequently have their own
  47. coding style, documentation technique and data types.
  48. Include files
  49. -------------
  50. gmem.h This header redefines some global memory allocation macros
  51. used in winmm which avoids rewriting the winmm code.
  52. mcihand.h This is a partial definition of an interface for MCI handlers
  53. which could one day be made public.
  54. mmiocf.h This defines the unpublished (by anyone) compound file
  55. support for RIFF format files. It would become public when
  56. the file definition becomes public. There is currently
  57. only stub support for these APIs.
  58. Sound Files
  59. -----------
  60. The sounds directory contains a set of sounds which were licensed
  61. from Prosonus by Microsoft for use in the Multimedia Windows product.
  62. The license allows us to distribute them with any MS product.
  63. One file (bummer.wav) was recorded at MS by me (NigelT). It is the
  64. voice of my old program manager Bob Seidensticker and may also be
  65. distributed freely.
  66. WINMM
  67. -----
  68. This DLL provides the Multimedia api set. Currently (PDK) this
  69. is only PlaySound, but should include the MCI API set. Please
  70. refer to the source and the Level I Multimedia documents for more
  71. details on MCI (Media Control Interface). Support for the MMIO
  72. API set is also included here. See the Level I docs for details.
  73. I have ported the MCI APIs and most of it works. The auto open
  74. feature is missing however. This was achieved in Windows by using
  75. a second task and needs to be implemented here with a thread. The
  76. code path is a little obscure here but the function which needs
  77. attention is called mciSendSystemString.
  78. The code is almost exactly the Win16 code as written by DavidLe
  79. with minor tweaks to get rid of compile time warnings.
  80. The test apps below exercise this DLL. See also the notes on
  81. debugging support.
  82. Once MCI works with wave files, the PlaySound API should be reworked
  83. to use MCI. This will allow PlaySound to play files which don't fit
  84. in the available memory quota (~250k).
  85. MCIWAVE
  86. -------
  87. This DLL provides an MCI handler for wave files. It is not yet
  88. written. See the MCICDA handler for a more complete example.
  89. This handler should use a thread to asynchronously supply the
  90. sound driver with data from a file, resource or whatever and respond
  91. to the commands sent to it by the MCI support in WINMM.DLL
  92. MCICDA
  93. ------
  94. This DLL provides an MCI handler for playing audio CDs via a CD-ROM
  95. drive on the SCSI bus. I have been working with Mike Glass on this.
  96. About 20% of it is done. It can play a CD from and to a specifiec
  97. location on the disk.
  98. PLAYSND
  99. -------
  100. This app will play Multimedia sound files. It is currently a part
  101. of the daily build and is currently in vogue as a demo and hence
  102. there will be much wailing when it is found to be broken next.
  103. It uses only the PlaySound and MessageBeep APIs to do the business.
  104. This is primarily a test app for PlaySound and not a demo so
  105. whoever is developing should feel free to modify it - I did.
  106. MCI
  107. ---
  108. This is a Win32 console app which exercises the MCI string interface
  109. and hence most of MCI and the MCI handlers. I have been using this
  110. to test the MCICDA handler. The code is only a few lines long and is
  111. an indication of just how easy it is to add Multimedia support
  112. to an app.
  113. MCITEST
  114. -------
  115. This is an incomplete port of a Win16 test app for MCI. I gave up
  116. with this because of USER/GDI troubles. This should be completed
  117. and used instead of MCI since it has a better feature set from a
  118. test perspective and is a GUI app not a boring old char mode app.
  119. MMIOTEST
  120. --------
  121. This is the wierdest port of all. I couldn't be bothered to port
  122. this Win16 app to Win32 so I simply wrote a 'main' which calls the
  123. test functions inside it. If you look at it, ignore all the
  124. windowing code - it's never executed.
  125. Run it from a console window to test the MMIO API set and features
  126. in WINMM.DLL.
  127. EXTRACT and DOCFMT
  128. ------------------
  129. These are rather rough OS/2 port of tools the Multimedia group
  130. developed for generating documentation from the source code. This
  131. system is called AUTODOC and can generate WinHelp, WinWord and Ventura
  132. output directly from the source code - usually by invoking a make
  133. option such as "make docs".
  134. Since much of the code I have ported contains this embedded doc
  135. support, I ported the tools to be able to print it out. The system
  136. is 4,000,000,000 times better than the NT doc system but wasn't
  137. invented here.
  138. Details of how to use AUTODOC for global domination projects can
  139. be obtained from the Multimedia group (t-MarkMc).
  140. Debugging support
  141. -----------------
  142. Most apps and all of the dlls have run-time variable debug level
  143. messages. Look at the debug.c module in each DLL source for details.
  144. As an example the variable winmmDebugLevel controls the output from
  145. WINMM.
  146. Debug levels are used as follows:
  147. 0 No output (even for errors)
  148. 1 Error reporting
  149. 2 Major function calls
  150. 3 Minor function calls
  151. 4 Mindless detail, data dumps etc.
  152. This isn't always how it's used but that's the idea.
  153. The header files show how the dprintf1,2,3,4 macros work that generate
  154. this output.