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