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
4354be12
Commit
4354be12
authored
May 01, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
May 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Don't derive the secondary position from the primary position.
parent
f393a98a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
140 deletions
+38
-140
buffer.c
dlls/dsound/buffer.c
+2
-9
dsound_private.h
dlls/dsound/dsound_private.h
+4
-3
mixer.c
dlls/dsound/mixer.c
+32
-128
No files found.
dlls/dsound/buffer.c
View file @
4354be12
...
...
@@ -516,15 +516,12 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetCurrentPosition(IDirectSoundBuff
{
IDirectSoundBufferImpl
*
This
=
impl_from_IDirectSoundBuffer8
(
iface
);
HRESULT
hres
=
DS_OK
;
DWORD
oldpos
;
TRACE
(
"(%p,%d)
\n
"
,
This
,
newpos
);
/* **** */
RtlAcquireResourceExclusive
(
&
This
->
lock
,
TRUE
);
oldpos
=
This
->
sec_mixpos
;
/* start mixing from this new location instead */
newpos
%=
This
->
buflen
;
newpos
-=
newpos
%
This
->
pwfx
->
nBlockAlign
;
...
...
@@ -533,10 +530,6 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetCurrentPosition(IDirectSoundBuff
/* at this point, do not attempt to reset buffers, mess with primary mix position,
or anything like that to reduce latency. The data already prebuffered cannot be changed */
/* position HW buffer if applicable, else just start mixing from new location instead */
if
(
oldpos
!=
newpos
)
This
->
buf_mixpos
=
DSOUND_secpos_to_bufpos
(
This
,
newpos
,
0
,
NULL
);
RtlReleaseResource
(
&
This
->
lock
);
/* **** */
...
...
@@ -909,7 +902,7 @@ HRESULT IDirectSoundBufferImpl_Create(
/* It's not necessary to initialize values to zero since */
/* we allocated this structure with HEAP_ZERO_MEMORY... */
dsb
->
buf_mixpos
=
dsb
->
sec_mixpos
=
0
;
dsb
->
sec_mixpos
=
0
;
dsb
->
state
=
STATE_STOPPED
;
dsb
->
freqAdjust
=
dsb
->
freq
/
(
float
)
device
->
pwfx
->
nSamplesPerSec
;
...
...
@@ -1024,7 +1017,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
dsb
->
refiks
=
0
;
dsb
->
numIfaces
=
0
;
dsb
->
state
=
STATE_STOPPED
;
dsb
->
buf_mixpos
=
dsb
->
sec_mixpos
=
0
;
dsb
->
sec_mixpos
=
0
;
dsb
->
notifies
=
NULL
;
dsb
->
nrofnotifies
=
0
;
dsb
->
device
=
device
;
...
...
dlls/dsound/dsound_private.h
View file @
4354be12
...
...
@@ -178,14 +178,15 @@ struct IDirectSoundBufferImpl
DWORD
playflags
,
state
,
leadin
;
DWORD
writelead
,
buflen
;
DWORD
nAvgBytesPerSec
;
DWORD
freq
,
tmp_buffer_len
;
DWORD
freq
;
DSVOLUMEPAN
volpan
;
DSBUFFERDESC
dsbd
;
/* used for frequency conversion (PerfectPitch) */
ULONG
freqneeded
;
float
freqAcc
,
freqA
ccNext
,
freqA
djust
;
float
freqAcc
,
freqAdjust
;
/* used for mixing */
DWORD
primary_mixpos
,
buf_mixpos
,
sec_mixpos
;
DWORD
primary_mixpos
,
sec_mixpos
;
/* IDirectSoundNotify fields */
LPDSBPOSITIONNOTIFY
notifies
;
int
nrofnotifies
;
...
...
dlls/dsound/mixer.c
View file @
4354be12
This diff is collapsed.
Click to expand it.
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