Module: wine Branch: master Commit: 5c489283c9e422749afec4515581729144db50d2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c489283c9e422749afec45155...
Author: Ken Thomases ken@codeweavers.com Date: Thu Dec 28 11:06:16 2006 -0600
winecoreaudio: Implement widDevInterfaceSize and widDevInterface.
---
dlls/winmm/winecoreaudio/audio.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/winmm/winecoreaudio/audio.c b/dlls/winmm/winecoreaudio/audio.c index 94120e6..a1398af 100644 --- a/dlls/winmm/winecoreaudio/audio.c +++ b/dlls/winmm/winecoreaudio/audio.c @@ -168,6 +168,7 @@ typedef struct {
/* Capabilities description */ WAVEINCAPSW caps; + char interface_name[32];
/* Record the arguments used when opening the device. */ WAVEOPENDESC waveDesc; @@ -543,6 +544,7 @@ LONG CoreAudio_WaveInit(void)
snprintf(szPname, sizeof(szPname), "CoreAudio WaveIn %d", i); MultiByteToWideChar(CP_ACP, 0, szPname, -1, WInDev[i].caps.szPname, sizeof(WInDev[i].caps.szPname)/sizeof(WCHAR)); + snprintf(WInDev[i].interface_name, sizeof(WInDev[i].interface_name), "winecoreaudio in: %d", i);
WInDev[i].caps.dwFormats |= WAVE_FORMAT_4M08; WInDev[i].caps.dwFormats |= WAVE_FORMAT_4S08; @@ -1815,8 +1817,9 @@ static DWORD widDevInterfaceSize(UINT wD { TRACE("(%u, %p)\n", wDevID, dwParam1);
- FIXME("unimplemented\n"); - return MMSYSERR_NOTENABLED; + *dwParam1 = MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1, + NULL, 0 ) * sizeof(WCHAR); + return MMSYSERR_NOERROR; }
@@ -1825,8 +1828,14 @@ static DWORD widDevInterfaceSize(UINT wD */ static DWORD widDevInterface(UINT wDevID, PWCHAR dwParam1, DWORD dwParam2) { - FIXME("unimplemented\n"); - return MMSYSERR_NOTENABLED; + if (dwParam2 >= MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1, + NULL, 0 ) * sizeof(WCHAR)) + { + MultiByteToWideChar(CP_ACP, 0, WInDev[wDevID].interface_name, -1, + dwParam1, dwParam2 / sizeof(WCHAR)); + return MMSYSERR_NOERROR; + } + return MMSYSERR_INVALPARAM; }