| 1 | /*
|
|---|
| 2 | * MMIO stubs
|
|---|
| 3 | *
|
|---|
| 4 | * Copyright 1998 Joel Troster
|
|---|
| 5 | *
|
|---|
| 6 | *
|
|---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 | #include <os2win.h>
|
|---|
| 11 | #include <mmsystem.h>
|
|---|
| 12 |
|
|---|
| 13 | #include <string.h>
|
|---|
| 14 | #include <misc.h>
|
|---|
| 15 | #include <unicode.h>
|
|---|
| 16 |
|
|---|
| 17 | #include "winmm.h"
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 | MMRESULT WIN32API mmioAdvance(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT fuOperation)
|
|---|
| 21 | {
|
|---|
| 22 | dprintf(("WINMM:mmioAdvance - stub\n"));
|
|---|
| 23 | return(MMSYSERR_NODRIVER);
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | MMRESULT WIN32API mmioAscend(HMMIO hmmio, LPMMCKINFO lpmmcki, UINT uReserved)
|
|---|
| 27 | {
|
|---|
| 28 | dprintf(("WINMM:mmioAscend - stub\n"));
|
|---|
| 29 | return(MMSYSERR_NODRIVER);
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | MMRESULT WIN32API mmioClose(HMMIO hmmio, UINT fuOption)
|
|---|
| 33 | {
|
|---|
| 34 | dprintf(("WINMM:mmioClose - stub\n"));
|
|---|
| 35 | return 0;
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | /******************************************************************************/
|
|---|
| 39 | //HMMIO hmmio; /* identifies file */
|
|---|
| 40 | //LPMMCKINFO lpmmcki; /* address of chunk information structure */
|
|---|
| 41 | //UINT fuOptions; /* chunk creation options */
|
|---|
| 42 | /******************************************************************************/
|
|---|
| 43 | MMRESULT WIN32API mmioCreateChunk(HMMIO hmmio, LPMMCKINFO lpmmcki, UINT fuOptions)
|
|---|
| 44 | {
|
|---|
| 45 | dprintf(("WINMM:mmioCreateChunk - stub\n"));
|
|---|
| 46 | return 0;
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | /******************************************************************************/
|
|---|
| 50 | //HMMIO hmmio; /* handle of open RIFF file */
|
|---|
| 51 | //LPMMCKINFO lpmmcki; /* address of chunk information structure */
|
|---|
| 52 | //LPMMCKINFO lpmmckiParent; /* address of optional parent structure */
|
|---|
| 53 | //UINT fuSearch; /* search-option flags */
|
|---|
| 54 | /******************************************************************************/
|
|---|
| 55 | MMRESULT WIN32API mmioDescend(HMMIO hmmio, LPMMCKINFO lpmmcki,
|
|---|
| 56 | const MMCKINFO *lpmmckiParent, UINT fuSearch)
|
|---|
| 57 | {
|
|---|
| 58 | dprintf(("WINMM:mmioDescend - stub\n"));
|
|---|
| 59 | return 0;
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | MMRESULT WIN32API mmioFlush(HMMIO hmmio, UINT fuFlush)
|
|---|
| 63 | {
|
|---|
| 64 | dprintf(("WINMM:mmioFlush - stub\n"));
|
|---|
| 65 | return 0;
|
|---|
| 66 | }
|
|---|
| 67 |
|
|---|
| 68 | MMRESULT WIN32API mmioGetInfo(HMMIO hmmio, LPMMIOINFO lpmmioinfo, UINT uReserved)
|
|---|
| 69 | {
|
|---|
| 70 | dprintf(("WINMM:mmioGetInfo - stub\n"));
|
|---|
| 71 | return(MMSYSERR_NODRIVER);
|
|---|
| 72 | }
|
|---|
| 73 |
|
|---|
| 74 | // mmioInstallIOProc16 = _mmioInstallIOProc16@?? @120
|
|---|
| 75 |
|
|---|
| 76 | LPMMIOPROC WIN32API mmioInstallIOProcA(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
|
|---|
| 77 | {
|
|---|
| 78 | dprintf(("WINMM:mmioInstallIOProcA - stub\n"));
|
|---|
| 79 | return 0;
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 | LPMMIOPROC WIN32API mmioInstallIOProcW(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags)
|
|---|
| 83 | {
|
|---|
| 84 | dprintf(("WINMM:mmioInstallIOProcW - stub\n"));
|
|---|
| 85 | return 0;
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | /******************************************************************************/
|
|---|
| 89 | //SvL: 24-6-'97 - Added
|
|---|
| 90 | //TODO: Not implemented
|
|---|
| 91 | /******************************************************************************/
|
|---|
| 92 | HMMIO WIN32API mmioOpenA(LPTSTR lpszFilename, LPMMIOINFO lpmmioinfo, DWORD fdwOpen)
|
|---|
| 93 | {
|
|---|
| 94 | dprintf(("WINMM:mmioOpenA %s - stub\n", lpszFilename));
|
|---|
| 95 | return 234;
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | HMMIO WIN32API mmioOpenW(LPWSTR lpszFilename, LPMMIOINFO lpmmioinfo, DWORD fdwOpen)
|
|---|
| 99 | {
|
|---|
| 100 | dprintf(("WINMM:mmioOpenW - stub\n"));
|
|---|
| 101 | return 234;
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 | LONG WIN32API mmioRead(HMMIO hmmio, HPSTR pch, LONG cbRead)
|
|---|
| 105 | {
|
|---|
| 106 | dprintf(("WINMM:mmioRead - stub\n"));
|
|---|
| 107 | return 0;
|
|---|
| 108 | }
|
|---|
| 109 |
|
|---|
| 110 | MMRESULT WIN32API mmioRenameA(LPCSTR pszFileName, LPCSTR pszNewFileName, LPMMIOINFO pmmioinfo, DWORD fdwRename)
|
|---|
| 111 | {
|
|---|
| 112 | dprintf(("WINMM:mmioRenameA - stub\n"));
|
|---|
| 113 | return 0;
|
|---|
| 114 | }
|
|---|
| 115 |
|
|---|
| 116 | MMRESULT WIN32API mmioRenameW(LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPMMIOINFO pmmioinfo, DWORD fdwRename)
|
|---|
| 117 | {
|
|---|
| 118 | dprintf(("WINMM:mmioRenameW - stub\n"));
|
|---|
| 119 | return 0;
|
|---|
| 120 | }
|
|---|
| 121 |
|
|---|
| 122 | LONG WIN32API mmioSeek(HMMIO hmmio, LONG lOffset, int nOrigin)
|
|---|
| 123 | {
|
|---|
| 124 | dprintf(("WINMM:mmioSeek - stub\n"));
|
|---|
| 125 | return(MMSYSERR_NODRIVER);
|
|---|
| 126 | }
|
|---|
| 127 |
|
|---|
| 128 | LRESULT WIN32API mmioSendMessage(HMMIO hmmio, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
|
|---|
| 129 | {
|
|---|
| 130 | dprintf(("WINMM:mmioSendMessage - stub\n"));
|
|---|
| 131 | return(MMSYSERR_NODRIVER);
|
|---|
| 132 | }
|
|---|
| 133 |
|
|---|
| 134 | MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, UINT fuBuffer)
|
|---|
| 135 | {
|
|---|
| 136 | dprintf(("WINMM:mmioSetBuffer - stub\n"));
|
|---|
| 137 | return(MMSYSERR_NODRIVER);
|
|---|
| 138 | }
|
|---|
| 139 |
|
|---|
| 140 | MMRESULT WIN32API mmioSetInfo(HMMIO hmmio, const MMIOINFO *lpmmioinfo, UINT uReserved)
|
|---|
| 141 | {
|
|---|
| 142 | dprintf(("WINMM:mmioSetInfo - stub\n"));
|
|---|
| 143 | return(MMSYSERR_NODRIVER);
|
|---|
| 144 | }
|
|---|
| 145 |
|
|---|
| 146 |
|
|---|
| 147 | /*****************************************************************************
|
|---|
| 148 | * Name : FOURCC WIN32API OS2mmioStringToFOURCCA
|
|---|
| 149 | * Purpose : Converts a null-terminated string to a four-character code
|
|---|
| 150 | * Parameters: LPTSTR sz
|
|---|
| 151 | * UINT wFlags
|
|---|
| 152 | * Variables :
|
|---|
| 153 | * Result :
|
|---|
| 154 | * Remark :
|
|---|
| 155 | * Status :
|
|---|
| 156 | *
|
|---|
| 157 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
|---|
| 158 | *****************************************************************************/
|
|---|
| 159 |
|
|---|
| 160 | FOURCC WIN32API mmioStringToFOURCCA(LPCSTR sz,
|
|---|
| 161 | UINT wFlags)
|
|---|
| 162 | {
|
|---|
| 163 | union
|
|---|
| 164 | {
|
|---|
| 165 | ULONG ulFourcc;
|
|---|
| 166 | UCHAR ucFourcc[5];
|
|---|
| 167 | } unFourcc;
|
|---|
| 168 |
|
|---|
| 169 | unFourcc.ucFourcc[0] = sz[0];
|
|---|
| 170 | unFourcc.ucFourcc[1] = sz[1];
|
|---|
| 171 | unFourcc.ucFourcc[2] = sz[2];
|
|---|
| 172 | unFourcc.ucFourcc[3] = sz[3];
|
|---|
| 173 | unFourcc.ucFourcc[4] = 0; /* string termination */
|
|---|
| 174 |
|
|---|
| 175 | if (wFlags & MMIO_TOUPPER) /* upcase the whole thing ? */
|
|---|
| 176 | strupr( (LPSTR) unFourcc.ucFourcc);
|
|---|
| 177 |
|
|---|
| 178 | dprintf(("WINMM: mmioStringToFOURCCA(%s,%08x).\n",
|
|---|
| 179 | sz,
|
|---|
| 180 | wFlags));
|
|---|
| 181 |
|
|---|
| 182 | return unFourcc.ulFourcc; /* return FOURCC */
|
|---|
| 183 | }
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 | /*****************************************************************************
|
|---|
| 187 | * Name : FOURCC WIN32API mmioStringToFOURCCW
|
|---|
| 188 | * Purpose : Converts a null-terminated string to a four-character code
|
|---|
| 189 | * Parameters: LPWSTR sz
|
|---|
| 190 | * UINT wFlags
|
|---|
| 191 | * Variables :
|
|---|
| 192 | * Result :
|
|---|
| 193 | * Remark :
|
|---|
| 194 | * Status :
|
|---|
| 195 | *
|
|---|
| 196 | * Author : Patrick Haller [Tue, 1998/05/05 10:44]
|
|---|
| 197 | *****************************************************************************/
|
|---|
| 198 |
|
|---|
| 199 | FOURCC WIN32API mmioStringToFOURCCW(LPCWSTR sz,
|
|---|
| 200 | UINT wFlags)
|
|---|
| 201 | {
|
|---|
| 202 | union
|
|---|
| 203 | {
|
|---|
| 204 | ULONG ulFourcc;
|
|---|
| 205 | UCHAR ucFourcc[5];
|
|---|
| 206 | } unFourcc;
|
|---|
| 207 |
|
|---|
| 208 | LPSTR pszAscii; /* pointer to ASCII string */
|
|---|
| 209 | UCHAR ucBuffer[5]; /* buffer for FOURCC */
|
|---|
| 210 |
|
|---|
| 211 | pszAscii = UnicodeToAsciiString((LPWSTR)sz);
|
|---|
| 212 |
|
|---|
| 213 | strncpy ( (LPSTR) ucBuffer,
|
|---|
| 214 | pszAscii,
|
|---|
| 215 | sizeof (ucBuffer) );
|
|---|
| 216 |
|
|---|
| 217 | FreeAsciiString(pszAscii);
|
|---|
| 218 |
|
|---|
| 219 |
|
|---|
| 220 | unFourcc.ucFourcc[0] = ucBuffer[0];
|
|---|
| 221 | unFourcc.ucFourcc[1] = ucBuffer[1];
|
|---|
| 222 | unFourcc.ucFourcc[2] = ucBuffer[2];
|
|---|
| 223 | unFourcc.ucFourcc[3] = ucBuffer[3];
|
|---|
| 224 | unFourcc.ucFourcc[4] = 0; /* string termination */
|
|---|
| 225 |
|
|---|
| 226 | if (wFlags & MMIO_TOUPPER) /* upcase the whole thing ? */
|
|---|
| 227 | strupr( (LPSTR) unFourcc.ucFourcc);
|
|---|
| 228 |
|
|---|
| 229 | dprintf(("WINMM: mmioStringToFOURCCW(%s,%08x).\n",
|
|---|
| 230 | sz,
|
|---|
| 231 | wFlags));
|
|---|
| 232 |
|
|---|
| 233 | return unFourcc.ulFourcc; /* return FOURCC */
|
|---|
| 234 | }
|
|---|
| 235 |
|
|---|
| 236 | /******************************************************************************/
|
|---|
| 237 | //SvL: 24-6-'97 - Added
|
|---|
| 238 | //TODO: Not implemented
|
|---|
| 239 | /******************************************************************************/
|
|---|
| 240 | LONG WIN32API mmioWrite(HMMIO hmmio, const char *ch, LONG cbWrite)
|
|---|
| 241 | {
|
|---|
| 242 | dprintf(("WINMM:mmioWrite - stub\n"));
|
|---|
| 243 | return 0;
|
|---|
| 244 | }
|
|---|