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
88c7e935
Commit
88c7e935
authored
Nov 11, 2023
by
Anton Baskanov
Committed by
Alexandre Julliard
Nov 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Use time instead of position to order events.
Different time values can map to the same position.
parent
2c08013b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
synth.c
dlls/dmsynth/synth.c
+3
-1
No files found.
dlls/dmsynth/synth.c
View file @
88c7e935
...
@@ -322,6 +322,7 @@ struct preset
...
@@ -322,6 +322,7 @@ struct preset
struct
event
struct
event
{
{
struct
list
entry
;
struct
list
entry
;
REFERENCE_TIME
time
;
LONGLONG
position
;
LONGLONG
position
;
BYTE
midi
[
3
];
BYTE
midi
[
3
];
};
};
...
@@ -973,11 +974,12 @@ static HRESULT WINAPI synth_PlayBuffer(IDirectMusicSynth8 *iface,
...
@@ -973,11 +974,12 @@ static HRESULT WINAPI synth_PlayBuffer(IDirectMusicSynth8 *iface,
{
{
if
(
!
(
event
=
calloc
(
1
,
sizeof
(
*
event
))))
return
E_OUTOFMEMORY
;
if
(
!
(
event
=
calloc
(
1
,
sizeof
(
*
event
))))
return
E_OUTOFMEMORY
;
memcpy
(
event
->
midi
,
data
,
head
->
cbEvent
);
memcpy
(
event
->
midi
,
data
,
head
->
cbEvent
);
event
->
time
=
time
+
head
->
rtDelta
;
event
->
position
=
position
;
event
->
position
=
position
;
EnterCriticalSection
(
&
This
->
cs
);
EnterCriticalSection
(
&
This
->
cs
);
LIST_FOR_EACH_ENTRY
(
next_event
,
&
This
->
events
,
struct
event
,
entry
)
LIST_FOR_EACH_ENTRY
(
next_event
,
&
This
->
events
,
struct
event
,
entry
)
if
(
next_event
->
position
>
event
->
position
)
break
;
if
(
next_event
->
time
>
event
->
time
)
break
;
list_add_before
(
&
next_event
->
entry
,
&
event
->
entry
);
list_add_before
(
&
next_event
->
entry
,
&
event
->
entry
);
LeaveCriticalSection
(
&
This
->
cs
);
LeaveCriticalSection
(
&
This
->
cs
);
}
}
...
...
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