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
1cfdb0fd
Commit
1cfdb0fd
authored
Jun 20, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the audio driver configuration to HKCU\Software\Wine\Drivers and
changed it a bit to follow the model of the graphics driver.
parent
ab88743c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
26 deletions
+33
-26
lolvldrv.c
dlls/winmm/lolvldrv.c
+20
-13
winemm.h
dlls/winmm/winemm.h
+1
-1
audio.c
programs/winecfg/audio.c
+6
-6
properties.c
programs/winecfg/properties.c
+6
-6
No files found.
dlls/winmm/lolvldrv.c
View file @
1cfdb0fd
...
...
@@ -723,8 +723,7 @@ BOOL MMDRV_Init(void)
char
driver_buffer
[
256
];
char
mapper_buffer
[
256
];
char
midi_buffer
[
256
];
char
*
p1
;
char
*
p2
;
char
*
p
;
DWORD
type
,
size
;
BOOL
ret
=
FALSE
;
TRACE
(
"()
\n
"
);
...
...
@@ -733,13 +732,29 @@ BOOL MMDRV_Init(void)
strcpy
(
mapper_buffer
,
WINE_DEFAULT_WINMM_MAPPER
);
strcpy
(
midi_buffer
,
WINE_DEFAULT_WINMM_MIDI
);
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\WinMM */
if
(
!
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
WinMM"
,
&
hKey
))
{
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if
(
!
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Drivers"
,
&
hKey
))
{
size
=
sizeof
(
driver_buffer
);
if
(
RegQueryValueExA
(
hKey
,
"
Drivers"
,
0
,
&
type
,
(
LPVOID
)
driver_buffer
,
&
size
))
if
(
RegQueryValueExA
(
hKey
,
"
Audio"
,
0
,
&
type
,
(
LPVOID
)
driver_buffer
,
&
size
))
strcpy
(
driver_buffer
,
WINE_DEFAULT_WINMM_DRIVER
);
}
p
=
driver_buffer
;
while
(
p
)
{
char
filename
[
sizeof
(
driver_buffer
)
+
10
];
char
*
next
=
strchr
(
p
,
','
);
if
(
next
)
*
next
++
=
0
;
sprintf
(
filename
,
"wine%s.drv"
,
p
);
ret
|=
MMDRV_Install
(
filename
,
filename
,
FALSE
);
p
=
next
;
}
/* finish with mappers */
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\WinMM */
if
(
!
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
WinMM"
,
&
hKey
))
{
size
=
sizeof
(
mapper_buffer
);
if
(
RegQueryValueExA
(
hKey
,
"WaveMapper"
,
0
,
&
type
,
(
LPVOID
)
mapper_buffer
,
&
size
))
strcpy
(
mapper_buffer
,
WINE_DEFAULT_WINMM_MAPPER
);
...
...
@@ -751,14 +766,6 @@ BOOL MMDRV_Init(void)
RegCloseKey
(
hKey
);
}
p1
=
driver_buffer
;
while
(
p1
)
{
p2
=
strchr
(
p1
,
';'
);
if
(
p2
)
*
p2
++
=
'\0'
;
ret
|=
MMDRV_Install
(
p1
,
p1
,
FALSE
);
p1
=
p2
;
}
ret
|=
MMDRV_Install
(
"wavemapper"
,
mapper_buffer
,
TRUE
);
ret
|=
MMDRV_Install
(
"midimapper"
,
midi_buffer
,
TRUE
);
return
ret
;
...
...
dlls/winmm/winemm.h
View file @
1cfdb0fd
...
...
@@ -28,7 +28,7 @@
#include "winbase.h"
#include "mmddk.h"
#define WINE_DEFAULT_WINMM_DRIVER "
wineoss.drv
"
#define WINE_DEFAULT_WINMM_DRIVER "
oss
"
#define WINE_DEFAULT_WINMM_MAPPER "msacm.drv"
#define WINE_DEFAULT_WINMM_MIDI "midimap.drv"
...
...
programs/winecfg/audio.c
View file @
1cfdb0fd
...
...
@@ -55,7 +55,7 @@ static void selectAudioDriver(HWND hDlg, const char *drivername)
{
if
(
!
strcmp
(
pAudioDrv
->
szDriver
,
drivername
))
{
set_reg_key
(
"
Winmm"
,
"Drivers
"
,
(
char
*
)
pAudioDrv
->
szDriver
);
set_reg_key
(
"
Drivers"
,
"Audio
"
,
(
char
*
)
pAudioDrv
->
szDriver
);
SendMessage
(
GetParent
(
hDlg
),
PSM_CHANGED
,
(
WPARAM
)
hDlg
,
0
);
/* enable apply button */
SendDlgItemMessage
(
hDlg
,
IDC_AUDIO_DRIVER
,
CB_SETCURSEL
,
(
WPARAM
)
i
,
0
);
...
...
@@ -66,7 +66,7 @@ static void selectAudioDriver(HWND hDlg, const char *drivername)
static
void
initAudioDlg
(
HWND
hDlg
)
{
char
*
curAudioDriver
=
get_reg_key
(
"
Winmm"
,
"Drivers"
,
"winealsa.drv
"
);
char
*
curAudioDriver
=
get_reg_key
(
"
Drivers"
,
"Audio"
,
"alsa
"
);
const
AUDIO_DRIVER
*
pAudioDrv
=
NULL
;
int
i
;
...
...
@@ -101,7 +101,7 @@ static const char *audioAutoDetect(void)
if
(
fd
)
{
close
(
fd
);
driversFound
[
numFound
]
=
"
wineoss.drv
"
;
driversFound
[
numFound
]
=
"
oss
"
;
name
[
numFound
]
=
"OSS"
;
numFound
++
;
}
...
...
@@ -109,7 +109,7 @@ static const char *audioAutoDetect(void)
/* try to detect alsa */
if
(
!
stat
(
"/proc/asound"
,
&
buf
))
{
driversFound
[
numFound
]
=
"
winealsa.drv
"
;
driversFound
[
numFound
]
=
"
alsa
"
;
name
[
numFound
]
=
"Alsa"
;
numFound
++
;
}
...
...
@@ -118,7 +118,7 @@ static const char *audioAutoDetect(void)
argv_new
[
2
]
=
"ps awx|grep artsd|grep -v grep|grep artsd > /dev/null"
;
if
(
!
spawnvp
(
_P_WAIT
,
"/bin/sh"
,
argv_new
))
{
driversFound
[
numFound
]
=
"
winearts.drv
"
;
driversFound
[
numFound
]
=
"
arts
"
;
name
[
numFound
]
=
"aRts"
;
numFound
++
;
}
...
...
@@ -127,7 +127,7 @@ static const char *audioAutoDetect(void)
argv_new
[
2
]
=
"ps awx|grep jackd|grep -v grep|grep jackd > /dev/null"
;
if
(
!
spawnvp
(
_P_WAIT
,
"/bin/sh"
,
argv_new
))
{
driversFound
[
numFound
]
=
"
winejack.drv
"
;
driversFound
[
numFound
]
=
"
jack
"
;
name
[
numFound
]
=
"jack"
;
numFound
++
;
}
...
...
programs/winecfg/properties.c
View file @
1cfdb0fd
...
...
@@ -58,12 +58,12 @@ static DLL_DESC sDLLType[] = {
};
static
AUDIO_DRIVER
sAudioDrivers
[]
=
{
{
"Alsa"
,
"
winealsa.drv
"
},
{
"aRts"
,
"
winearts.drv
"
},
{
"OSS"
,
"
wineoss.drv
"
},
{
"Jack"
,
"
winejack.drv
"
},
{
"Nas"
,
"
winenas.drv
"
},
{
"Audio IO(Solaris)"
,
"
wineaudioio.drv
"
},
{
"Alsa"
,
"
alsa
"
},
{
"aRts"
,
"
arts
"
},
{
"OSS"
,
"
oss
"
},
{
"Jack"
,
"
jack
"
},
{
"Nas"
,
"
nas
"
},
{
"Audio IO(Solaris)"
,
"
audioio
"
},
{
"Disable sound"
,
""
},
{
""
,
""
}
};
...
...
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