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
29d1ccc7
Commit
29d1ccc7
authored
Dec 19, 2014
by
Andrew Eikum
Committed by
Alexandre Julliard
Dec 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Don't send notify events before played range.
parent
6f98de08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
mixer.c
dlls/dsound/mixer.c
+11
-7
dsound.c
dlls/dsound/tests/dsound.c
+1
-4
No files found.
dlls/dsound/mixer.c
View file @
29d1ccc7
...
...
@@ -223,16 +223,20 @@ void DSOUND_CheckEvent(const IDirectSoundBufferImpl *dsb, DWORD playpos, int len
}
}
TRACE
(
"Not stopped: first notify: %u (%u), range: [%u,%u)
\n
"
,
first
,
dsb
->
notifies
[
check
].
dwOffset
,
playpos
,
(
playpos
+
len
)
%
dsb
->
buflen
);
TRACE
(
"Not stopped: first notify: %u (%u), left notify: %u (%u), range: [%u,%u)
\n
"
,
first
,
dsb
->
notifies
[
first
].
dwOffset
,
left
,
dsb
->
notifies
[
left
].
dwOffset
,
playpos
,
(
playpos
+
len
)
%
dsb
->
buflen
);
/* send notifications in range */
for
(
check
=
left
;
check
<
dsb
->
nrofnotifies
;
++
check
){
if
(
dsb
->
notifies
[
check
].
dwOffset
>=
playpos
+
len
)
break
;
if
(
dsb
->
notifies
[
left
].
dwOffset
>=
playpos
){
for
(
check
=
left
;
check
<
dsb
->
nrofnotifies
;
++
check
){
if
(
dsb
->
notifies
[
check
].
dwOffset
>=
playpos
+
len
)
break
;
TRACE
(
"Signalling %p (%u)
\n
"
,
dsb
->
notifies
[
check
].
hEventNotify
,
dsb
->
notifies
[
check
].
dwOffset
);
SetEvent
(
dsb
->
notifies
[
check
].
hEventNotify
);
TRACE
(
"Signalling %p (%u)
\n
"
,
dsb
->
notifies
[
check
].
hEventNotify
,
dsb
->
notifies
[
check
].
dwOffset
);
SetEvent
(
dsb
->
notifies
[
check
].
hEventNotify
);
}
}
if
(
playpos
+
len
>
dsb
->
buflen
){
...
...
dlls/dsound/tests/dsound.c
View file @
29d1ccc7
...
...
@@ -1532,10 +1532,9 @@ static void test_notifications(LPGUID lpGuid)
rc
=
IDirectSoundBuffer_QueryInterface
(
buf
,
&
IID_IDirectSoundNotify
,
(
void
**
)
&
buf_notif
);
ok
(
rc
==
DS_OK
,
"QueryInterface(IID_IDirectSoundNotify): %08x
\n
"
,
rc
);
/* create notifications at each end of the buffer */
notifies
[
0
].
dwOffset
=
0
;
handles
[
0
]
=
notifies
[
0
].
hEventNotify
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
notifies
[
1
].
dwOffset
=
bufdesc
.
dwBufferBytes
-
1
;
notifies
[
1
].
dwOffset
=
bufdesc
.
dwBufferBytes
/
2
;
handles
[
1
]
=
notifies
[
1
].
hEventNotify
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
rc
=
IDirectSoundNotify_SetNotificationPositions
(
buf_notif
,
2
,
notifies
);
...
...
@@ -1550,8 +1549,6 @@ static void test_notifications(LPGUID lpGuid)
for
(
cycles
=
0
;
cycles
<
6
/* 1.5s */
;
++
cycles
){
DWORD
wait
;
/* since the notifications are on opposite ends of the entire buffer,
* they should arrive well-ordered in an alternating sequence. */
wait
=
WaitForMultipleObjects
(
2
,
handles
,
FALSE
,
1000
);
ok
(
wait
<=
WAIT_OBJECT_0
+
1
&&
wait
-
WAIT_OBJECT_0
==
expect
,
"Got unexpected notification order or timeout: %u
\n
"
,
wait
);
...
...
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