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
e43ca169
Commit
e43ca169
authored
Aug 27, 2015
by
Andrew Eikum
Committed by
Alexandre Julliard
Aug 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xaudio2: Implement IXAudio2SourceVoice::SubmitSourceBuffer.
parent
a4fd0a70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
xaudio_dll.c
dlls/xaudio2_7/xaudio_dll.c
+42
-0
No files found.
dlls/xaudio2_7/xaudio_dll.c
View file @
e43ca169
...
...
@@ -584,7 +584,49 @@ static HRESULT WINAPI XA2SRC_SubmitSourceBuffer(IXAudio2SourceVoice *iface,
const
XAUDIO2_BUFFER
*
pBuffer
,
const
XAUDIO2_BUFFER_WMA
*
pBufferWMA
)
{
XA2SourceImpl
*
This
=
impl_from_IXAudio2SourceVoice
(
iface
);
XA2Buffer
*
buf
;
UINT32
buf_idx
;
TRACE
(
"%p, %p, %p
\n
"
,
This
,
pBuffer
,
pBufferWMA
);
if
(
TRACE_ON
(
xaudio2
)){
TRACE
(
"Flags: 0x%x
\n
"
,
pBuffer
->
Flags
);
TRACE
(
"AudioBytes: %u
\n
"
,
pBuffer
->
AudioBytes
);
TRACE
(
"pAudioData: %p
\n
"
,
pBuffer
->
pAudioData
);
TRACE
(
"PlayBegin: %u
\n
"
,
pBuffer
->
PlayBegin
);
TRACE
(
"PlayLength: %u
\n
"
,
pBuffer
->
PlayLength
);
TRACE
(
"LoopBegin: %u
\n
"
,
pBuffer
->
LoopBegin
);
TRACE
(
"LoopLength: %u
\n
"
,
pBuffer
->
LoopLength
);
TRACE
(
"LoopCount: %u
\n
"
,
pBuffer
->
LoopCount
);
TRACE
(
"pContext: %p
\n
"
,
pBuffer
->
pContext
);
}
EnterCriticalSection
(
&
This
->
lock
);
if
(
This
->
nbufs
>=
XAUDIO2_MAX_QUEUED_BUFFERS
){
TRACE
(
"Too many buffers queued!
\n
"
);
LeaveCriticalSection
(
&
This
->
lock
);
return
XAUDIO2_E_INVALID_CALL
;
}
buf_idx
=
(
This
->
first_buf
+
This
->
nbufs
)
%
XAUDIO2_MAX_QUEUED_BUFFERS
;
buf
=
&
This
->
buffers
[
buf_idx
];
memset
(
buf
,
0
,
sizeof
(
*
buf
));
/* API contract: pAudioData must remain valid until this buffer is played,
* but pBuffer itself may be reused immediately */
memcpy
(
&
buf
->
xa2buffer
,
pBuffer
,
sizeof
(
*
pBuffer
));
buf
->
offs_bytes
=
0
;
buf
->
latest_al_buf
=
-
1
;
++
This
->
nbufs
;
TRACE
(
"%p: queued buffer %u (%u bytes), now %u buffers held
\n
"
,
This
,
buf_idx
,
buf
->
xa2buffer
.
AudioBytes
,
This
->
nbufs
);
LeaveCriticalSection
(
&
This
->
lock
);
return
S_OK
;
}
...
...
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