Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f6a7b6b5
Commit
f6a7b6b5
authored
Dec 07, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Dec 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Added support for auto detecting all drivers by attempting to
open them.
parent
d52dafb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
58 deletions
+22
-58
audio.c
programs/winecfg/audio.c
+22
-58
No files found.
programs/winecfg/audio.c
View file @
f6a7b6b5
...
...
@@ -426,68 +426,32 @@ static void initAudioDlg (HWND hDlg)
static
const
char
*
audioAutoDetect
(
void
)
{
struct
stat
buf
;
const
char
*
argv_new
[
4
];
int
fd
;
const
char
*
driversFound
[
10
];
const
char
*
name
[
10
];
int
numFound
=
0
,
i
;
argv_new
[
0
]
=
"/bin/sh"
;
argv_new
[
1
]
=
"-c"
;
argv_new
[
3
]
=
NULL
;
/* try to detect oss */
fd
=
open
(
"/dev/dsp"
,
O_WRONLY
|
O_NONBLOCK
);
if
(
fd
)
{
close
(
fd
);
driversFound
[
numFound
]
=
"oss"
;
name
[
numFound
]
=
"OSS"
;
numFound
++
;
}
/* try to detect alsa */
if
(
!
stat
(
"/proc/asound"
,
&
buf
))
{
driversFound
[
numFound
]
=
"alsa"
;
name
[
numFound
]
=
"ALSA"
;
numFound
++
;
}
/* try to detect arts */
argv_new
[
2
]
=
"ps awx|grep artsd|grep -v grep|grep artsd > /dev/null"
;
if
(
!
spawnvp
(
_P_WAIT
,
"/bin/sh"
,
argv_new
))
{
driversFound
[
numFound
]
=
"arts"
;
name
[
numFound
]
=
"aRts"
;
numFound
++
;
}
const
char
*
driversFound
[
10
];
const
char
*
name
[
10
];
int
numFound
=
0
;
const
AUDIO_DRIVER
*
pAudioDrv
=
NULL
;
int
i
;
/* try to detect jack */
argv_new
[
2
]
=
"ps awx|grep jackd|grep -v grep|grep jackd > /dev/null"
;
if
(
!
spawnvp
(
_P_WAIT
,
"/bin/sh"
,
argv_new
))
{
driversFound
[
numFound
]
=
"jack"
;
name
[
numFound
]
=
"JACK"
;
numFound
++
;
}
pAudioDrv
=
getAudioDrivers
();
/* try to detect EsounD */
argv_new
[
2
]
=
"ps awx|grep esd|grep -v grep|grep esd > /dev/null"
;
if
(
!
spawnvp
(
_P_WAIT
,
"/bin/sh"
,
argv_new
))
{
driversFound
[
numFound
]
=
"esd"
;
name
[
numFound
]
=
"EsounD"
;
numFound
++
;
}
for
(
i
=
0
;
*
pAudioDrv
->
szName
;
i
++
,
pAudioDrv
++
)
{
if
(
strlen
(
pAudioDrv
->
szDriver
))
{
HDRVR
hdrv
;
char
driver
[
MAX_PATH
];
/* try to detect nas */
/* TODO */
sprintf
(
driver
,
"wine%s.drv"
,
pAudioDrv
->
szDriver
);
/* try to detect audioIO (solaris) */
/* TODO */
if
((
hdrv
=
OpenDriverA
(
driver
,
0
,
0
)))
{
CloseDriver
(
hdrv
,
0
,
0
);
driversFound
[
numFound
]
=
pAudioDrv
->
szDriver
;
name
[
numFound
]
=
pAudioDrv
->
szName
;
numFound
++
;
}
}
}
if
(
numFound
==
0
)
{
...
...
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