ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mme.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * COPYRIGHT:            See COPYING in the top level directory
00004  * PROJECT:              ReactOS Multimedia
00005  * FILE:                 dll/win32/mmdrv/mme.c
00006  * PURPOSE:              Multimedia User Mode Driver (MME Interface)
00007  * PROGRAMMER:           Andrew Greenwood
00008  *                       Aleksey Bragin
00009  * UPDATE HISTORY:
00010  *                       Jan 14, 2007: Rewritten and tidied up
00011  */
00012 
00013 #include <mmdrv.h>
00014 
00015 /*
00016     Sends a message to the client (application), such as WOM_DONE. This
00017     is just a wrapper around DriverCallback which translates the
00018     parameters appropriately.
00019 */
00020 
00021 BOOL
00022 NotifyClient(
00023     SessionInfo* session_info,
00024     DWORD message,
00025     DWORD_PTR parameter1,
00026     DWORD_PTR parameter2)
00027 {
00028     return DriverCallback(session_info->callback,
00029                           HIWORD(session_info->flags),
00030                           session_info->mme_handle,
00031                           message,
00032                           session_info->app_user_data,
00033                           parameter1,
00034                           parameter2);
00035 }
00036 
00037 
00038 
00039 /*
00040     MME Driver Entrypoint
00041     Wave Output
00042 */
00043 
00044 DWORD APIENTRY
00045 wodMessage(
00046     UINT device_id,
00047     UINT message,
00048     DWORD_PTR private_handle,
00049     DWORD_PTR parameter1,
00050     DWORD_PTR parameter2)
00051 {
00052     switch ( message )
00053     {
00054         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p80.htm */
00055         case WODM_GETNUMDEVS :
00056             DPRINT("WODM_GETNUMDEVS\n");
00057             return GetDeviceCount(WaveOutDevice);
00058 
00059         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p6h.htm */
00060         case WODM_GETDEVCAPS :
00061             DPRINT("WODM_GETDEVCAPS\n");
00062             return GetDeviceCapabilities(WaveOutDevice,
00063                                          device_id,
00064                                          parameter1,
00065                                          parameter2);
00066 
00067         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p85.htm */
00068         case WODM_OPEN :
00069         {
00070             WAVEOPENDESC* open_desc = (WAVEOPENDESC*) parameter1;
00071             DPRINT("WODM_OPEN\n");
00072 
00073             if ( parameter2 && WAVE_FORMAT_QUERY )
00074                 return QueryWaveFormat(WaveOutDevice, open_desc->lpFormat);
00075             else
00076                 return OpenDevice(WaveOutDevice,
00077                                   device_id,
00078                                   open_desc,
00079                                   parameter2,
00080                                   private_handle);
00081         }
00082 
00083         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p6g.htm */
00084         case WODM_CLOSE :
00085         {
00086             DPRINT("WODM_CLOSE\n");
00087             return CloseDevice(private_handle);
00088         }
00089 
00090         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p9w.htm */
00091         case WODM_WRITE :
00092         {
00093             DPRINT("WODM_WRITE\n");
00094             return WriteWaveBuffer(private_handle,
00095                                    (PWAVEHDR) parameter1,
00096                                    parameter2);
00097         }
00098 
00099         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p86.htm */
00100         case WODM_PAUSE :
00101         {
00102             DPRINT("WODM_PAUSE\n");
00103             return HandleBySessionThread(private_handle, message, 0);
00104         }
00105 
00106         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p89.htm */
00107         case WODM_RESTART :
00108         {
00109             DPRINT("WODM_RESTART\n");
00110             return HandleBySessionThread(private_handle, message, 0);
00111         }
00112 
00113         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p88.htm */
00114         case WODM_RESET :
00115         {
00116             DPRINT("WODM_RESET\n");
00117             return HandleBySessionThread(private_handle, message, 0);
00118         }
00119 
00120         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p83.htm */
00121 #if 0
00122         case WODM_GETPOS :
00123         {
00124             DPRINT("WODM_GETPOS\n");
00125             return GetPosition(private_handle,
00126                                (PMMTIME) parameter1,
00127                                parameter2);
00128         }
00129 #endif
00130 
00131         /* http://www.osronline.com/ddkx/w98ddk/mmedia_4p6f.htm */
00132         case WODM_BREAKLOOP :
00133         {
00134             DPRINT("WODM_BREAKLOOP\n");
00135             return HandleBySessionThread(private_handle, message, 0);
00136         }
00137 
00138         /* TODO: Others */
00139     }
00140 
00141     DPRINT("Unsupported message\n");
00142     return MMSYSERR_NOTSUPPORTED;
00143 }

Generated on Sat May 26 2012 04:23:16 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.