Commit ab22ea74 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

msacm32: Make ACM driver details match native more closely.

parent e0ba6d8f
......@@ -507,8 +507,8 @@ static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add)
{
add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
add->wMid = 0x1;
add->wPid = 0x22;
add->wMid = MM_MICROSOFT;
add->wPid = MM_MSFT_ACM_IMAADPCM;
add->vdwACM = 0x3320000;
add->vdwDriver = 0x04000000;
add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
......
......@@ -723,15 +723,15 @@ static LRESULT PCM_DriverDetails(PACMDRIVERDETAILSW add)
add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
add->wMid = 0xFF;
add->wPid = 0x00;
add->wMid = MM_MICROSOFT;
add->wPid = MM_MSFT_ACM_PCM;
add->vdwACM = 0x01000000;
add->vdwDriver = 0x01000000;
add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CONVERTER;
add->cFormatTags = 1;
add->cFilterTags = 0;
add->hicon = NULL;
MultiByteToWideChar( CP_ACP, 0, "WINE-PCM", -1,
MultiByteToWideChar( CP_ACP, 0, "MS-PCM", -1,
add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, "Wine PCM converter", -1,
add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) );
......
......@@ -127,8 +127,30 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
TODO: should it be *exactly* sizeof(dd), as tested here?
*/
if (rc == MMSYSERR_NOERROR) {
struct {
const char *shortname;
const WORD mid;
const WORD pid;
} *iter, expected_ids[] = {
{ "Microsoft IMA ADPCM", MM_MICROSOFT, MM_MSFT_ACM_IMAADPCM },
{ "MS-ADPCM", MM_MICROSOFT, MM_MSFT_ACM_MSADPCM },
{ "Microsoft CCITT G.711", MM_MICROSOFT, MM_MSFT_ACM_G711},
{ "MPEG Layer-3 Codec", MM_FRAUNHOFER_IIS, MM_FHGIIS_MPEGLAYER3_DECODE },
{ "MS-PCM", MM_MICROSOFT, MM_MSFT_ACM_PCM },
{ 0 }
};
ok(dd.cbStruct == sizeof(dd),
"acmDriverDetailsA(): cbStruct = %08x\n", dd.cbStruct);
for (iter = expected_ids; iter->shortname; ++iter) {
if (dd.szShortName && !strcmp(iter->shortname, dd.szShortName)) {
ok(iter->mid == dd.wMid && iter->pid == dd.wPid,
"Got wrong manufacturer (0x%x vs 0x%x) or product (0x%x vs 0x%x)\n",
dd.wMid, iter->mid,
dd.wPid, iter->pid);
}
}
}
if (rc == MMSYSERR_NOERROR && winetest_interactive) {
......@@ -139,6 +161,8 @@ static BOOL CALLBACK DriverEnumProc(HACMDRIVERID hadid,
trace(" Features: %s\n", dd.szFeatures);
trace(" Supports %u formats\n", dd.cFormatTags);
trace(" Supports %u filter formats\n", dd.cFilterTags);
trace(" Mid: 0x%x\n", dd.wMid);
trace(" Pid: 0x%x\n", dd.wPid);
}
/* try bad pointer */
......
......@@ -372,8 +372,8 @@ static LRESULT ADPCM_DriverDetails(PACMDRIVERDETAILSW add)
{
add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
add->wMid = 0xFF;
add->wPid = 0x00;
add->wMid = MM_MICROSOFT;
add->wPid = MM_MSFT_ACM_MSADPCM;
add->vdwACM = 0x01000000;
add->vdwDriver = 0x01000000;
add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
......
......@@ -653,15 +653,15 @@ static LRESULT G711_DriverDetails(PACMDRIVERDETAILSW add)
{
add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
add->wMid = 0xFF;
add->wPid = 0x00;
add->wMid = MM_MICROSOFT;
add->wPid = MM_MSFT_ACM_G711;
add->vdwACM = 0x01000000;
add->vdwDriver = 0x01000000;
add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
add->cFormatTags = 3; /* PCM, G711 A-LAW & MU-LAW */
add->cFilterTags = 0;
add->hicon = NULL;
MultiByteToWideChar( CP_ACP, 0, "WINE-G711", -1,
MultiByteToWideChar( CP_ACP, 0, "Microsoft CCITT G.711", -1,
add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, "Wine G711 converter", -1,
add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) );
......
......@@ -117,14 +117,14 @@ static LRESULT GSM_DriverDetails(PACMDRIVERDETAILSW add)
add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
/* Details found from probing native msgsm32.acm */
add->wMid = MM_MICROSOFT;
add->wPid = 36;
add->wPid = MM_MSFT_ACM_GSM610;
add->vdwACM = 0x3320000;
add->vdwDriver = 0x4000000;
add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
add->cFormatTags = 2;
add->cFilterTags = 0;
add->hicon = NULL;
MultiByteToWideChar( CP_ACP, 0, "Wine GSM 6.10", -1,
MultiByteToWideChar( CP_ACP, 0, "Microsoft GSM 6.10", -1,
add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, "Wine GSM 6.10 libgsm codec", -1,
add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) );
......
......@@ -658,15 +658,15 @@ static LRESULT MPEG3_DriverDetails(PACMDRIVERDETAILSW add)
{
add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
add->wMid = 0xFF;
add->wPid = 0x00;
add->wMid = MM_FRAUNHOFER_IIS;
add->wPid = MM_FHGIIS_MPEGLAYER3_DECODE;
add->vdwACM = 0x01000000;
add->vdwDriver = 0x01000000;
add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
add->cFormatTags = 3; /* PCM, MPEG3 */
add->cFilterTags = 0;
add->hicon = NULL;
MultiByteToWideChar( CP_ACP, 0, "WINE-MPEG3", -1,
MultiByteToWideChar( CP_ACP, 0, "MPEG Layer-3 Codec", -1,
add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, "Wine MPEG3 decoder", -1,
add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) );
......
......@@ -115,6 +115,18 @@ typedef struct _WAVEFORMATEX {
#define WAVE_FORMAT_OLISBC 0x1003 /* Ing C. Olivetti & C., S.p.A. */
#define WAVE_FORMAT_OLIOPR 0x1004 /* Ing C. Olivetti & C., S.p.A. */
#ifndef MM_MICROSOFT
#define MM_MICROSOFT 0x01
#endif
#define MM_MSFT_ACM_MSADPCM 0x21
#define MM_MSFT_ACM_IMAADPCM 0x22
#define MM_MSFT_ACM_GSM610 0x24
#define MM_MSFT_ACM_G711 0x25
#define MM_MSFT_ACM_PCM 0x26
#define MM_FRAUNHOFER_IIS 0xAC
#define MM_FHGIIS_MPEGLAYER3_DECODE 0x09
#if !defined(WAVE_FORMAT_EXTENSIBLE)
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE /* Microsoft */
#endif
......
......@@ -243,8 +243,9 @@ DWORD WINAPI GetDriverFlags(HDRVR hDriver);
typedef void (CALLBACK *LPDRVCALLBACK)(HDRVR,UINT,DWORD_PTR,DWORD_PTR,DWORD_PTR);
#ifndef MM_MICROSOFT
#define MM_MICROSOFT 1 /* Microsoft Corp. */
#define MM_CREATIVE 2 /* Creative labs */
#endif
#define MM_MIDI_MAPPER 1 /* MIDI Mapper */
#define MM_WAVE_MAPPER 2 /* Wave Mapper */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment