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
52c88ea7
Commit
52c88ea7
authored
Jan 01, 2012
by
Jörg Höhle
Committed by
Alexandre Julliard
Jan 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Log the periodic renderer callback.
parent
ef111ce1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+8
-15
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
52c88ea7
...
@@ -1173,14 +1173,13 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient *iface,
...
@@ -1173,14 +1173,13 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient *iface,
return
AUDCLNT_E_NOT_INITIALIZED
;
return
AUDCLNT_E_NOT_INITIALIZED
;
}
}
/* padding is solely updated at callback time in shared mode */
*
out
=
This
->
held_frames
;
*
out
=
This
->
held_frames
;
/* call required to get accurate snd_pcm_state() */
snd_pcm_avail_update
(
This
->
pcm_handle
);
TRACE
(
"pad: %u, state: %u
\n
"
,
*
out
,
snd_pcm_state
(
This
->
pcm_handle
));
LeaveCriticalSection
(
&
This
->
lock
);
LeaveCriticalSection
(
&
This
->
lock
);
TRACE
(
"pad: %u
\n
"
,
*
out
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -1522,7 +1521,7 @@ static void alsa_write_data(ACImpl *This)
...
@@ -1522,7 +1521,7 @@ static void alsa_write_data(ACImpl *This)
if
(
snd_pcm_state
(
This
->
pcm_handle
)
==
SND_PCM_STATE_XRUN
||
if
(
snd_pcm_state
(
This
->
pcm_handle
)
==
SND_PCM_STATE_XRUN
||
avail
>
This
->
alsa_bufsize_frames
){
avail
>
This
->
alsa_bufsize_frames
){
TRACE
(
"XRun state
, recovering
\n
"
);
TRACE
(
"XRun state
avail %ld, recovering
\n
"
,
avail
);
avail
=
This
->
alsa_bufsize_frames
;
avail
=
This
->
alsa_bufsize_frames
;
...
@@ -1534,7 +1533,8 @@ static void alsa_write_data(ACImpl *This)
...
@@ -1534,7 +1533,8 @@ static void alsa_write_data(ACImpl *This)
if
((
err
=
snd_pcm_prepare
(
This
->
pcm_handle
))
<
0
)
if
((
err
=
snd_pcm_prepare
(
This
->
pcm_handle
))
<
0
)
WARN
(
"snd_pcm_prepare failed: %d (%s)
\n
"
,
err
,
snd_strerror
(
err
));
WARN
(
"snd_pcm_prepare failed: %d (%s)
\n
"
,
err
,
snd_strerror
(
err
));
}
}
else
TRACE
(
"pad: %ld
\n
"
,
This
->
alsa_bufsize_frames
-
avail
);
if
(
This
->
held_frames
==
0
)
if
(
This
->
held_frames
==
0
)
return
;
return
;
...
@@ -1953,8 +1953,6 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
...
@@ -1953,8 +1953,6 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
{
{
ACImpl
*
This
=
impl_from_IAudioRenderClient
(
iface
);
ACImpl
*
This
=
impl_from_IAudioRenderClient
(
iface
);
UINT32
write_pos
;
UINT32
write_pos
;
UINT32
pad
;
HRESULT
hr
;
TRACE
(
"(%p)->(%u, %p)
\n
"
,
This
,
frames
,
data
);
TRACE
(
"(%p)->(%u, %p)
\n
"
,
This
,
frames
,
data
);
...
@@ -1974,13 +1972,8 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
...
@@ -1974,13 +1972,8 @@ static HRESULT WINAPI AudioRenderClient_GetBuffer(IAudioRenderClient *iface,
return
S_OK
;
return
S_OK
;
}
}
hr
=
IAudioClient_GetCurrentPadding
(
&
This
->
IAudioClient_iface
,
&
pad
);
/* held_frames == GetCurrentPadding_nolock(); */
if
(
FAILED
(
hr
)){
if
(
This
->
held_frames
+
frames
>
This
->
bufsize_frames
){
LeaveCriticalSection
(
&
This
->
lock
);
return
hr
;
}
if
(
pad
+
frames
>
This
->
bufsize_frames
){
LeaveCriticalSection
(
&
This
->
lock
);
LeaveCriticalSection
(
&
This
->
lock
);
return
AUDCLNT_E_BUFFER_TOO_LARGE
;
return
AUDCLNT_E_BUFFER_TOO_LARGE
;
}
}
...
...
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