Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8d9d1fb1
Commit
8d9d1fb1
authored
Jul 11, 2005
by
Raphael Junqueira
Committed by
Alexandre Julliard
Jul 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some basic dsound configuration on Audio panel.
parent
9ccea114
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
0 deletions
+67
-0
En.rc
programs/winecfg/En.rc
+7
-0
Fr.rc
programs/winecfg/Fr.rc
+7
-0
audio.c
programs/winecfg/audio.c
+51
-0
resource.h
programs/winecfg/resource.h
+2
-0
No files found.
programs/winecfg/En.rc
View file @
8d9d1fb1
...
...
@@ -153,6 +153,13 @@ BEGIN
PUSHBUTTON "Autodetect",IDC_AUDIO_AUTODETECT,170,20,49,14
PUSHBUTTON "Configure",IDC_AUDIO_CONFIGURE,170,40,49,14
PUSHBUTTON "Control Panel",IDC_AUDIO_CONTROL_PANEL,170,60,49,14
GROUPBOX " DirectSound ",IDC_STATIC,8,75,244,120
LTEXT "Hardware Acceleration: ",IDC_STATIC,15,85,90,10
COMBOBOX IDC_DSOUND_HW_ACCEL,100,83,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Driver Emulation",IDC_DSOUND_DRV_EMUL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,100,230,10
END
STRINGTABLE DISCARDABLE
...
...
programs/winecfg/Fr.rc
View file @
8d9d1fb1
...
...
@@ -139,6 +139,13 @@ BEGIN
PUSHBUTTON "Autodtection",IDC_AUDIO_AUTODETECT,170,20,85,14
PUSHBUTTON "Configurer",IDC_AUDIO_CONFIGURE,170,40,85,14
PUSHBUTTON "Panneau de configuration",IDC_AUDIO_CONTROL_PANEL,170,60,85,14
GROUPBOX " DirectSound ",IDC_STATIC,8,75,244,120
LTEXT "Hardware Acceleration: ",IDC_STATIC,15,85,90,10
COMBOBOX IDC_DSOUND_HW_ACCEL,100,83,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Driver Emulation",IDC_DSOUND_DRV_EMUL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,100,230,10
END
STRINGTABLE DISCARDABLE
...
...
programs/winecfg/audio.c
View file @
8d9d1fb1
...
...
@@ -44,6 +44,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
winecfg
);
static
const
char
*
DSound_HW_Accels
[]
=
{
"Full"
,
"Standard"
,
"Basic"
,
"Emulation"
,
NULL
};
/* Select the correct entry in the combobox based on drivername */
static
void
selectAudioDriver
(
HWND
hDlg
,
const
char
*
drivername
)
{
...
...
@@ -113,6 +121,7 @@ static void initAudioDlg (HWND hDlg)
char
*
curAudioDriver
=
get_reg_key
(
config_key
,
"Drivers"
,
"Audio"
,
"alsa"
);
const
AUDIO_DRIVER
*
pAudioDrv
=
NULL
;
int
i
;
char
*
buf
=
NULL
;
WINE_TRACE
(
"
\n
"
);
...
...
@@ -124,6 +133,31 @@ static void initAudioDlg (HWND hDlg)
SendDlgItemMessage
(
hDlg
,
IDC_AUDIO_DRIVER
,
CB_SETCURSEL
,
i
,
0
);
}
}
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
]);
}
buf
=
get_reg_key
(
config_key
,
keypath
(
"DirectSound"
),
"HardwareAcceleration"
,
"Full"
);
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
);
}
static
const
char
*
audioAutoDetect
(
void
)
...
...
@@ -226,6 +260,23 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
IDC_AUDIO_CONTROL_PANEL
:
MessageBox
(
NULL
,
"Launching audio control panel not implemented yet!"
,
"Fixme"
,
MB_OK
|
MB_ICONERROR
);
break
;
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
);
set_reg_key
(
config_key
,
keypath
(
"DirectSound"
),
"HardwareAcceleration"
,
DSound_HW_Accels
[
selected_dsound_accel
]);
}
break
;
case
IDC_DSOUND_DRV_EMUL
:
if
(
HIWORD
(
wParam
)
==
BN_CLICKED
)
{
SendMessage
(
GetParent
(
hDlg
),
PSM_CHANGED
,
0
,
0
);
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
;
}
break
;
...
...
programs/winecfg/resource.h
View file @
8d9d1fb1
...
...
@@ -127,3 +127,5 @@
#define IDC_AUDIO_DRIVER 1301
#define IDC_AUDIO_CONFIGURE 1302
#define IDC_AUDIO_CONTROL_PANEL 1303
#define IDC_DSOUND_HW_ACCEL 1304
#define IDC_DSOUND_DRV_EMUL 1305
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment