comctl32: Constify some variables.
[wine/multimedia.git] / dlls / winemp3.acm / mpegl3.c
blob6d95a0bbcee03978e184f150431d9bf51de743fa
1 /*
2 * MPEG Layer 3 handling
4 * Copyright (C) 2002 Eric Pouech
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include <assert.h>
23 #include <stdarg.h>
24 #include <string.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wingdi.h"
28 #include "winuser.h"
29 #include "winnls.h"
30 #include "mmsystem.h"
31 #include "mmreg.h"
32 #include "msacm.h"
33 #include "msacmdrv.h"
34 #include "mpg123.h"
35 #include "mpglib.h"
37 #include "wine/debug.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(mpeg3);
41 /***********************************************************************
42 * MPEG3_drvOpen
44 static LRESULT MPEG3_drvOpen(LPCSTR str)
46 return 1;
49 /***********************************************************************
50 * MPEG3_drvClose
52 static LRESULT MPEG3_drvClose(DWORD_PTR dwDevID)
54 return 1;
57 typedef struct tagAcmMpeg3Data
59 void (*convert)(PACMDRVSTREAMINSTANCE adsi,
60 const unsigned char*, LPDWORD, unsigned char*, LPDWORD);
61 struct mpstr mp;
62 } AcmMpeg3Data;
64 /* table to list all supported formats... those are the basic ones. this
65 * also helps given a unique index to each of the supported formats
67 typedef struct
69 int nChannels;
70 int nBits;
71 int rate;
72 } Format;
74 static const Format PCM_Formats[] =
76 {1, 8, 8000}, {2, 8, 8000}, {1, 16, 8000}, {2, 16, 8000},
77 {1, 8, 11025}, {2, 8, 11025}, {1, 16, 11025}, {2, 16, 11025},
78 {1, 8, 22050}, {2, 8, 22050}, {1, 16, 22050}, {2, 16, 22050},
79 {1, 8, 44100}, {2, 8, 44100}, {1, 16, 44100}, {2, 16, 44100},
82 static const Format MPEG3_Formats[] =
84 {1, 0, 8000}, {2, 0, 8000}, {1, 0, 11025}, {2, 0, 11025},
85 {1, 0, 22050}, {2, 0, 22050}, {1, 0, 44100}, {2, 0, 44100},
88 #define NUM_PCM_FORMATS (sizeof(PCM_Formats) / sizeof(PCM_Formats[0]))
89 #define NUM_MPEG3_FORMATS (sizeof(MPEG3_Formats) / sizeof(MPEG3_Formats[0]))
91 /***********************************************************************
92 * MPEG3_GetFormatIndex
94 static DWORD MPEG3_GetFormatIndex(LPWAVEFORMATEX wfx)
96 int i, hi;
97 const Format *fmts;
99 switch (wfx->wFormatTag)
101 case WAVE_FORMAT_PCM:
102 hi = NUM_PCM_FORMATS;
103 fmts = PCM_Formats;
104 break;
105 case WAVE_FORMAT_MPEGLAYER3:
106 hi = NUM_MPEG3_FORMATS;
107 fmts = MPEG3_Formats;
108 break;
109 default:
110 return 0xFFFFFFFF;
113 for (i = 0; i < hi; i++)
115 if (wfx->nChannels == fmts[i].nChannels &&
116 wfx->nSamplesPerSec == fmts[i].rate &&
117 wfx->wBitsPerSample == fmts[i].nBits)
118 return i;
121 return 0xFFFFFFFF;
124 static DWORD get_num_buffered_bytes(struct mpstr *mp)
126 DWORD numBuff = 0;
127 struct buf * p = mp->tail;
128 while (p) {
129 numBuff += p->size - p->pos;
130 p = p->next;
132 return numBuff;
135 static void mp3_horse(PACMDRVSTREAMINSTANCE adsi,
136 const unsigned char* src, LPDWORD nsrc,
137 unsigned char* dst, LPDWORD ndst)
139 AcmMpeg3Data* amd = (AcmMpeg3Data*)adsi->dwDriver;
140 int size, ret;
141 DWORD dpos = 0;
142 DWORD buffered_before;
143 DWORD buffered_during;
144 DWORD buffered_after;
146 buffered_before = get_num_buffered_bytes(&amd->mp);
147 ret = decodeMP3(&amd->mp, src, *nsrc, dst, *ndst, &size);
148 buffered_during = get_num_buffered_bytes(&amd->mp);
149 if (ret != MP3_OK)
151 *ndst = *nsrc = 0;
152 return;
154 do {
155 dpos += size;
156 if (*ndst - dpos < 4608) break;
157 ret = decodeMP3(&amd->mp, NULL, 0,
158 dst + dpos, *ndst - dpos, &size);
159 } while (ret == MP3_OK);
160 *ndst = dpos;
162 buffered_after = get_num_buffered_bytes(&amd->mp);
163 TRACE("before %d put %d during %d after %d\n", buffered_before, *nsrc, buffered_during, buffered_after);
166 /***********************************************************************
167 * MPEG3_DriverDetails
170 static LRESULT MPEG3_DriverDetails(PACMDRIVERDETAILSW add)
172 add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
173 add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
174 add->wMid = 0xFF;
175 add->wPid = 0x00;
176 add->vdwACM = 0x01000000;
177 add->vdwDriver = 0x01000000;
178 add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
179 add->cFormatTags = 2; /* PCM, MPEG3 */
180 add->cFilterTags = 0;
181 add->hicon = NULL;
182 MultiByteToWideChar( CP_ACP, 0, "WINE-MPEG3", -1,
183 add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) );
184 MultiByteToWideChar( CP_ACP, 0, "Wine MPEG3 decoder", -1,
185 add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) );
186 MultiByteToWideChar( CP_ACP, 0, "Brought to you by the Wine team (based on mpglib by Michael Hipp)...", -1,
187 add->szCopyright, sizeof(add->szCopyright)/sizeof(WCHAR) );
188 MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
189 add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) );
190 add->szFeatures[0] = 0;
192 return MMSYSERR_NOERROR;
195 /***********************************************************************
196 * MPEG3_FormatTagDetails
199 static LRESULT MPEG3_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
201 static const WCHAR szPcm[]={'P','C','M',0};
202 static const WCHAR szMpeg3[]={'M','P','e','g','3',0};
204 switch (dwQuery)
206 case ACM_FORMATTAGDETAILSF_INDEX:
207 if (aftd->dwFormatTagIndex >= 2) return ACMERR_NOTPOSSIBLE;
208 break;
209 case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
210 if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
212 aftd->dwFormatTagIndex = 1; /* WAVE_FORMAT_MPEGLAYER3 is bigger than PCM */
213 break;
215 /* fall thru */
216 case ACM_FORMATTAGDETAILSF_FORMATTAG:
217 switch (aftd->dwFormatTag)
219 case WAVE_FORMAT_PCM: aftd->dwFormatTagIndex = 0; break;
220 case WAVE_FORMAT_MPEGLAYER3: aftd->dwFormatTagIndex = 1; break;
221 default: return ACMERR_NOTPOSSIBLE;
223 break;
224 default:
225 WARN("Unsupported query %08x\n", dwQuery);
226 return MMSYSERR_NOTSUPPORTED;
229 aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
230 switch (aftd->dwFormatTagIndex)
232 case 0:
233 aftd->dwFormatTag = WAVE_FORMAT_PCM;
234 aftd->cbFormatSize = sizeof(PCMWAVEFORMAT);
235 aftd->cStandardFormats = NUM_PCM_FORMATS;
236 lstrcpyW(aftd->szFormatTag, szPcm);
237 break;
238 case 1:
239 aftd->dwFormatTag = WAVE_FORMAT_MPEGLAYER3;
240 aftd->cbFormatSize = sizeof(MPEGLAYER3WAVEFORMAT);
241 aftd->cStandardFormats = NUM_MPEG3_FORMATS;
242 lstrcpyW(aftd->szFormatTag, szMpeg3);
243 break;
245 return MMSYSERR_NOERROR;
248 static void fill_in_wfx(unsigned cbwfx, WAVEFORMATEX* wfx, unsigned bit_rate)
250 MPEGLAYER3WAVEFORMAT* mp3wfx = (MPEGLAYER3WAVEFORMAT*)wfx;
252 wfx->nAvgBytesPerSec = bit_rate / 8;
253 if (cbwfx >= sizeof(WAVEFORMATEX))
254 wfx->cbSize = sizeof(MPEGLAYER3WAVEFORMAT) - sizeof(WAVEFORMATEX);
255 if (cbwfx >= sizeof(MPEGLAYER3WAVEFORMAT))
257 mp3wfx->wID = MPEGLAYER3_ID_MPEG;
258 mp3wfx->fdwFlags = MPEGLAYER3_FLAG_PADDING_OFF;
259 mp3wfx->nBlockSize = (bit_rate * 144) / wfx->nSamplesPerSec;
260 mp3wfx->nFramesPerBlock = 1;
261 mp3wfx->nCodecDelay = 0x0571;
265 /***********************************************************************
266 * MPEG3_FormatDetails
269 static LRESULT MPEG3_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
271 switch (dwQuery)
273 case ACM_FORMATDETAILSF_FORMAT:
274 if (MPEG3_GetFormatIndex(afd->pwfx) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
275 break;
276 case ACM_FORMATDETAILSF_INDEX:
277 afd->pwfx->wFormatTag = afd->dwFormatTag;
278 switch (afd->dwFormatTag)
280 case WAVE_FORMAT_PCM:
281 if (afd->dwFormatIndex >= NUM_PCM_FORMATS) return ACMERR_NOTPOSSIBLE;
282 afd->pwfx->nChannels = PCM_Formats[afd->dwFormatIndex].nChannels;
283 afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate;
284 afd->pwfx->wBitsPerSample = PCM_Formats[afd->dwFormatIndex].nBits;
285 /* native MSACM uses a PCMWAVEFORMAT structure, so cbSize is not accessible
286 * afd->pwfx->cbSize = 0;
288 afd->pwfx->nBlockAlign =
289 (afd->pwfx->nChannels * afd->pwfx->wBitsPerSample) / 8;
290 afd->pwfx->nAvgBytesPerSec =
291 afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign;
292 break;
293 case WAVE_FORMAT_MPEGLAYER3:
294 if (afd->dwFormatIndex >= NUM_MPEG3_FORMATS) return ACMERR_NOTPOSSIBLE;
295 afd->pwfx->nChannels = MPEG3_Formats[afd->dwFormatIndex].nChannels;
296 afd->pwfx->nSamplesPerSec = MPEG3_Formats[afd->dwFormatIndex].rate;
297 afd->pwfx->wBitsPerSample = MPEG3_Formats[afd->dwFormatIndex].nBits;
298 afd->pwfx->nBlockAlign = 1;
299 fill_in_wfx(afd->cbwfx, afd->pwfx, 192000);
300 break;
301 default:
302 WARN("Unsupported tag %08x\n", afd->dwFormatTag);
303 return MMSYSERR_INVALPARAM;
305 break;
306 default:
307 WARN("Unsupported query %08x\n", dwQuery);
308 return MMSYSERR_NOTSUPPORTED;
310 afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
311 afd->szFormat[0] = 0; /* let MSACM format this for us... */
313 return MMSYSERR_NOERROR;
316 /***********************************************************************
317 * MPEG3_FormatSuggest
320 static LRESULT MPEG3_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
322 /* some tests ... */
323 if (adfs->cbwfxSrc < sizeof(PCMWAVEFORMAT) ||
324 adfs->cbwfxDst < sizeof(PCMWAVEFORMAT) ||
325 MPEG3_GetFormatIndex(adfs->pwfxSrc) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
326 /* FIXME: should do those tests against the real size (according to format tag */
328 /* If no suggestion for destination, then copy source value */
329 if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NCHANNELS))
330 adfs->pwfxDst->nChannels = adfs->pwfxSrc->nChannels;
331 if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC))
332 adfs->pwfxDst->nSamplesPerSec = adfs->pwfxSrc->nSamplesPerSec;
334 if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE))
336 if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
337 adfs->pwfxDst->wBitsPerSample = 4;
338 else
339 adfs->pwfxDst->wBitsPerSample = 16;
341 if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
343 if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
344 adfs->pwfxDst->wFormatTag = WAVE_FORMAT_MPEGLAYER3;
345 else
346 adfs->pwfxDst->wFormatTag = WAVE_FORMAT_PCM;
349 /* check if result is ok */
350 if (MPEG3_GetFormatIndex(adfs->pwfxDst) == 0xFFFFFFFF) return ACMERR_NOTPOSSIBLE;
352 /* recompute other values */
353 switch (adfs->pwfxDst->wFormatTag)
355 case WAVE_FORMAT_PCM:
356 adfs->pwfxDst->nBlockAlign = (adfs->pwfxDst->nChannels * adfs->pwfxDst->wBitsPerSample) / 8;
357 adfs->pwfxDst->nAvgBytesPerSec = adfs->pwfxDst->nSamplesPerSec * adfs->pwfxDst->nBlockAlign;
358 break;
359 case WAVE_FORMAT_MPEGLAYER3:
360 adfs->pwfxDst->nBlockAlign = 1;
361 fill_in_wfx(adfs->cbwfxDst, adfs->pwfxDst, 192000);
362 break;
363 default:
364 FIXME("\n");
365 break;
368 return MMSYSERR_NOERROR;
371 /***********************************************************************
372 * MPEG3_Reset
375 static void MPEG3_Reset(PACMDRVSTREAMINSTANCE adsi, AcmMpeg3Data* aad)
377 ExitMP3(&aad->mp);
378 InitMP3(&aad->mp);
381 /***********************************************************************
382 * MPEG3_StreamOpen
385 static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
387 AcmMpeg3Data* aad;
389 assert(!(adsi->fdwOpen & ACM_STREAMOPENF_ASYNC));
391 if (MPEG3_GetFormatIndex(adsi->pwfxSrc) == 0xFFFFFFFF ||
392 MPEG3_GetFormatIndex(adsi->pwfxDst) == 0xFFFFFFFF)
393 return ACMERR_NOTPOSSIBLE;
395 aad = HeapAlloc(GetProcessHeap(), 0, sizeof(AcmMpeg3Data));
396 if (aad == 0) return MMSYSERR_NOMEM;
398 adsi->dwDriver = (DWORD)aad;
400 if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
401 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
403 goto theEnd;
405 else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 &&
406 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
408 /* resampling or mono <=> stereo not available
409 * MPEG3 algo only define 16 bit per sample output
411 if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
412 adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
413 adsi->pwfxDst->wBitsPerSample != 16)
414 goto theEnd;
415 aad->convert = mp3_horse;
416 InitMP3(&aad->mp);
418 /* no encoding yet
419 else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
420 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3)
422 else goto theEnd;
423 MPEG3_Reset(adsi, aad);
425 return MMSYSERR_NOERROR;
427 theEnd:
428 HeapFree(GetProcessHeap(), 0, aad);
429 adsi->dwDriver = 0L;
430 return MMSYSERR_NOTSUPPORTED;
433 /***********************************************************************
434 * MPEG3_StreamClose
437 static LRESULT MPEG3_StreamClose(PACMDRVSTREAMINSTANCE adsi)
439 ExitMP3(&((AcmMpeg3Data*)adsi->dwDriver)->mp);
440 HeapFree(GetProcessHeap(), 0, (void*)adsi->dwDriver);
441 return MMSYSERR_NOERROR;
444 /***********************************************************************
445 * MPEG3_StreamSize
448 static LRESULT MPEG3_StreamSize(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMSIZE adss)
450 switch (adss->fdwSize)
452 case ACM_STREAMSIZEF_DESTINATION:
453 /* cbDstLength => cbSrcLength */
454 if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
455 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3)
457 /* don't take block overhead into account, doesn't matter too much */
458 adss->cbSrcLength = adss->cbDstLength * 12;
460 else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 &&
461 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
463 FIXME("misses the block header overhead\n");
464 adss->cbSrcLength = 256 + adss->cbDstLength / 12;
466 else
468 return MMSYSERR_NOTSUPPORTED;
470 break;
471 case ACM_STREAMSIZEF_SOURCE:
472 /* cbSrcLength => cbDstLength */
473 if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
474 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_MPEGLAYER3)
476 FIXME("misses the block header overhead\n");
477 adss->cbDstLength = 256 + adss->cbSrcLength / 12;
479 else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3 &&
480 adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
482 /* don't take block overhead into account, doesn't matter too much */
483 adss->cbDstLength = adss->cbSrcLength * 12;
485 else
487 return MMSYSERR_NOTSUPPORTED;
489 break;
490 default:
491 WARN("Unsupported query %08x\n", adss->fdwSize);
492 return MMSYSERR_NOTSUPPORTED;
494 return MMSYSERR_NOERROR;
497 /***********************************************************************
498 * MPEG3_StreamConvert
501 static LRESULT MPEG3_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEADER adsh)
503 AcmMpeg3Data* aad = (AcmMpeg3Data*)adsi->dwDriver;
504 DWORD nsrc = adsh->cbSrcLength;
505 DWORD ndst = adsh->cbDstLength;
507 if (adsh->fdwConvert &
508 ~(ACM_STREAMCONVERTF_BLOCKALIGN|
509 ACM_STREAMCONVERTF_END|
510 ACM_STREAMCONVERTF_START))
512 FIXME("Unsupported fdwConvert (%08x), ignoring it\n", adsh->fdwConvert);
514 /* ACM_STREAMCONVERTF_BLOCKALIGN
515 * currently all conversions are block aligned, so do nothing for this flag
516 * ACM_STREAMCONVERTF_END
517 * no pending data, so do nothing for this flag
519 if ((adsh->fdwConvert & ACM_STREAMCONVERTF_START))
521 MPEG3_Reset(adsi, aad);
524 aad->convert(adsi, adsh->pbSrc, &nsrc, adsh->pbDst, &ndst);
525 adsh->cbSrcLengthUsed = nsrc;
526 adsh->cbDstLengthUsed = ndst;
528 return MMSYSERR_NOERROR;
531 /**************************************************************************
532 * MPEG3_DriverProc [exported]
534 LRESULT CALLBACK MPEG3_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
535 LPARAM dwParam1, LPARAM dwParam2)
537 TRACE("(%08lx %p %04x %08lx %08lx);\n",
538 dwDevID, hDriv, wMsg, dwParam1, dwParam2);
540 switch (wMsg)
542 case DRV_LOAD: return 1;
543 case DRV_FREE: return 1;
544 case DRV_OPEN: return MPEG3_drvOpen((LPSTR)dwParam1);
545 case DRV_CLOSE: return MPEG3_drvClose(dwDevID);
546 case DRV_ENABLE: return 1;
547 case DRV_DISABLE: return 1;
548 case DRV_QUERYCONFIGURE: return 1;
549 case DRV_CONFIGURE: MessageBoxA(0, "MPEG3 filter !", "Wine Driver", MB_OK); return 1;
550 case DRV_INSTALL: return DRVCNF_RESTART;
551 case DRV_REMOVE: return DRVCNF_RESTART;
553 case ACMDM_DRIVER_NOTIFY:
554 /* no caching from other ACM drivers is done so far */
555 return MMSYSERR_NOERROR;
557 case ACMDM_DRIVER_DETAILS:
558 return MPEG3_DriverDetails((PACMDRIVERDETAILSW)dwParam1);
560 case ACMDM_FORMATTAG_DETAILS:
561 return MPEG3_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2);
563 case ACMDM_FORMAT_DETAILS:
564 return MPEG3_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2);
566 case ACMDM_FORMAT_SUGGEST:
567 return MPEG3_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1);
569 case ACMDM_STREAM_OPEN:
570 return MPEG3_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1);
572 case ACMDM_STREAM_CLOSE:
573 return MPEG3_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1);
575 case ACMDM_STREAM_SIZE:
576 return MPEG3_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2);
578 case ACMDM_STREAM_CONVERT:
579 return MPEG3_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2);
581 case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
582 case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
583 /* this converter is not a hardware driver */
584 case ACMDM_FILTERTAG_DETAILS:
585 case ACMDM_FILTER_DETAILS:
586 /* this converter is not a filter */
587 case ACMDM_STREAM_RESET:
588 /* only needed for asynchronous driver... we aren't, so just say it */
589 return MMSYSERR_NOTSUPPORTED;
590 case ACMDM_STREAM_PREPARE:
591 case ACMDM_STREAM_UNPREPARE:
592 /* nothing special to do here... so don't do anything */
593 return MMSYSERR_NOERROR;
595 default:
596 return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);