msacm_main.c 12.9 KB
Newer Older
1 2 3 4
/*
 *      MSACM library
 *
 *      Copyright 1998  Patrik Stridvall
5 6 7 8 9 10 11 12 13 14 15 16 17 18
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 20
 */

21 22 23
#include <stdarg.h>

#include "windef.h"
24
#include "winbase.h"
25
#include "winerror.h"
26
#include "mmsystem.h"
27
#define NOBITMAP
28
#include "mmreg.h"
29
#include "msacm.h"
30 31
#include "msacmdrv.h"
#include "wineacm.h"
32
#include "wine/debug.h"
33

34
WINE_DEFAULT_DEBUG_CHANNEL(msacm);
35

36
/**************************************************************************
37
 *		DllEntryPoint (MSACM.255)
38 39 40 41
 *
 * MSACM DLL entry point
 *
 */
42
BOOL WINAPI MSACM_DllEntryPoint(DWORD fdwReason, HINSTANCE16 hinstDLL, WORD ds,
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
				WORD wHeapSize, DWORD dwReserved1, WORD wReserved2)
{
    static HANDLE	hndl;

    TRACE("0x%x 0x%lx\n", hinstDLL, fdwReason);

    switch (fdwReason) {
    case DLL_PROCESS_ATTACH:
        if (!hndl && !(hndl = LoadLibraryA("MSACM32.DLL"))) {
	    ERR("Could not load sibling MsAcm32.dll\n");
	    return FALSE;
	}
	break;
    case DLL_PROCESS_DETACH:
	FreeLibrary(hndl);
	hndl = 0;
	break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
	break;
    }
    return TRUE;
}

67
/***********************************************************************
68
 *		acmGetVersion (MSACM.7)
69
 */
70
DWORD WINAPI acmGetVersion16(void)
71
{
72
  return acmGetVersion();
73 74 75
}

/***********************************************************************
76
 *		acmMetrics (MSACM.8)
77 78 79 80 81
 */

MMRESULT16 WINAPI acmMetrics16(
  HACMOBJ16 hao, UINT16 uMetric, LPVOID pMetric)
{
82 83
  FIXME("(0x%04x, %d, %p): semi-stub\n", hao, uMetric, pMetric);

84 85 86
  if(!hao) return acmMetrics(0, uMetric, pMetric);
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
87 88 89
}

/***********************************************************************
90
 *		acmDriverEnum (MSACM.10)
91 92 93 94
 */
MMRESULT16 WINAPI acmDriverEnum16(
  ACMDRIVERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
95
  FIXME("(%p, %ld, %ld): stub\n",
96 97 98 99 100 101 102
    fnCallback, dwInstance, fdwEnum
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
103
 * 		acmDriverDetails (MSACM.11)
104 105 106 107 108
 */

MMRESULT16 WINAPI acmDriverDetails16(
  HACMDRIVERID16 hadid, LPACMDRIVERDETAILS16 padd, DWORD fdwDetails)
{
109
  FIXME("(0x%04x, %p, %ld): stub\n", hadid, padd, fdwDetails);
110 111 112 113 114
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
115
 * 		acmDriverAdd (MSACM.12)
116 117 118 119 120
 */
MMRESULT16 WINAPI acmDriverAdd16(
  LPHACMDRIVERID16 phadid, HINSTANCE16 hinstModule,
  LPARAM lParam, DWORD dwPriority, DWORD fdwAdd)
{
121
  FIXME("(%p, 0x%04x, %ld, %ld, %ld): stub\n",
122 123 124 125 126 127 128
    phadid, hinstModule, lParam, dwPriority, fdwAdd
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
129
 * 		acmDriverRemove (MSACM.13)
130 131 132 133
 */
MMRESULT16 WINAPI acmDriverRemove16(
  HACMDRIVERID16 hadid, DWORD fdwRemove)
{
134
  FIXME("(0x%04x, %ld): stub\n", hadid, fdwRemove);
135 136 137 138 139
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
140
 * 		acmDriverOpen (MSACM.14)
141 142 143 144
 */
MMRESULT16 WINAPI acmDriverOpen16(
  LPHACMDRIVER16 phad, HACMDRIVERID16 hadid, DWORD fdwOpen)
{
145
  FIXME("(%p, 0x%04x, %ld): stub\n", phad, hadid, fdwOpen);
146 147 148 149 150
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
151
 * 		acmDriverClose (MSACM.15)
152 153 154 155
 */
MMRESULT16 WINAPI acmDriverClose16(
  HACMDRIVER16 had, DWORD fdwClose)
{
156
  FIXME("(0x%04x, %ld): stub\n", had, fdwClose);
157 158 159 160 161
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
162
 * 		acmDriverMessage (MSACM.16)
163 164 165 166
 */
LRESULT WINAPI acmDriverMessage16(
  HACMDRIVER16 had, UINT16 uMsg, LPARAM lParam1, LPARAM lParam2)
{
167
  FIXME("(0x%04x, %d, %ld, %ld): stub\n",
168 169 170 171 172 173 174
    had, uMsg, lParam1, lParam2
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return 0;
}

/***********************************************************************
175
 * 		acmDriverID (MSACM.17)
176 177 178 179
 */
MMRESULT16 WINAPI acmDriverID16(
  HACMOBJ16 hao, LPHACMDRIVERID16 phadid, DWORD fdwDriverID)
{
180
  FIXME("(0x%04x, %p, %ld): stub\n", hao, phadid, fdwDriverID);
181 182 183 184 185
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
186
 * 		acmDriverPriority (MSACM.18)
187 188 189 190
 */
MMRESULT16 WINAPI acmDriverPriority16(
 HACMDRIVERID16 hadid, DWORD dwPriority, DWORD fdwPriority)
{
191
  FIXME("(0x%04x, %ld, %ld): stub\n",
192 193 194 195 196 197 198
    hadid, dwPriority, fdwPriority
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
199
 * 		acmFormatTagDetails (MSACM.30)
200 201 202 203
 */
MMRESULT16 WINAPI acmFormatTagDetails16(
  HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd, DWORD fdwDetails)
{
204
  FIXME("(0x%04x, %p, %ld): stub\n", had, paftd, fdwDetails);
205 206 207 208 209
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
210
 * 		acmFormatTagEnum (MSACM.31)
211 212 213 214 215
 */
MMRESULT16 WINAPI acmFormatTagEnum16(
  HACMDRIVER16 had, LPACMFORMATTAGDETAILS16 paftd,
  ACMFORMATTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
216
  FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
217
    had, paftd, fnCallback, dwInstance, fdwEnum
218
  );
219 220 221 222 223
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
224
 * 		acmFormatChoose (MSACM.40)
225 226 227 228
 */
MMRESULT16 WINAPI acmFormatChoose16(
  LPACMFORMATCHOOSE16 pafmtc)
{
229
  FIXME("(%p): stub\n", pafmtc);
230 231 232 233 234
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
235
 * 		acmFormatDetails (MSACM.41)
236 237 238 239
 */
MMRESULT16 WINAPI acmFormatDetails16(
  HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd, DWORD fdwDetails)
{
240
  FIXME("(0x%04x, %p, %ld): stub\n", had, pafd, fdwDetails);
241 242 243 244 245
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
246
 * 		acmFormatEnum (MSACM.42)
247 248 249 250 251
 */
MMRESULT16 WINAPI acmFormatEnum16(
  HACMDRIVER16 had, LPACMFORMATDETAILS16 pafd,
  ACMFORMATENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
252
  FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
253 254 255 256 257 258 259
    had, pafd, fnCallback, dwInstance, fdwEnum
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
260
 * 		acmFormatSuggest (MSACM.45)
261 262
 */
MMRESULT16 WINAPI acmFormatSuggest16(
263
  HACMDRIVER16 had, LPWAVEFORMATEX pwfxSrc,
264
  LPWAVEFORMATEX pwfxDst, DWORD cbwfxDst, DWORD fdwSuggest)
265
{
266
  FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
267 268 269 270 271 272 273
    had, pwfxSrc, pwfxDst, cbwfxDst, fdwSuggest
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
274
 * 		acmFilterTagDetails (MSACM.50)
275 276 277 278
 */
MMRESULT16 WINAPI acmFilterTagDetails16(
  HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd, DWORD fdwDetails)
{
279
  FIXME("(0x%04x, %p, %ld): stub\n", had, paftd, fdwDetails);
280 281 282 283 284
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
285
 * 		acmFilterTagEnum (MSACM.51)
286 287 288 289 290
 */
MMRESULT16 WINAPI acmFilterTagEnum16(
  HACMDRIVER16 had, LPACMFILTERTAGDETAILS16 paftd,
  ACMFILTERTAGENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
291
  FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
292 293 294 295 296 297 298
    had, paftd, fnCallback, dwInstance, fdwEnum
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
299
 * 		acmFilterChoose (MSACM.60)
300 301 302 303
 */
MMRESULT16 WINAPI acmFilterChoose16(
  LPACMFILTERCHOOSE16 pafltrc)
{
304
  FIXME("(%p): stub\n", pafltrc);
305 306 307 308 309
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
310
 * 		acmFilterDetails (MSACM.61)
311 312 313 314
 */
MMRESULT16 WINAPI acmFilterDetails16(
  HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd, DWORD fdwDetails)
{
315
  FIXME("(0x%04x, %p, %ld): stub\n", had, pafd, fdwDetails);
316 317 318 319 320
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
321
 * 		acmFilterEnum (MSACM.62)
322 323 324 325 326
 */
MMRESULT16 WINAPI acmFilterEnum16(
  HACMDRIVER16 had, LPACMFILTERDETAILS16 pafd,
  ACMFILTERENUMCB16 fnCallback, DWORD dwInstance, DWORD fdwEnum)
{
327
  FIXME("(0x%04x, %p, %p, %ld, %ld): stub\n",
328 329 330 331 332 333 334
    had, pafd, fnCallback, dwInstance, fdwEnum
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
335
 * 		acmStreamOpen (MSACM.70)
336 337 338
 */
MMRESULT16 WINAPI acmStreamOpen16(
  LPHACMSTREAM16 phas, HACMDRIVER16 had,
339 340
  LPWAVEFORMATEX pwfxSrc, LPWAVEFORMATEX pwfxDst,
  LPWAVEFILTER pwfltr, DWORD dwCallback,
341 342
  DWORD dwInstance, DWORD fdwOpen)
{
343
  FIXME("(%p, 0x%04x, %p, %p, %p, %ld, %ld, %ld): stub\n",
344 345 346 347 348 349 350 351
    phas, had, pwfxSrc, pwfxDst, pwfltr,
    dwCallback, dwInstance, fdwOpen
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
352
 * 		acmStreamClose (MSACM.71)
353 354 355 356
 */
MMRESULT16 WINAPI acmStreamClose16(
  HACMSTREAM16 has, DWORD fdwClose)
{
357
  FIXME("(0x%04x, %ld): stub\n", has, fdwClose);
358 359 360 361 362
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
363
 * 		acmStreamSize (MSACM.72)
364 365
 */
MMRESULT16 WINAPI acmStreamSize16(
366
  HACMSTREAM16 has, DWORD cbInput,
367 368
  LPDWORD pdwOutputBytes, DWORD fdwSize)
{
369
  FIXME("(0x%04x, %ld, %p, %ld): stub\n",
370 371 372 373 374 375 376
    has, cbInput, pdwOutputBytes, fdwSize
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
377
 * 		acmStreamConvert (MSACM.75)
378 379 380 381
 */
MMRESULT16 WINAPI acmStreamConvert16(
  HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwConvert)
{
382
  FIXME("(0x%04x, %p, %ld): stub\n", has, pash, fdwConvert);
383 384 385 386 387
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
388
 * 		acmStreamReset (MSACM.76)
389 390 391 392
 */
MMRESULT16 WINAPI acmStreamReset16(
  HACMSTREAM16 has, DWORD fdwReset)
{
393
  FIXME("(0x%04x, %ld): stub\n", has, fdwReset);
394 395 396 397 398
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
399
 * 		acmStreamPrepareHeader (MSACM.77)
400 401 402 403
 */
MMRESULT16 WINAPI acmStreamPrepareHeader16(
  HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwPrepare)
{
404
  FIXME("(0x%04x, %p, %ld): stub\n", has, pash, fdwPrepare);
405 406 407 408 409
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
410
 * 		acmStreamUnprepareHeader (MSACM.78)
411 412 413 414
 */
MMRESULT16 WINAPI acmStreamUnprepareHeader16(
  HACMSTREAM16 has, LPACMSTREAMHEADER16 pash, DWORD fdwUnprepare)
{
415
  FIXME("(0x%04x, %p, %ld): stub\n",
416 417 418 419 420 421 422
    has, pash, fdwUnprepare
  );
  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
  return MMSYSERR_ERROR;
}

/***********************************************************************
423
 *		ACMAPPLICATIONEXIT (MSACM.150)
424 425 426 427 428
 * FIXME
 *   No documentation found.
 */

/***********************************************************************
429 430
 *		ACMHUGEPAGELOCK (MSACM.175)
 *FIXME
431 432 433 434
 *   No documentation found.
 */

/***********************************************************************
435
 *		ACMHUGEPAGEUNLOCK (MSACM.176)
436 437 438 439 440
 * FIXME
 *   No documentation found.
 */

/***********************************************************************
441
 *		ACMOPENCONVERSION (MSACM.200)
442 443 444 445 446
 * FIXME
 *   No documentation found.
 */

/***********************************************************************
447
 *		ACMCLOSECONVERSION (MSACM.201)
448 449 450 451 452
 * FIXME
 *   No documentation found.
 */

/***********************************************************************
453
 *		ACMCONVERT (MSACM.202)
454 455 456 457 458
 * FIXME
 *   No documentation found.
 */

/***********************************************************************
459
 *		ACMCHOOSEFORMAT (MSACM.203)
460 461 462
 * FIXME
 *   No documentation found.
 */