[PATCH] msgsm32.acm: Add support for the GSM 06.10 codec
Maarten Lankhorst (none)
mlankhorst at patser.
Fri Jul 31 09:34:12 CDT 2009
---
configure.ac | 11 +
dlls/msgsm32.acm/Makefile.in | 12 +
dlls/msgsm32.acm/msgsm32.acm.spec | 1 +
dlls/msgsm32.acm/msgsm32.c | 547 +++++++++++++++++++++++++++++++++++++
tools/wine.inf.in | 2 +
5 files changed, 573 insertions(+), 0 deletions(-)
create mode 100644 dlls/msgsm32.acm/Makefile.in
create mode 100644 dlls/msgsm32.acm/msgsm32.acm.spec
create mode 100644 dlls/msgsm32.acm/msgsm32.c
diff --git a/configure.ac b/configure.ac
index 3b805fe..a9c413f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,8 @@ AC_ARG_WITH(gphoto, AS_HELP_STRING([--without-gphoto],[do not use gphoto (Dig
AC_ARG_WITH(glu, AS_HELP_STRING([--without-glu],[do not use the GLU library]),
[if test "x$withval" = "xno"; then ac_cv_header_GL_glu_h=no; fi])
AC_ARG_WITH(gnutls, AS_HELP_STRING([--without-gnutls],[do not use GnuTLS (schannel support)]))
+AC_ARG_WITH(libgsm, AS_HELP_STRING([--without-libgsm],[do not use libgsm (GSM 06.10 codec support)]),
+ [if test "x$withval" = "xno"; then ac_cv_header_gsm_h=no; fi])
AC_ARG_WITH(hal, AS_HELP_STRING([--without-hal],[do not use HAL (dynamic device support)]))
AC_ARG_WITH(jack, AS_HELP_STRING([--without-jack],[do not use the Jack sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_jack_jack_h=no; fi])
@@ -286,6 +288,7 @@ AC_CHECK_HEADERS(\
fontconfig/fontconfig.h \
getopt.h \
grp.h \
+ gsm.h \
ieeefp.h \
inet/mib2.h \
io.h \
@@ -1338,6 +1341,14 @@ fi
WINE_WARNING_WITH(openssl,[test "x$ac_cv_lib_soname_ssl" = "x" -o "x$ac_cv_lib_soname_crypto" = "x"],
[OpenSSL ${notice_platform}development files not found, SSL won't be supported.])
+dnl **** Check for gsm codec ****
+if test "$ac_cv_header_gsm_h" = "yes"
+then
+ WINE_CHECK_SONAME(gsm,gsm_create)
+fi
+WINE_WARNING_WITH(libgsm,[test "x$ac_cv_lib_soname_gsm" = "x"],
+ [libgsm ${notice_platform}development files not found, gsm 06.10 codec won't be supported.])
+
dnl **** Check for libjpeg ****
if test "$ac_cv_header_jpeglib_h" = "yes"
then
diff --git a/dlls/msgsm32.acm/Makefile.in b/dlls/msgsm32.acm/Makefile.in
new file mode 100644
index 0000000..f9b6602
--- /dev/null
+++ b/dlls/msgsm32.acm/Makefile.in
@@ -0,0 +1,12 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = msgsm32.acm
+IMPORTS = winmm user32 kernel32
+
+C_SRCS = msgsm32.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@ # everything below this line is overwritten by make depend
diff --git a/dlls/msgsm32.acm/msgsm32.acm.spec b/dlls/msgsm32.acm/msgsm32.acm.spec
new file mode 100644
index 0000000..9275f0d
--- /dev/null
+++ b/dlls/msgsm32.acm/msgsm32.acm.spec
@@ -0,0 +1 @@
+@ stdcall -private DriverProc(long long long long long) GSM_DriverProc
diff --git a/dlls/msgsm32.acm/msgsm32.c b/dlls/msgsm32.acm/msgsm32.c
new file mode 100644
index 0000000..a370146
--- /dev/null
+++ b/dlls/msgsm32.acm/msgsm32.c
@@ -0,0 +1,547 @@
+/*
+ * GSM 06.10 codec handling
+ * Copyright (C) 2009 Maarten Lankhorst
+ *
+ * Based on msg711.acm
+ * Copyright (C) 2002 Eric Pouech
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include <wine/port.h>
+
+#include <assert.h>
+#include <stdarg.h>
+#include <string.h>
+
+#ifdef HAVE_GSM_H
+#include <gsm.h>
+#include <wine/library.h>
+#endif
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "mmsystem.h"
+#include "mmreg.h"
+#include "msacm.h"
+#include "msacmdrv.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(gsm);
+
+#ifdef SONAME_LIBGSM
+
+static void *libgsm_handle;
+#define FUNCPTR(f) static typeof(f) * p##f
+FUNCPTR(gsm_create);
+FUNCPTR(gsm_destroy);
+FUNCPTR(gsm_option);
+FUNCPTR(gsm_encode);
+FUNCPTR(gsm_decode);
+
+#define LOAD_FUNCPTR(f) \
+ if((p##f = wine_dlsym(libgsm_handle, #f, NULL, 0)) == NULL) { \
+ wine_dlclose(libgsm_handle, NULL, 0); \
+ libgsm_handle = NULL; \
+ return 0; \
+ }
+
+/***********************************************************************
+ * GSM_drvLoad
+ */
+static LRESULT GSM_drvLoad()
+{
+ libgsm_handle = wine_dlopen(SONAME_LIBGSM, RTLD_NOW, NULL, 0);
+ if (libgsm_handle)
+ {
+ LOAD_FUNCPTR(gsm_create);
+ LOAD_FUNCPTR(gsm_destroy);
+ LOAD_FUNCPTR(gsm_option);
+ LOAD_FUNCPTR(gsm_encode);
+ LOAD_FUNCPTR(gsm_decode);
+ }
+ return 1;
+}
+
+/***********************************************************************
+ * GSM_drvFree
+ */
+static LRESULT GSM_drvFree()
+{
+ wine_dlclose(libgsm_handle, NULL, 0);
+ return 1;
+}
+
+#else
+
+static LRESULT GSM_drvLoad()
+{
+ return 1;
+}
+
+static LRESULT GSM_drvFree()
+{
+ return 1;
+}
+
+#endif
+
+/***********************************************************************
+ * GSM_DriverDetails
+ *
+ */
+static LRESULT GSM_DriverDetails(PACMDRIVERDETAILSW add)
+{
+ add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC;
+ add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED;
+ /* Details found from probing native msgsm32.acm */
+ add->wMid = 1;
+ add->wPid = 36;
+ 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,
+ 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) );
+ MultiByteToWideChar( CP_ACP, 0, "Brought to you by the Wine team...", -1,
+ add->szCopyright, sizeof(add->szCopyright)/sizeof(WCHAR) );
+ MultiByteToWideChar( CP_ACP, 0, "Refer to LICENSE file", -1,
+ add->szLicensing, sizeof(add->szLicensing)/sizeof(WCHAR) );
+ add->szFeatures[0] = 0;
+ return MMSYSERR_NOERROR;
+}
+
+/* Validate a WAVEFORMATEX structure */
+static DWORD GSM_FormatValidate(const WAVEFORMATEX *wfx)
+{
+ if (wfx->nChannels != 1)
+ return 0;
+
+ switch (wfx->wFormatTag)
+ {
+ case WAVE_FORMAT_PCM:
+ if (wfx->wBitsPerSample != 16)
+ return 0;
+ return 1;
+ case WAVE_FORMAT_GSM610:
+ if (wfx->cbSize < sizeof(WORD))
+ return 0;
+ if (wfx->wBitsPerSample != 16 && wfx->wBitsPerSample != 0)
+ return 0;
+ return 1;
+ default:
+ return 0;
+ }
+ return 0;
+}
+
+static const DWORD gsm_rates[] = { 8000, 11025, 22050, 44100, 48000, 96000 };
+#define NUM_RATES (sizeof(gsm_rates)/sizeof(*gsm_rates))
+
+/***********************************************************************
+ * GSM_FormatTagDetails
+ *
+ */
+static LRESULT GSM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
+{
+ static const WCHAR szPcm[]={'P','C','M',0};
+ static const WCHAR szGsm[]={'G','S','M',' ','6','.','1','0',0};
+
+ switch (dwQuery)
+ {
+ case ACM_FORMATTAGDETAILSF_INDEX:
+ if (aftd->dwFormatTagIndex > 1) return ACMERR_NOTPOSSIBLE;
+ break;
+ case ACM_FORMATTAGDETAILSF_LARGESTSIZE:
+ if (aftd->dwFormatTag == WAVE_FORMAT_UNKNOWN)
+ {
+ aftd->dwFormatTagIndex = 1;
+ break;
+ }
+ /* fall thru */
+ case ACM_FORMATTAGDETAILSF_FORMATTAG:
+ switch (aftd->dwFormatTag)
+ {
+ case WAVE_FORMAT_PCM: aftd->dwFormatTagIndex = 0; break;
+ case WAVE_FORMAT_GSM610: aftd->dwFormatTagIndex = 1; break;
+ default: return ACMERR_NOTPOSSIBLE;
+ }
+ break;
+ default:
+ WARN("Unsupported query %08x\n", dwQuery);
+ return MMSYSERR_NOTSUPPORTED;
+ }
+
+ aftd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
+ switch (aftd->dwFormatTagIndex)
+ {
+ case 0:
+ aftd->dwFormatTag = WAVE_FORMAT_PCM;
+ aftd->cbFormatSize = sizeof(PCMWAVEFORMAT);
+ aftd->cStandardFormats = NUM_RATES;
+ lstrcpyW(aftd->szFormatTag, szPcm);
+ break;
+ case 1:
+ aftd->dwFormatTag = WAVE_FORMAT_GSM610;
+ aftd->cbFormatSize = sizeof(PCMWAVEFORMAT);
+ aftd->cStandardFormats = NUM_RATES;
+ lstrcpyW(aftd->szFormatTag, szGsm);
+ break;
+ }
+ return MMSYSERR_NOERROR;
+}
+
+/***********************************************************************
+ * GSM_FormatDetails
+ *
+ */
+static LRESULT GSM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
+{
+ switch (dwQuery)
+ {
+ case ACM_FORMATDETAILSF_FORMAT:
+ if (!GSM_FormatValidate(afd->pwfx)) return ACMERR_NOTPOSSIBLE;
+ break;
+ case ACM_FORMATDETAILSF_INDEX:
+ afd->pwfx->wFormatTag = afd->dwFormatTag;
+ switch (afd->dwFormatTag)
+ {
+ case WAVE_FORMAT_PCM:
+ if (afd->dwFormatIndex >= NUM_RATES) return ACMERR_NOTPOSSIBLE;
+ afd->pwfx->nChannels = 1;
+ afd->pwfx->nSamplesPerSec = gsm_rates[afd->dwFormatIndex];
+ afd->pwfx->wBitsPerSample = 16;
+ afd->pwfx->nBlockAlign = 2;
+ afd->pwfx->nAvgBytesPerSec = afd->pwfx->nSamplesPerSec * afd->pwfx->nBlockAlign;
+ break;
+ case WAVE_FORMAT_GSM610:
+ if (afd->dwFormatIndex >= NUM_RATES) return ACMERR_NOTPOSSIBLE;
+ afd->pwfx->nChannels = 1;
+ afd->pwfx->nSamplesPerSec = gsm_rates[afd->dwFormatIndex];
+ afd->pwfx->wBitsPerSample = 0;
+ afd->pwfx->nBlockAlign = 65;
+ afd->pwfx->nAvgBytesPerSec = afd->pwfx->nSamplesPerSec * 65 / 320;
+ afd->pwfx->cbSize = sizeof(WORD);
+ break;
+ default:
+ WARN("Unsupported tag %08x\n", afd->dwFormatTag);
+ return MMSYSERR_INVALPARAM;
+ }
+ break;
+ default:
+ WARN("Unsupported query %08x\n", dwQuery);
+ return MMSYSERR_NOTSUPPORTED;
+ }
+ afd->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CODEC;
+ afd->szFormat[0] = 0; /* let MSACM format this for us... */
+
+ return MMSYSERR_NOERROR;
+}
+
+/***********************************************************************
+ * GSM_FormatSuggest
+ *
+ */
+static LRESULT GSM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
+{
+ /* some tests ... */
+ if (adfs->cbwfxSrc < sizeof(PCMWAVEFORMAT) ||
+ adfs->cbwfxDst < sizeof(PCMWAVEFORMAT) ||
+ !GSM_FormatValidate(adfs->pwfxSrc)) return ACMERR_NOTPOSSIBLE;
+ /* FIXME: should do those tests against the real size (according to format tag */
+
+ /* If no suggestion for destination, then copy source value */
+ if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NCHANNELS))
+ adfs->pwfxDst->nChannels = adfs->pwfxSrc->nChannels;
+ if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_NSAMPLESPERSEC))
+ adfs->pwfxDst->nSamplesPerSec = adfs->pwfxSrc->nSamplesPerSec;
+
+ if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WBITSPERSAMPLE))
+ {
+ if (adfs->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM)
+ adfs->pwfxDst->wBitsPerSample = 0;
+ else
+ adfs->pwfxDst->wBitsPerSample = 16;
+ }
+ if (!(adfs->fdwSuggest & ACM_FORMATSUGGESTF_WFORMATTAG))
+ {
+ switch (adfs->pwfxSrc->wFormatTag)
+ {
+ case WAVE_FORMAT_PCM: adfs->pwfxDst->wFormatTag = WAVE_FORMAT_GSM610; break;
+ case WAVE_FORMAT_GSM610: adfs->pwfxDst->wFormatTag = WAVE_FORMAT_PCM; break;
+ }
+ }
+ /* check if result is ok */
+ if (!GSM_FormatValidate(adfs->pwfxDst)) return ACMERR_NOTPOSSIBLE;
+
+ /* recompute other values */
+ switch (adfs->pwfxDst->wFormatTag)
+ {
+ case WAVE_FORMAT_PCM:
+ adfs->pwfxDst->nBlockAlign = 65;
+ adfs->pwfxDst->nAvgBytesPerSec = adfs->pwfxDst->nSamplesPerSec * 65 / 320;
+ break;
+ case WAVE_FORMAT_GSM610:
+ adfs->pwfxDst->nBlockAlign = 2;
+ adfs->pwfxDst->nAvgBytesPerSec = adfs->pwfxDst->nSamplesPerSec * 2;
+ break;
+ default:
+ return ACMERR_NOTPOSSIBLE;
+ }
+
+ return MMSYSERR_NOERROR;
+}
+
+#ifdef SONAME_LIBGSM
+/***********************************************************************
+ * GSM_StreamOpen
+ *
+ */
+static LRESULT GSM_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
+{
+ int used = 1;
+ gsm r;
+ if (!GSM_FormatValidate(adsi->pwfxSrc) || !GSM_FormatValidate(adsi->pwfxDst))
+ return MMSYSERR_NOTSUPPORTED;
+
+ r = pgsm_create();
+ if (!r)
+ return MMSYSERR_NOMEM;
+ if (pgsm_option(r, GSM_OPT_WAV49, &used) < 0)
+ {
+ FIXME("Your libgsm library is doesn't support GSM_OPT_WAV49\n");
+ FIXME("Please recompile libgsm with WAV49 support\n");
+ pgsm_destroy(r);
+ return MMSYSERR_NOTSUPPORTED;
+ }
+ adsi->dwDriver = (DWORD_PTR)r;
+ return MMSYSERR_NOERROR;
+}
+
+/***********************************************************************
+ * GSM_StreamClose
+ *
+ */
+static LRESULT GSM_StreamClose(PACMDRVSTREAMINSTANCE adsi)
+{
+ pgsm_destroy((gsm)adsi->dwDriver);
+ return MMSYSERR_NOERROR;
+}
+
+/***********************************************************************
+ * GSM_StreamSize
+ *
+ */
+static LRESULT GSM_StreamSize(const ACMDRVSTREAMINSTANCE *adsi, PACMDRVSTREAMSIZE adss)
+{
+ switch (adss->fdwSize)
+ {
+ case ACM_STREAMSIZEF_DESTINATION:
+ /* cbDstLength => cbSrcLength */
+ if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
+ adsi->pwfxDst->wFormatTag == WAVE_FORMAT_GSM610)
+ {
+ adss->cbSrcLength = adss->cbDstLength / 65 * 320;
+ }
+ else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_GSM610 &&
+ adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
+ {
+ adss->cbSrcLength = adss->cbDstLength * 65 / 320;
+ }
+ else
+ {
+ return MMSYSERR_NOTSUPPORTED;
+ }
+ return MMSYSERR_NOERROR;
+ case ACM_STREAMSIZEF_SOURCE:
+ /* cbSrcLength => cbDstLength */
+ if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_PCM &&
+ adsi->pwfxDst->wFormatTag == WAVE_FORMAT_GSM610)
+ {
+ adss->cbDstLength = adss->cbSrcLength * 65 / 320;
+ }
+ else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_GSM610 &&
+ adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
+ {
+ adss->cbDstLength = adss->cbSrcLength * 320 / 65;
+ }
+ else
+ {
+ return MMSYSERR_NOTSUPPORTED;
+ }
+ return MMSYSERR_NOERROR;
+ default:
+ WARN("Unsupported query %08x\n", adss->fdwSize);
+ return MMSYSERR_NOTSUPPORTED;
+ }
+}
+
+/***********************************************************************
+ * GSM_StreamConvert
+ *
+ */
+static LRESULT GSM_StreamConvert(PACMDRVSTREAMINSTANCE adsi, PACMDRVSTREAMHEADER adsh)
+{
+ gsm r = (gsm)adsi->dwDriver;
+ DWORD nsrc = 0;
+ DWORD ndst = 0;
+ BYTE *src = adsh->pbSrc;
+ BYTE *dst = adsh->pbDst;
+ int odd = 0;
+
+ if (adsh->fdwConvert &
+ ~(ACM_STREAMCONVERTF_BLOCKALIGN|
+ ACM_STREAMCONVERTF_END|
+ ACM_STREAMCONVERTF_START))
+ {
+ FIXME("Unsupported fdwConvert (%08x), ignoring it\n", adsh->fdwConvert);
+ }
+
+ /* Reset the index to 0 */
+ pgsm_option(r, GSM_OPT_FRAME_INDEX, &odd);
+
+ /* The native ms codec writes 32.5 byte frames, or reads 32.5 bytes..
+ * If odd = 0, 32 bytes are written, or 33 bytes read
+ * If odd = 1, 33 bytes are written, or 32 bytes read
+ */
+
+ /* Decode */
+ if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_GSM610)
+ {
+ while (nsrc + 32 + !odd <= adsh->cbSrcLength &&
+ ndst + 320 <= adsh->cbDstLength)
+ {
+ /* Decode data */
+ if (pgsm_decode(r, src + nsrc, (gsm_signal*)(dst + ndst)) < 0)
+ FIXME("Couldn't decode data\n");
+ ndst += 320;
+ nsrc += 32 + !odd;
+ odd = !odd;
+ }
+ }
+ else
+ {
+ while (nsrc + 320 <= adsh->cbSrcLength &&
+ ndst + 32 + !!odd <= adsh->cbDstLength)
+ {
+ /* Encode data */
+ pgsm_encode(r, (gsm_signal*)(src+nsrc), dst+ndst);
+ nsrc += 320;
+ ndst += 32 + odd;
+ odd = !odd;
+ }
+ }
+
+ adsh->cbSrcLengthUsed = nsrc;
+ adsh->cbDstLengthUsed = ndst;
+ TRACE("%d(%d) -> %d(%d)\n", nsrc, adsh->cbSrcLength, ndst, adsh->cbDstLength);
+ return MMSYSERR_NOERROR;
+}
+
+#endif
+
+/**************************************************************************
+ * GSM_DriverProc [exported]
+ */
+LRESULT CALLBACK GSM_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
+ LPARAM dwParam1, LPARAM dwParam2)
+{
+ TRACE("(%08lx %p %04x %08lx %08lx);\n",
+ dwDevID, hDriv, wMsg, dwParam1, dwParam2);
+
+#ifdef SONAME_LIBGSM
+ if (wMsg != DRV_LOAD && !libgsm_handle)
+ {
+ WARN("libgsm not loaded\n");
+ return MMSYSERR_ERROR;
+ }
+#endif
+
+ switch (wMsg)
+ {
+ case DRV_LOAD: return GSM_drvLoad();
+ case DRV_FREE: return GSM_drvFree();
+ case DRV_OPEN: return 1;
+ case DRV_CLOSE: return 1;
+ case DRV_ENABLE: return 1;
+ case DRV_DISABLE: return 1;
+ case DRV_QUERYCONFIGURE: return 1;
+ case DRV_CONFIGURE: MessageBoxA(0, "GSM 06.10 codec", "Wine Driver", MB_OK); return 1;
+ case DRV_INSTALL: return DRVCNF_RESTART;
+ case DRV_REMOVE: return DRVCNF_RESTART;
+
+ case ACMDM_DRIVER_NOTIFY:
+ /* no caching from other ACM drivers is done so far */
+ return MMSYSERR_NOERROR;
+
+ case ACMDM_DRIVER_DETAILS:
+ return GSM_DriverDetails((PACMDRIVERDETAILSW)dwParam1);
+
+ case ACMDM_FORMATTAG_DETAILS:
+ return GSM_FormatTagDetails((PACMFORMATTAGDETAILSW)dwParam1, dwParam2);
+
+ case ACMDM_FORMAT_DETAILS:
+ return GSM_FormatDetails((PACMFORMATDETAILSW)dwParam1, dwParam2);
+
+ case ACMDM_FORMAT_SUGGEST:
+ return GSM_FormatSuggest((PACMDRVFORMATSUGGEST)dwParam1);
+
+#ifdef SONAME_LIBGSM
+ case ACMDM_STREAM_OPEN:
+ return GSM_StreamOpen((PACMDRVSTREAMINSTANCE)dwParam1);
+
+ case ACMDM_STREAM_CLOSE:
+ return GSM_StreamClose((PACMDRVSTREAMINSTANCE)dwParam1);
+
+ case ACMDM_STREAM_SIZE:
+ return GSM_StreamSize((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMSIZE)dwParam2);
+
+ case ACMDM_STREAM_CONVERT:
+ return GSM_StreamConvert((PACMDRVSTREAMINSTANCE)dwParam1, (PACMDRVSTREAMHEADER)dwParam2);
+#else
+ case ACMDM_STREAM_OPEN: ERR("libgsm support not compiled in!\n");
+ case ACMDM_STREAM_CLOSE:
+ case ACMDM_STREAM_SIZE:
+ case ACMDM_STREAM_CONVERT:
+ return MMSYSERR_NOTSUPPORTED;
+#endif
+
+ case ACMDM_HARDWARE_WAVE_CAPS_INPUT:
+ case ACMDM_HARDWARE_WAVE_CAPS_OUTPUT:
+ /* this converter is not a hardware driver */
+ case ACMDM_FILTERTAG_DETAILS:
+ case ACMDM_FILTER_DETAILS:
+ /* this converter is not a filter */
+ case ACMDM_STREAM_RESET:
+ /* only needed for asynchronous driver... we aren't, so just say it */
+ return MMSYSERR_NOTSUPPORTED;
+ case ACMDM_STREAM_PREPARE:
+ case ACMDM_STREAM_UNPREPARE:
+ /* nothing special to do here... so don't do anything */
+ return MMSYSERR_NOERROR;
+
+ default:
+ return DefDriverProc(dwDevID, hDriv, wMsg, dwParam1, dwParam2);
+ }
+}
+
diff --git a/tools/wine.inf.in b/tools/wine.inf.in
index 050d3e5..b17c8ff 100644
--- a/tools/wine.inf.in
+++ b/tools/wine.inf.in
@@ -2480,6 +2480,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,mapi32.dll
11,,msadp32.acm
11,,msg711.acm
+11,,msgsm32.acm
11,,mshtml.dll
11,,msi.dll
11,,msiexec.exe
@@ -2542,6 +2543,7 @@ system.ini, drivers32,,"msacm.imaadpcm=imaadp32.acm"
system.ini, drivers32,,"msacm.msadpcm=msadp32.acm"
system.ini, drivers32,,"msacm.msg711=msg711.acm"
system.ini, drivers32,,"msacm.winemp3=winemp3.acm"
+system.ini, drivers32,,"msacm.msgsm610=msgsm32.acm"
system.ini, drivers32,,"vidc.mrle=msrle32.dll"
system.ini, drivers32,,"vidc.msvc=msvidc32.dll"
system.ini, drivers32,,"vidc.cvid=iccvid.dll"
--
1.6.3.3
--------------090109020805030802000601--
More information about the wine-patches
mailing list