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
8129b184
Commit
8129b184
authored
Aug 09, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Aug 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Pulse knows handle_underrun only since 2010-07-09.
parent
89367ebe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
19 deletions
+16
-19
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+16
-19
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
8129b184
...
...
@@ -497,6 +497,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev,
int
err
;
snd_pcm_stream_t
stream
;
snd_config_t
*
lconf
;
static
int
handle_underrun
=
1
;
TRACE
(
"
\"
%s
\"
%p %d %p
\n
"
,
key
,
dev
,
dataflow
,
out
);
...
...
@@ -520,27 +521,23 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev,
return
E_UNEXPECTED
;
}
lconf
=
make_handle_underrun_config
(
key
);
This
->
dataflow
=
dataflow
;
if
(
lconf
){
if
((
err
=
snd_pcm_open_lconf
(
&
This
->
pcm_handle
,
key
,
stream
,
SND_PCM_NONBLOCK
,
lconf
))
<
0
){
snd_config_delete
(
lconf
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
WARN
(
"Unable to open PCM
\"
%s
\"
: %d (%s)
\n
"
,
key
,
err
,
snd_strerror
(
err
));
return
E_FAIL
;
}
if
(
handle_underrun
&&
((
lconf
=
make_handle_underrun_config
(
key
)))){
err
=
snd_pcm_open_lconf
(
&
This
->
pcm_handle
,
key
,
stream
,
SND_PCM_NONBLOCK
,
lconf
);
TRACE
(
"Opening PCM device
\"
%s
\"
with handle_underrun: %d
\n
"
,
key
,
err
);
snd_config_delete
(
lconf
);
}
else
{
if
((
err
=
snd_pcm_open
(
&
This
->
pcm_handle
,
key
,
stream
,
SND_PCM_NONBLOCK
))
<
0
){
HeapFree
(
GetProcessHeap
(),
0
,
This
);
WARN
(
"Unable to open PCM
\"
%s
\"
: %d (%s)
\n
"
,
key
,
err
,
snd_strerror
(
err
));
return
E_FAIL
;
}
/* Pulse <= 2010 returns EINVAL, it does not know handle_underrun. */
if
(
err
==
-
EINVAL
)
handle_underrun
=
0
;
}
else
err
=
-
EINVAL
;
if
(
err
==
-
EINVAL
){
err
=
snd_pcm_open
(
&
This
->
pcm_handle
,
key
,
stream
,
SND_PCM_NONBLOCK
);
}
if
(
err
<
0
){
HeapFree
(
GetProcessHeap
(),
0
,
This
);
WARN
(
"Unable to open PCM
\"
%s
\"
: %d (%s)
\n
"
,
key
,
err
,
snd_strerror
(
err
));
return
E_FAIL
;
}
This
->
hw_params
=
HeapAlloc
(
GetProcessHeap
(),
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