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
d440eb7f
Commit
d440eb7f
authored
May 03, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
May 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Try to detect openal 1.11, and do not blacklist pulseaudio on it.
parent
af9f9cb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
9 deletions
+35
-9
devenum.c
dlls/mmdevapi/devenum.c
+35
-9
No files found.
dlls/mmdevapi/devenum.c
View file @
d440eb7f
...
...
@@ -759,24 +759,50 @@ static int blacklist(const char *dev) {
return
0
;
}
static
void
pulse_fixup
(
const
char
*
devstr
,
const
char
**
defstr
)
{
static
void
pulse_fixup
(
const
char
*
devstr
,
const
char
**
defstr
,
int
render
)
{
static
int
warned
;
int
default_pulse
;
if
(
!
blacklist_pulse
&&
!
local_contexts
)
if
(
render
&&
!
blacklist_pulse
&&
!
local_contexts
)
blacklist_pulse
=
1
;
if
(
!
blacklist_pulse
||
!
devstr
||
strncmp
(
*
defstr
,
"PulseAudio "
,
11
)
)
if
(
!
blacklist_pulse
||
!
devstr
||
!*
devstr
)
return
;
default_pulse
=
!
strncmp
(
*
defstr
,
"PulseAudio "
,
11
);
while
(
*
devstr
&&
!
strncmp
(
devstr
,
"PulseAudio "
,
11
))
devstr
+=
strlen
(
devstr
)
+
1
;
/* Could still be a newer version, so check for 1.11 if more devices are enabled */
if
(
render
&&
*
devstr
)
{
ALCdevice
*
dev
=
palcOpenDevice
(
devstr
);
ALCcontext
*
ctx
=
palcCreateContext
(
dev
,
NULL
);
if
(
ctx
)
{
const
char
*
ver
;
setALContext
(
ctx
);
ver
=
palGetString
(
AL_VERSION
);
popALContext
();
palcDestroyContext
(
ctx
);
if
(
!
strcmp
(
ver
,
"1.1 ALSOFT 1.11.753"
))
{
blacklist_pulse
=
0
;
palcCloseDevice
(
dev
);
return
;
}
}
if
(
dev
)
palcCloseDevice
(
dev
);
}
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
;
if
(
default_pulse
)
*
defstr
=
devstr
;
}
static
void
openal_scanrender
(
void
)
...
...
@@ -793,7 +819,7 @@ static void openal_scanrender(void)
defaultstr
=
palcGetString
(
NULL
,
ALC_DEFAULT_DEVICE_SPECIFIER
);
devstr
=
palcGetString
(
NULL
,
ALC_DEVICE_SPECIFIER
);
}
pulse_fixup
(
devstr
,
&
defaultstr
);
pulse_fixup
(
devstr
,
&
defaultstr
,
1
);
defblacklisted
=
blacklist
(
defaultstr
);
if
(
defblacklisted
)
WARN
(
"Disabling blacklist because %s is blacklisted
\n
"
,
defaultstr
);
...
...
@@ -834,7 +860,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
);
pulse_fixup
(
devstr
,
&
defaultstr
,
0
);
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