Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
2e7ee8d9
Commit
2e7ee8d9
authored
14 years ago
by
Andrew Eikum
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mmdevapi: Be explicit about units in IAudioRenderClient::ReleaseBuffer.
parent
0b608d0f
No related branches found
Branches containing commit
Tags
wine-1.3.17
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/mmdevapi/audio.c
+13
-17
13 additions, 17 deletions
dlls/mmdevapi/audio.c
with
13 additions
and
17 deletions
dlls/mmdevapi/audio.c
+
13
−
17
View file @
2e7ee8d9
...
...
@@ -1196,26 +1196,26 @@ static HRESULT WINAPI ACR_GetBuffer(IAudioRenderClient *iface, UINT32 frames, BY
return
S_OK
;
}
static
HRESULT
WINAPI
ACR_ReleaseBuffer
(
IAudioRenderClient
*
iface
,
UINT32
written
,
DWORD
flags
)
static
HRESULT
WINAPI
ACR_ReleaseBuffer
(
IAudioRenderClient
*
iface
,
UINT32
written
_frames
,
DWORD
flags
)
{
ACRender
*
This
=
(
ACRender
*
)
iface
;
BYTE
*
buf
=
This
->
parent
->
buffer
;
DWORD
framesize
=
This
->
parent
->
pwfx
->
nBlockAlign
;
DWORD
ofs
=
This
->
parent
->
ofs_frames
;
DWORD
bufsize
=
This
->
parent
->
bufsize_
frames
;
DWORD
ofs
_bytes
=
This
->
parent
->
ofs_frames
*
framesize
;
DWORD
written_bytes
=
written_frames
*
frames
ize
;
DWORD
freq
=
This
->
parent
->
pwfx
->
nSamplesPerSec
;
DWORD
bpp
=
This
->
parent
->
pwfx
->
wBitsPerSample
;
ALuint
albuf
;
TRACE
(
"(%p)->(%u,%x)
\n
"
,
This
,
written
,
flags
);
TRACE
(
"(%p)->(%u,%x)
\n
"
,
This
,
written
_frames
,
flags
);
if
(
This
->
parent
->
locked
<
written
)
if
(
This
->
parent
->
locked
<
written
_frames
)
return
AUDCLNT_E_INVALID_SIZE
;
if
(
flags
&
~
AUDCLNT_BUFFERFLAGS_SILENT
)
return
E_INVALIDARG
;
if
(
!
written
)
{
if
(
!
written
_frames
)
{
if
(
This
->
parent
->
locked
)
FIXME
(
"Handled right?
\n
"
);
This
->
parent
->
locked
=
0
;
...
...
@@ -1227,25 +1227,21 @@ static HRESULT WINAPI ACR_ReleaseBuffer(IAudioRenderClient *iface, UINT32 writte
EnterCriticalSection
(
This
->
parent
->
crst
);
This
->
parent
->
ofs_frames
+=
written
;
This
->
parent
->
ofs_frames
%=
bufsize
;
This
->
parent
->
pad
+=
written
;
This
->
parent
->
frameswritten
+=
written
;
This
->
parent
->
ofs_frames
+=
written
_frames
;
This
->
parent
->
ofs_frames
%=
This
->
parent
->
bufsize_frames
;
This
->
parent
->
pad
+=
written
_frames
;
This
->
parent
->
frameswritten
+=
written
_frames
;
This
->
parent
->
locked
=
0
;
ofs
*=
framesize
;
written
*=
framesize
;
bufsize
*=
framesize
;
if
(
flags
&
AUDCLNT_BUFFERFLAGS_SILENT
)
memset
(
buf
+
of
s
,
bpp
!=
8
?
0
:
128
,
written
);
TRACE
(
"buf: %p, ofs: %x, written %u, freq %u
\n
"
,
buf
,
ofs
,
written
,
freq
);
memset
(
buf
+
ofs_byte
s
,
bpp
!=
8
?
0
:
128
,
written
_bytes
);
TRACE
(
"buf: %p, ofs: %x, written %u, freq %u
\n
"
,
buf
,
ofs
_bytes
,
written
_bytes
,
freq
);
if
(
!
valid_dev
(
This
->
parent
))
goto
out
;
setALContext
(
This
->
parent
->
parent
->
ctx
);
palGenBuffers
(
1
,
&
albuf
);
palBufferData
(
albuf
,
This
->
parent
->
format
,
buf
+
of
s
,
written
,
freq
);
palBufferData
(
albuf
,
This
->
parent
->
format
,
buf
+
ofs_byte
s
,
written
_bytes
,
freq
);
palSourceQueueBuffers
(
This
->
parent
->
source
,
1
,
&
albuf
);
TRACE
(
"Queued %u
\n
"
,
albuf
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment