2004-01-20 03:07:35 +01:00
|
|
|
/*
|
|
|
|
* Audio management UI code
|
|
|
|
*
|
|
|
|
* Copyright 2004 Chris Morgan
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2005-12-08 11:57:44 +01:00
|
|
|
#define NONAMELESSSTRUCT
|
|
|
|
#define NONAMELESSUNION
|
|
|
|
|
2004-01-20 03:07:35 +01:00
|
|
|
#include "config.h"
|
|
|
|
#include "wine/port.h"
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winreg.h>
|
|
|
|
#include <wine/debug.h>
|
|
|
|
#include <shellapi.h>
|
|
|
|
#include <objbase.h>
|
|
|
|
#include <shlguid.h>
|
|
|
|
#include <shlwapi.h>
|
|
|
|
#include <shlobj.h>
|
2005-12-17 12:30:06 +01:00
|
|
|
#include <windowsx.h>
|
2005-06-28 21:12:52 +02:00
|
|
|
#include <mmsystem.h>
|
2005-12-07 12:50:52 +01:00
|
|
|
#include <mmreg.h>
|
|
|
|
#include <mmsystem.h>
|
|
|
|
#include <mmddk.h>
|
2004-01-20 03:07:35 +01:00
|
|
|
|
|
|
|
#include "winecfg.h"
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
#define DRIVER_MASK 0x80000000
|
|
|
|
#define DEVICE_MASK 0x40000000
|
|
|
|
|
2005-12-07 12:50:52 +01:00
|
|
|
typedef DWORD (WINAPI * MessagePtr)(UINT, UINT, DWORD, DWORD, DWORD);
|
|
|
|
|
2005-07-11 12:24:28 +02:00
|
|
|
static const char* DSound_HW_Accels[] = {
|
|
|
|
"Full",
|
|
|
|
"Standard",
|
|
|
|
"Basic",
|
|
|
|
"Emulation",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* list of available drivers */
|
|
|
|
static AUDIO_DRIVER * loadedAudioDrv;
|
|
|
|
|
|
|
|
/* local copy of registry setting */
|
|
|
|
static char curAudioDriver[1024];
|
|
|
|
|
|
|
|
/* driver index to configure */
|
|
|
|
static int toConfigure;
|
|
|
|
|
|
|
|
/* display a driver specific configuration dialog */
|
|
|
|
static void configureAudioDriver(HWND hDlg)
|
2004-01-20 03:07:35 +01:00
|
|
|
{
|
2005-12-17 12:30:06 +01:00
|
|
|
const AUDIO_DRIVER *pAudioDrv = &loadedAudioDrv[toConfigure];
|
2004-01-20 03:07:35 +01:00
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
if (strlen(pAudioDrv->szDriver) != 0)
|
2004-01-20 03:07:35 +01:00
|
|
|
{
|
2005-12-17 12:30:06 +01:00
|
|
|
HDRVR hdrvr;
|
|
|
|
char wine_driver[MAX_NAME_LENGTH + 8];
|
|
|
|
sprintf(wine_driver, "wine%s.drv", pAudioDrv->szDriver);
|
|
|
|
hdrvr = OpenDriverA(wine_driver, 0, 0);
|
|
|
|
if (hdrvr != 0)
|
|
|
|
{
|
|
|
|
if (SendDriverMessage(hdrvr, DRV_QUERYCONFIGURE, 0, 0) != 0)
|
|
|
|
{
|
|
|
|
DRVCONFIGINFO dci;
|
|
|
|
LONG lRes;
|
|
|
|
dci.dwDCISize = sizeof (dci);
|
|
|
|
dci.lpszDCISectionName = NULL;
|
|
|
|
dci.lpszDCIAliasName = NULL;
|
|
|
|
lRes = SendDriverMessage(hdrvr, DRV_CONFIGURE, 0, (LONG)&dci);
|
|
|
|
}
|
|
|
|
CloseDriver(hdrvr, 0, 0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
char str[1024];
|
|
|
|
sprintf(str, "Couldn't open %s!", wine_driver);
|
|
|
|
MessageBox(hDlg, str, "Fixme", MB_OK | MB_ICONERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* is driver in local copy of driver registry string */
|
|
|
|
static BOOL isDriverSet(const char * driver)
|
|
|
|
{
|
|
|
|
WINE_TRACE("driver = %s, curAudioDriver = %s\n", driver, curAudioDriver);
|
|
|
|
|
|
|
|
if (strstr(curAudioDriver, driver))
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* add driver to local copy of driver registry string */
|
|
|
|
static void addDriver(const char * driver)
|
|
|
|
{
|
|
|
|
if (!isDriverSet(driver))
|
|
|
|
{
|
|
|
|
if (strlen(curAudioDriver))
|
|
|
|
strcat(curAudioDriver, ",");
|
|
|
|
strcat(curAudioDriver, driver);
|
2004-01-20 03:07:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* remove driver from local copy of driver registry string */
|
|
|
|
static void removeDriver(const char * driver)
|
2005-06-28 21:12:52 +02:00
|
|
|
{
|
2005-12-17 12:30:06 +01:00
|
|
|
char before[32], after[32], * start;
|
|
|
|
|
|
|
|
strcpy(before, ",");
|
|
|
|
strcat(before, driver);
|
|
|
|
strcpy(after, driver);
|
|
|
|
strcat(after, ",");
|
2005-06-28 21:12:52 +02:00
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
if ((start = strstr(curAudioDriver, after)))
|
2005-06-28 21:12:52 +02:00
|
|
|
{
|
2005-12-17 12:30:06 +01:00
|
|
|
int len = strlen(after);
|
|
|
|
char * end = curAudioDriver + strlen(curAudioDriver);
|
|
|
|
int i, count = end - start + len;
|
|
|
|
for (i = 0; i < count; i++)
|
2005-06-28 21:12:52 +02:00
|
|
|
{
|
2005-12-17 12:30:06 +01:00
|
|
|
if (start + len >= end)
|
|
|
|
*start = 0;
|
|
|
|
else
|
|
|
|
*start = start[len];
|
|
|
|
start++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ((start = strstr(curAudioDriver, before)))
|
|
|
|
{
|
|
|
|
int len = strlen(before);
|
|
|
|
char * end = curAudioDriver + strlen(curAudioDriver);
|
|
|
|
int i, count = end - start + len;
|
|
|
|
for (i = 0; i < count; i++)
|
|
|
|
{
|
|
|
|
if (start + len >= end)
|
|
|
|
*start = 0;
|
|
|
|
else
|
|
|
|
*start = start[len];
|
|
|
|
start++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (strcmp(curAudioDriver, driver) == 0)
|
|
|
|
{
|
|
|
|
strcpy(curAudioDriver, "");
|
2005-06-28 21:12:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-12-07 12:50:52 +01:00
|
|
|
static void initAudioDeviceTree(HWND hDlg)
|
|
|
|
{
|
|
|
|
const AUDIO_DRIVER *pAudioDrv = NULL;
|
|
|
|
int i, j;
|
|
|
|
TVINSERTSTRUCT insert;
|
|
|
|
HTREEITEM root, driver[10];
|
|
|
|
HWND tree = NULL;
|
2005-12-17 12:30:06 +01:00
|
|
|
HIMAGELIST hImageList;
|
|
|
|
HBITMAP hBitMap;
|
2005-12-26 12:55:40 +01:00
|
|
|
HCURSOR old_cursor;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
tree = GetDlgItem(hDlg, IDC_AUDIO_TREE);
|
|
|
|
|
|
|
|
if (!tree)
|
|
|
|
return;
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* set tree view style */
|
2005-12-07 12:50:52 +01:00
|
|
|
SetWindowLong(tree, GWL_STYLE, GetWindowLong(tree, GWL_STYLE) | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT);
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* state checkbox */
|
|
|
|
hImageList = ImageList_Create(16, 16, FALSE, 3, 0);
|
|
|
|
hBitMap = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_CHECKBOX));
|
|
|
|
ImageList_Add(hImageList, hBitMap, NULL);
|
|
|
|
DeleteObject(hBitMap);
|
|
|
|
TreeView_SetImageList(tree, hImageList, TVSIL_STATE);
|
|
|
|
|
|
|
|
/* root item */
|
2005-12-07 12:50:52 +01:00
|
|
|
insert.hParent = TVI_ROOT;
|
|
|
|
insert.hInsertAfter = TVI_LAST;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN;
|
|
|
|
insert.u.item.pszText = "Sound Drivers";
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-07 12:50:52 +01:00
|
|
|
root = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
2005-12-26 12:55:40 +01:00
|
|
|
/* change to the wait cursor because this can take a while if there is a
|
|
|
|
* misbehaving driver that takes a long time to open
|
|
|
|
*/
|
|
|
|
old_cursor = SetCursor(LoadCursor(0, IDC_WAIT));
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* iterate over list of loaded drivers */
|
|
|
|
for (pAudioDrv = loadedAudioDrv, i = 0; *pAudioDrv->szName; i++, pAudioDrv++) {
|
2005-12-07 12:50:52 +01:00
|
|
|
HDRVR hdrv;
|
|
|
|
char name[MAX_PATH];
|
|
|
|
char text[MAX_PATH];
|
|
|
|
|
|
|
|
sprintf(name, "wine%s.drv", pAudioDrv->szDriver);
|
|
|
|
sprintf(text, "%s Driver", pAudioDrv->szName);
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
if ((hdrv = OpenDriverA(name, 0, 0)))
|
2005-12-07 12:50:52 +01:00
|
|
|
{
|
2005-12-13 11:12:24 +01:00
|
|
|
HMODULE lib;
|
|
|
|
if ((lib = GetDriverModuleHandle(hdrv)))
|
2005-12-07 12:50:52 +01:00
|
|
|
{
|
|
|
|
int num_wod = 0, num_wid = 0, num_mod = 0, num_mid = 0, num_aux = 0, num_mxd = 0;
|
|
|
|
MessagePtr wodMessagePtr = (MessagePtr)GetProcAddress(lib, "wodMessage");
|
|
|
|
MessagePtr widMessagePtr = (MessagePtr)GetProcAddress(lib, "widMessage");
|
|
|
|
MessagePtr modMessagePtr = (MessagePtr)GetProcAddress(lib, "modMessage");
|
|
|
|
MessagePtr midMessagePtr = (MessagePtr)GetProcAddress(lib, "midMessage");
|
|
|
|
MessagePtr auxMessagePtr = (MessagePtr)GetProcAddress(lib, "auxMessage");
|
|
|
|
MessagePtr mxdMessagePtr = (MessagePtr)GetProcAddress(lib, "mxdMessage");
|
|
|
|
|
|
|
|
if (wodMessagePtr)
|
|
|
|
num_wod = wodMessagePtr(0, WODM_GETNUMDEVS, 0, 0, 0);
|
|
|
|
|
|
|
|
if (widMessagePtr)
|
|
|
|
num_wid = widMessagePtr(0, WIDM_GETNUMDEVS, 0, 0, 0);
|
|
|
|
|
|
|
|
if (modMessagePtr)
|
|
|
|
num_mod = modMessagePtr(0, MODM_GETNUMDEVS, 0, 0, 0);
|
|
|
|
|
|
|
|
if (midMessagePtr)
|
|
|
|
num_mid = midMessagePtr(0, MIDM_GETNUMDEVS, 0, 0, 0);
|
|
|
|
|
|
|
|
if (auxMessagePtr)
|
|
|
|
num_aux = auxMessagePtr(0, AUXDM_GETNUMDEVS, 0, 0, 0);
|
|
|
|
|
|
|
|
if (mxdMessagePtr)
|
|
|
|
num_mxd = mxdMessagePtr(0, MXDM_GETNUMDEVS, 0, 0, 0);
|
|
|
|
|
|
|
|
if (num_wod == 0 && num_wid == 0 && num_mod == 0 && num_mid == 0 && num_aux == 0 && num_mxd == 0)
|
|
|
|
{
|
|
|
|
insert.hParent = root;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = text;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.stateMask = TVIS_STATEIMAGEMASK;
|
|
|
|
insert.u.item.lParam = i + DRIVER_MASK;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
driver[i] = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
HTREEITEM type;
|
|
|
|
|
|
|
|
insert.hParent = root;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN | TVIF_STATE | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = text;
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.stateMask = TVIS_STATEIMAGEMASK;
|
|
|
|
insert.u.item.lParam = i + DRIVER_MASK;
|
|
|
|
|
|
|
|
if (isDriverSet(pAudioDrv->szDriver))
|
|
|
|
insert.u.item.state = INDEXTOSTATEIMAGEMASK(2);
|
|
|
|
else
|
|
|
|
insert.u.item.state = INDEXTOSTATEIMAGEMASK(1);
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
driver[i] = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
|
|
|
if (num_wod)
|
|
|
|
{
|
|
|
|
insert.hParent = driver[i];
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN;
|
|
|
|
insert.u.item.pszText = "Wave Out Devices";
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
type = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
|
|
|
for (j = 0; j < num_wod; j++)
|
|
|
|
{
|
|
|
|
WAVEOUTCAPSW caps;
|
|
|
|
char szPname[MAXPNAMELEN];
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
wodMessagePtr(j, WODM_GETDEVCAPS, 0, (DWORD)&caps, sizeof(caps));
|
2005-12-07 12:50:52 +01:00
|
|
|
WideCharToMultiByte(CP_ACP, 0, caps.szPname, -1, szPname, MAXPNAMELEN, 0, 0);
|
|
|
|
|
|
|
|
insert.hParent = type;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = szPname;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.lParam = j + DEVICE_MASK;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (num_wid)
|
|
|
|
{
|
|
|
|
insert.hParent = driver[i];
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN;
|
|
|
|
insert.u.item.pszText = "Wave In Devices";
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
type = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
|
|
|
for (j = 0; j < num_wid; j++)
|
|
|
|
{
|
|
|
|
WAVEINCAPSW caps;
|
|
|
|
char szPname[MAXPNAMELEN];
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
widMessagePtr(j, WIDM_GETDEVCAPS, 0, (DWORD)&caps, sizeof(caps));
|
2005-12-07 12:50:52 +01:00
|
|
|
WideCharToMultiByte(CP_ACP, 0, caps.szPname, -1, szPname, MAXPNAMELEN, 0, 0);
|
|
|
|
|
|
|
|
insert.hParent = type;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = szPname;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.lParam = j + DEVICE_MASK;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (num_mod)
|
|
|
|
{
|
|
|
|
insert.hParent = driver[i];
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN;
|
|
|
|
insert.u.item.pszText = "MIDI Out Devices";
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
type = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
|
|
|
for (j = 0; j < num_mod; j++)
|
|
|
|
{
|
|
|
|
MIDIOUTCAPSW caps;
|
|
|
|
char szPname[MAXPNAMELEN];
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
modMessagePtr(j, MODM_GETDEVCAPS, 0, (DWORD)&caps, sizeof(caps));
|
2005-12-07 12:50:52 +01:00
|
|
|
WideCharToMultiByte(CP_ACP, 0, caps.szPname, -1, szPname, MAXPNAMELEN, 0, 0);
|
|
|
|
|
|
|
|
insert.hParent = type;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = szPname;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.lParam = j + DEVICE_MASK;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (num_mid)
|
|
|
|
{
|
|
|
|
insert.hParent = driver[i];
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN;
|
|
|
|
insert.u.item.pszText = "MIDI In Devices";
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
type = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
|
|
|
for (j = 0; j < num_mid; j++)
|
|
|
|
{
|
|
|
|
MIDIINCAPSW caps;
|
|
|
|
char szPname[MAXPNAMELEN];
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
midMessagePtr(j, MIDM_GETDEVCAPS, 0, (DWORD)&caps, sizeof(caps));
|
2005-12-07 12:50:52 +01:00
|
|
|
WideCharToMultiByte(CP_ACP, 0, caps.szPname, -1, szPname, MAXPNAMELEN, 0, 0);
|
|
|
|
|
|
|
|
insert.hParent = type;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = szPname;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.lParam = j + DEVICE_MASK;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (num_aux)
|
|
|
|
{
|
|
|
|
insert.hParent = driver[i];
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN;
|
|
|
|
insert.u.item.pszText = "Aux Devices";
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
type = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
|
|
|
for (j = 0; j < num_aux; j++)
|
|
|
|
{
|
|
|
|
AUXCAPSW caps;
|
|
|
|
char szPname[MAXPNAMELEN];
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
auxMessagePtr(j, AUXDM_GETDEVCAPS, 0, (DWORD)&caps, sizeof(caps));
|
2005-12-07 12:50:52 +01:00
|
|
|
WideCharToMultiByte(CP_ACP, 0, caps.szPname, -1, szPname, MAXPNAMELEN, 0, 0);
|
|
|
|
|
|
|
|
insert.hParent = type;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = szPname;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.lParam = j + DEVICE_MASK;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (num_mxd)
|
|
|
|
{
|
|
|
|
insert.hParent = driver[i];
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_CHILDREN;
|
|
|
|
insert.u.item.pszText = "Mixer Devices";
|
|
|
|
insert.u.item.cChildren = 1;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
type = (HTREEITEM)SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
|
|
|
|
for (j = 0; j < num_mxd; j++)
|
|
|
|
{
|
|
|
|
MIXERCAPSW caps;
|
|
|
|
char szPname[MAXPNAMELEN];
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
mxdMessagePtr(j, MXDM_GETDEVCAPS, 0, (DWORD)&caps, sizeof(caps));
|
2005-12-07 12:50:52 +01:00
|
|
|
WideCharToMultiByte(CP_ACP, 0, caps.szPname, -1, szPname, MAXPNAMELEN, 0, 0);
|
|
|
|
|
|
|
|
insert.hParent = type;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.mask = TVIF_TEXT | TVIF_PARAM;
|
2005-12-08 11:57:44 +01:00
|
|
|
insert.u.item.pszText = szPname;
|
2005-12-17 12:30:06 +01:00
|
|
|
insert.u.item.lParam = j + DEVICE_MASK;
|
2005-12-07 12:50:52 +01:00
|
|
|
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_INSERTITEM, 0, (LPARAM)&insert);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-12-26 12:55:40 +01:00
|
|
|
/* restore the original cursor */
|
|
|
|
SetCursor(old_cursor);
|
|
|
|
|
2005-12-07 12:50:52 +01:00
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_SELECTITEM, 0, 0);
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_EXPAND, TVE_EXPAND, (LPARAM)root);
|
|
|
|
for (j = 0; j < i; j++)
|
|
|
|
SendDlgItemMessage(hDlg, IDC_AUDIO_TREE, TVM_EXPAND, TVE_EXPAND, (LPARAM)driver[j]);
|
|
|
|
}
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* find all drivers that can be loaded */
|
|
|
|
static void findAudioDrivers(void)
|
2004-01-20 03:07:35 +01:00
|
|
|
{
|
2005-12-17 12:30:06 +01:00
|
|
|
int numFound = 0;
|
2005-01-14 20:48:41 +01:00
|
|
|
const AUDIO_DRIVER *pAudioDrv = NULL;
|
2005-12-26 12:55:40 +01:00
|
|
|
HCURSOR old_cursor;
|
2005-12-17 12:30:06 +01:00
|
|
|
|
|
|
|
/* delete an existing list */
|
|
|
|
if (loadedAudioDrv)
|
|
|
|
{
|
|
|
|
HeapFree(GetProcessHeap(), 0, loadedAudioDrv);
|
|
|
|
loadedAudioDrv = 0;
|
|
|
|
}
|
|
|
|
|
2005-12-26 12:55:40 +01:00
|
|
|
/* change to the wait cursor because this can take a while if there is a
|
|
|
|
* misbehaving driver that takes a long time to open
|
|
|
|
*/
|
|
|
|
old_cursor = SetCursor(LoadCursor(0, IDC_WAIT));
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
for (pAudioDrv = getAudioDrivers(); *pAudioDrv->szName; pAudioDrv++)
|
|
|
|
{
|
|
|
|
if (strlen(pAudioDrv->szDriver))
|
|
|
|
{
|
|
|
|
HDRVR hdrv;
|
|
|
|
char driver[MAX_PATH];
|
|
|
|
|
|
|
|
sprintf(driver, "wine%s.drv", pAudioDrv->szDriver);
|
|
|
|
|
|
|
|
if ((hdrv = OpenDriverA(driver, 0, 0)))
|
|
|
|
{
|
|
|
|
CloseDriver(hdrv, 0, 0);
|
|
|
|
|
|
|
|
if (loadedAudioDrv)
|
|
|
|
loadedAudioDrv = HeapReAlloc(GetProcessHeap(), 0, loadedAudioDrv, (numFound + 1) * sizeof(AUDIO_DRIVER));
|
|
|
|
else
|
|
|
|
loadedAudioDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(AUDIO_DRIVER));
|
|
|
|
|
|
|
|
CopyMemory(&loadedAudioDrv[numFound], pAudioDrv, sizeof(AUDIO_DRIVER));
|
|
|
|
numFound++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-12-26 12:55:40 +01:00
|
|
|
/* restore the original cursor */
|
|
|
|
SetCursor(old_cursor);
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* terminate list with empty driver */
|
|
|
|
loadedAudioDrv = HeapReAlloc(GetProcessHeap(), 0, loadedAudioDrv, (numFound + 1) * sizeof(AUDIO_DRIVER));
|
|
|
|
CopyMemory(&loadedAudioDrv[numFound], pAudioDrv, sizeof(AUDIO_DRIVER));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* check local copy of registry string for unloadable drivers */
|
|
|
|
static void checkRegistrySetting(HWND hDlg)
|
|
|
|
{
|
|
|
|
const AUDIO_DRIVER *pAudioDrv;
|
|
|
|
char * token, * tokens = strdup(curAudioDriver);
|
|
|
|
|
|
|
|
start_over:
|
|
|
|
token = strtok(tokens, ",");
|
|
|
|
while (token != NULL)
|
|
|
|
{
|
|
|
|
BOOL found = FALSE;
|
|
|
|
for (pAudioDrv = loadedAudioDrv; *pAudioDrv->szName; pAudioDrv++)
|
|
|
|
{
|
|
|
|
if (strcmp(token, pAudioDrv->szDriver) == 0)
|
|
|
|
{
|
|
|
|
found = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (found == FALSE)
|
|
|
|
{
|
|
|
|
char str[1024];
|
|
|
|
sprintf(str, "Found driver in registry that in not available!\n\nRemove \"%s\" from registry?", token);
|
|
|
|
if (MessageBox(hDlg, str, "WARNING", MB_ICONWARNING | MB_YESNOCANCEL) == IDYES)
|
|
|
|
{
|
|
|
|
removeDriver(token);
|
|
|
|
strcpy(tokens, curAudioDriver);
|
|
|
|
goto start_over;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
token = strtok(NULL, ",");
|
|
|
|
}
|
|
|
|
free(tokens);
|
|
|
|
}
|
|
|
|
|
2005-12-21 20:07:56 +01:00
|
|
|
static void selectDriver(HWND hDlg, const char * driver)
|
|
|
|
{
|
|
|
|
WCHAR text[1024];
|
|
|
|
WCHAR caption[64];
|
|
|
|
|
|
|
|
strcpy(curAudioDriver, driver);
|
|
|
|
set_reg_key(config_key, "Drivers", "Audio", curAudioDriver);
|
|
|
|
|
|
|
|
if (LoadStringW(GetModuleHandle(NULL), IDS_AUDIO_MISSING, text, sizeof(text)/sizeof(text[0])))
|
|
|
|
{
|
|
|
|
if (LoadStringW(GetModuleHandle(NULL), IDS_WINECFG_TITLE, caption, sizeof(caption)/sizeof(caption[0])))
|
|
|
|
MessageBoxW(hDlg, text, caption, MB_OK | MB_ICONINFORMATION);
|
|
|
|
}
|
|
|
|
|
|
|
|
SendMessage(GetParent(hDlg), PSM_CHANGED, (WPARAM) hDlg, 0); /* enable apply button */
|
|
|
|
}
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
static void initAudioDlg (HWND hDlg)
|
|
|
|
{
|
2005-01-14 20:48:41 +01:00
|
|
|
int i;
|
2005-07-11 12:24:28 +02:00
|
|
|
char* buf = NULL;
|
2004-01-20 03:07:35 +01:00
|
|
|
|
2005-01-14 20:48:41 +01:00
|
|
|
WINE_TRACE("\n");
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* make a list of all drivers that can be loaded */
|
|
|
|
findAudioDrivers();
|
|
|
|
|
2005-12-21 20:07:56 +01:00
|
|
|
/* get current registry setting if available */
|
|
|
|
buf = get_reg_key(config_key, "Drivers", "Audio", NULL);
|
|
|
|
|
|
|
|
/* check for first time install and set a default driver
|
|
|
|
* select in this order: oss, alsa, first available driver, none
|
|
|
|
*/
|
|
|
|
if (buf == NULL)
|
|
|
|
{
|
|
|
|
const AUDIO_DRIVER *pAudioDrv = NULL;
|
|
|
|
|
|
|
|
/* select oss if available */
|
|
|
|
for (pAudioDrv = loadedAudioDrv; *pAudioDrv->szName; pAudioDrv++)
|
|
|
|
{
|
|
|
|
if (strcmp(pAudioDrv->szDriver, "oss") == 0)
|
|
|
|
{
|
|
|
|
selectDriver(hDlg, "oss");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strlen(curAudioDriver) == 0)
|
|
|
|
{
|
|
|
|
/* select alsa if available */
|
|
|
|
for (pAudioDrv = loadedAudioDrv; *pAudioDrv->szName; pAudioDrv++)
|
|
|
|
{
|
|
|
|
if (strcmp(pAudioDrv->szDriver, "alsa") == 0)
|
|
|
|
{
|
|
|
|
selectDriver(hDlg, "alsa");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strlen(curAudioDriver) == 0)
|
|
|
|
{
|
|
|
|
/* select first available driver */
|
|
|
|
if (*loadedAudioDrv->szDriver)
|
|
|
|
selectDriver(hDlg, loadedAudioDrv->szDriver);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else /* make a local copy of the current registry setting */
|
|
|
|
strcpy(curAudioDriver, buf);
|
|
|
|
|
|
|
|
WINE_TRACE("curAudioDriver = %s\n", curAudioDriver);
|
|
|
|
|
2005-12-17 12:30:06 +01:00
|
|
|
/* check for drivers that can't be loaded */
|
|
|
|
checkRegistrySetting(hDlg);
|
2005-07-11 12:24:28 +02:00
|
|
|
|
2005-12-07 12:50:52 +01:00
|
|
|
initAudioDeviceTree(hDlg);
|
2005-07-11 12:24:28 +02:00
|
|
|
|
|
|
|
SendDlgItemMessage(hDlg, IDC_DSOUND_HW_ACCEL, CB_RESETCONTENT, 0, 0);
|
|
|
|
for (i = 0; NULL != DSound_HW_Accels[i]; ++i) {
|
|
|
|
SendDlgItemMessage(hDlg, IDC_DSOUND_HW_ACCEL, CB_ADDSTRING, 0, (LPARAM) DSound_HW_Accels[i]);
|
2005-12-17 12:30:06 +01:00
|
|
|
}
|
|
|
|
buf = get_reg_key(config_key, keypath("DirectSound"), "HardwareAcceleration", "Full");
|
2005-07-11 12:24:28 +02:00
|
|
|
for (i = 0; NULL != DSound_HW_Accels[i]; ++i) {
|
|
|
|
if (strcmp(buf, DSound_HW_Accels[i]) == 0) {
|
|
|
|
SendDlgItemMessage(hDlg, IDC_DSOUND_HW_ACCEL, CB_SETCURSEL, i, 0);
|
|
|
|
break ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (NULL == DSound_HW_Accels[i]) {
|
|
|
|
WINE_ERR("Invalid Direct Sound HW Accel read from registry (%s)\n", buf);
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, buf);
|
|
|
|
|
|
|
|
buf = get_reg_key(config_key, keypath("DirectSound"), "EmulDriver", "N");
|
|
|
|
if (IS_OPTION_TRUE(*buf))
|
|
|
|
CheckDlgButton(hDlg, IDC_DSOUND_DRV_EMUL, BST_CHECKED);
|
|
|
|
else
|
|
|
|
CheckDlgButton(hDlg, IDC_DSOUND_DRV_EMUL, BST_UNCHECKED);
|
|
|
|
HeapFree(GetProcessHeap(), 0, buf);
|
2004-01-20 03:07:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
INT_PTR CALLBACK
|
|
|
|
AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
|
|
{
|
|
|
|
switch (uMsg) {
|
|
|
|
case WM_COMMAND:
|
|
|
|
switch (LOWORD(wParam)) {
|
2005-06-28 21:12:52 +02:00
|
|
|
case IDC_AUDIO_CONFIGURE:
|
2005-12-17 12:30:06 +01:00
|
|
|
configureAudioDriver(hDlg);
|
2005-06-28 21:12:52 +02:00
|
|
|
break;
|
|
|
|
case IDC_AUDIO_CONTROL_PANEL:
|
|
|
|
MessageBox(NULL, "Launching audio control panel not implemented yet!", "Fixme", MB_OK | MB_ICONERROR);
|
|
|
|
break;
|
2005-07-11 12:24:28 +02:00
|
|
|
case IDC_DSOUND_HW_ACCEL:
|
|
|
|
if (HIWORD(wParam) == CBN_SELCHANGE) {
|
|
|
|
int selected_dsound_accel;
|
|
|
|
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
|
|
|
selected_dsound_accel = SendDlgItemMessage(hDlg, IDC_DSOUND_HW_ACCEL, CB_GETCURSEL, 0, 0);
|
2005-12-17 12:30:06 +01:00
|
|
|
set_reg_key(config_key, keypath("DirectSound"), "HardwareAcceleration", DSound_HW_Accels[selected_dsound_accel]);
|
2005-07-11 12:24:28 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case IDC_DSOUND_DRV_EMUL:
|
|
|
|
if (HIWORD(wParam) == BN_CLICKED) {
|
2005-12-17 12:30:06 +01:00
|
|
|
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
2005-07-11 12:24:28 +02:00
|
|
|
if (IsDlgButtonChecked(hDlg, IDC_DSOUND_DRV_EMUL) == BST_CHECKED)
|
|
|
|
set_reg_key(config_key, keypath("DirectSound"), "EmulDriver", "Y");
|
|
|
|
else
|
|
|
|
set_reg_key(config_key, keypath("DirectSound"), "EmulDriver", "N");
|
|
|
|
}
|
|
|
|
break;
|
2004-01-20 03:07:35 +01:00
|
|
|
}
|
|
|
|
break;
|
2004-09-28 05:55:16 +02:00
|
|
|
|
|
|
|
case WM_SHOWWINDOW:
|
|
|
|
set_window_title(hDlg);
|
|
|
|
break;
|
2005-12-17 12:30:06 +01:00
|
|
|
|
2004-01-20 03:07:35 +01:00
|
|
|
case WM_NOTIFY:
|
|
|
|
switch(((LPNMHDR)lParam)->code) {
|
|
|
|
case PSN_KILLACTIVE:
|
2005-02-15 22:51:06 +01:00
|
|
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, FALSE);
|
2004-01-20 03:07:35 +01:00
|
|
|
break;
|
|
|
|
case PSN_APPLY:
|
2005-12-17 12:30:06 +01:00
|
|
|
set_reg_key(config_key, "Drivers", "Audio", curAudioDriver);
|
2004-09-28 05:55:16 +02:00
|
|
|
apply();
|
2005-02-15 22:51:06 +01:00
|
|
|
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR);
|
2004-01-20 03:07:35 +01:00
|
|
|
break;
|
|
|
|
case PSN_SETACTIVE:
|
|
|
|
break;
|
2005-12-17 12:30:06 +01:00
|
|
|
case NM_CLICK:
|
|
|
|
if (((LPNMHDR)lParam)->idFrom == IDC_AUDIO_TREE)
|
|
|
|
{
|
|
|
|
TVHITTESTINFO ht;
|
|
|
|
DWORD dwPos = GetMessagePos();
|
|
|
|
HWND tree = ((LPNMHDR)lParam)->hwndFrom;
|
|
|
|
ZeroMemory(&ht, sizeof(ht));
|
|
|
|
ht.pt.x = GET_X_LPARAM(dwPos);
|
|
|
|
ht.pt.y = GET_Y_LPARAM(dwPos);
|
|
|
|
MapWindowPoints(HWND_DESKTOP, tree, &ht.pt, 1);
|
|
|
|
TreeView_HitTest(tree, &ht);
|
|
|
|
if (TVHT_ONITEMSTATEICON & ht.flags)
|
|
|
|
{
|
|
|
|
TVITEM tvItem;
|
|
|
|
int index;
|
|
|
|
ZeroMemory(&tvItem, sizeof(tvItem));
|
|
|
|
tvItem.hItem = ht.hItem;
|
|
|
|
TreeView_GetItem(tree, &tvItem);
|
|
|
|
|
|
|
|
index = TreeView_GetItemState(tree, ht.hItem, TVIS_STATEIMAGEMASK);
|
|
|
|
if (index == INDEXTOSTATEIMAGEMASK(1))
|
|
|
|
{
|
|
|
|
TreeView_SetItemState(tree, ht.hItem, INDEXTOSTATEIMAGEMASK(2), TVIS_STATEIMAGEMASK);
|
|
|
|
addDriver(loadedAudioDrv[tvItem.lParam & 0xff].szDriver);
|
|
|
|
SendMessage(GetParent(hDlg), PSM_CHANGED, (WPARAM) hDlg, 0); /* enable apply button */
|
|
|
|
}
|
|
|
|
else if (index == INDEXTOSTATEIMAGEMASK(2))
|
|
|
|
{
|
|
|
|
TreeView_SetItemState(tree, ht.hItem, INDEXTOSTATEIMAGEMASK(1), TVIS_STATEIMAGEMASK);
|
|
|
|
removeDriver(loadedAudioDrv[tvItem.lParam & 0xff].szDriver);
|
|
|
|
SendMessage(GetParent(hDlg), PSM_CHANGED, (WPARAM) hDlg, 0); /* enable apply button */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case NM_RCLICK:
|
|
|
|
if (((LPNMHDR)lParam)->idFrom == IDC_AUDIO_TREE)
|
|
|
|
{
|
|
|
|
TVHITTESTINFO ht;
|
|
|
|
DWORD dwPos = GetMessagePos();
|
|
|
|
HWND tree = ((LPNMHDR)lParam)->hwndFrom;
|
|
|
|
POINT pt;
|
|
|
|
ZeroMemory(&ht, sizeof(ht));
|
|
|
|
pt.x = GET_X_LPARAM(dwPos);
|
|
|
|
pt.y = GET_Y_LPARAM(dwPos);
|
|
|
|
ht.pt = pt;
|
|
|
|
MapWindowPoints(HWND_DESKTOP, tree, &ht.pt, 1);
|
|
|
|
TreeView_HitTest(tree, &ht);
|
|
|
|
if (TVHT_ONITEMLABEL & ht.flags)
|
|
|
|
{
|
|
|
|
TVITEM tvItem;
|
|
|
|
ZeroMemory(&tvItem, sizeof(tvItem));
|
|
|
|
tvItem.hItem = ht.hItem;
|
|
|
|
tvItem.mask = TVIF_PARAM;
|
|
|
|
tvItem.lParam = -1;
|
|
|
|
if (TreeView_GetItem(tree, &tvItem))
|
|
|
|
{
|
|
|
|
if (tvItem.lParam & DRIVER_MASK)
|
|
|
|
{
|
|
|
|
if (hPopupMenus)
|
|
|
|
{
|
|
|
|
TrackPopupMenu(GetSubMenu(hPopupMenus, 0), TPM_RIGHTBUTTON, pt.x, pt.y, 0, tree, NULL);
|
|
|
|
toConfigure = tvItem.lParam & ~DRIVER_MASK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (tvItem.lParam & DEVICE_MASK)
|
|
|
|
{
|
|
|
|
/* FIXME TBD */
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-01-20 03:07:35 +01:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_INITDIALOG:
|
|
|
|
initAudioDlg(hDlg);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|