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
e9cee6fb
Commit
e9cee6fb
authored
Apr 14, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Don't load openal on older openal-soft versions.
parent
3d6908c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
devenum.c
dlls/mmdevapi/devenum.c
+26
-0
No files found.
dlls/mmdevapi/devenum.c
View file @
e9cee6fb
...
...
@@ -732,16 +732,40 @@ static void openal_setformat(MMDevice *This, DWORD freq)
}
}
static
int
blacklist_pulse
;
static
int
blacklist
(
const
char
*
dev
)
{
#ifdef __linux__
if
(
strncmp
(
dev
,
"OSS "
,
4
))
return
1
;
#endif
if
(
blacklist_pulse
&&
!
strncmp
(
dev
,
"PulseAudio "
,
11
))
return
1
;
if
(
strstr
(
dev
,
"ALSA"
)
&&
strstr
(
dev
,
"hw:"
))
return
1
;
return
0
;
}
static
void
pulse_fixup
(
const
char
*
devstr
,
const
char
**
defstr
)
{
static
int
warned
;
if
(
!
blacklist_pulse
&&
!
local_contexts
)
blacklist_pulse
=
1
;
if
(
!
blacklist_pulse
||
!
devstr
||
strncmp
(
*
defstr
,
"PulseAudio "
,
11
))
return
;
if
(
!
warned
++
)
{
ERR
(
"Disabling pulseaudio because of old openal version
\n
"
);
ERR
(
"Please upgrade to openal-soft v1.12 or newer
\n
"
);
}
while
(
*
devstr
&&
!
strncmp
(
devstr
,
"PulseAudio "
,
11
))
{
devstr
+=
strlen
(
devstr
)
+
1
;
}
TRACE
(
"New default: %s
\n
"
,
devstr
);
*
defstr
=
devstr
;
}
static
void
openal_scanrender
(
void
)
{
WCHAR
name
[
MAX_PATH
];
...
...
@@ -756,6 +780,7 @@ static void openal_scanrender(void)
defaultstr
=
palcGetString
(
NULL
,
ALC_DEFAULT_DEVICE_SPECIFIER
);
devstr
=
palcGetString
(
NULL
,
ALC_DEVICE_SPECIFIER
);
}
pulse_fixup
(
devstr
,
&
defaultstr
);
defblacklisted
=
blacklist
(
defaultstr
);
if
(
defblacklisted
)
WARN
(
"Disabling blacklist because %s is blacklisted
\n
"
,
defaultstr
);
...
...
@@ -796,6 +821,7 @@ static void openal_scancapture(void)
EnterCriticalSection
(
&
openal_crst
);
devstr
=
palcGetString
(
NULL
,
ALC_CAPTURE_DEVICE_SPECIFIER
);
defaultstr
=
palcGetString
(
NULL
,
ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
);
pulse_fixup
(
devstr
,
&
defaultstr
);
defblacklisted
=
blacklist
(
defaultstr
);
if
(
defblacklisted
)
WARN
(
"Disabling blacklist because %s is blacklisted
\n
"
,
defaultstr
);
...
...
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