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
0e0544aa
Commit
0e0544aa
authored
Feb 10, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Feb 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed/unsigned fix and code cleanup.
parent
05437748
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mixer.c
dlls/dsound/mixer.c
+5
-5
No files found.
dlls/dsound/mixer.c
View file @
0e0544aa
...
@@ -225,7 +225,7 @@ static INT DSOUND_MixerNorm(IDirectSoundBufferImpl *dsb, BYTE *buf, INT len)
...
@@ -225,7 +225,7 @@ static INT DSOUND_MixerNorm(IDirectSoundBufferImpl *dsb, BYTE *buf, INT len)
if
((
dsb
->
freq
==
dsb
->
dsound
->
pwfx
->
nSamplesPerSec
)
&&
if
((
dsb
->
freq
==
dsb
->
dsound
->
pwfx
->
nSamplesPerSec
)
&&
(
dsb
->
pwfx
->
wBitsPerSample
==
dsb
->
dsound
->
pwfx
->
wBitsPerSample
)
&&
(
dsb
->
pwfx
->
wBitsPerSample
==
dsb
->
dsound
->
pwfx
->
wBitsPerSample
)
&&
(
dsb
->
pwfx
->
nChannels
==
dsb
->
dsound
->
pwfx
->
nChannels
))
{
(
dsb
->
pwfx
->
nChannels
==
dsb
->
dsound
->
pwfx
->
nChannels
))
{
DWORD
bytesleft
=
dsb
->
buflen
-
dsb
->
buf_mixpos
;
INT
bytesleft
=
dsb
->
buflen
-
dsb
->
buf_mixpos
;
TRACE
(
"(%p) Best case
\n
"
,
dsb
);
TRACE
(
"(%p) Best case
\n
"
,
dsb
);
if
(
len
<=
bytesleft
)
if
(
len
<=
bytesleft
)
CopyMemory
(
obp
,
ibp
,
len
);
CopyMemory
(
obp
,
ibp
,
len
);
...
@@ -374,18 +374,18 @@ static LPBYTE DSOUND_tmpbuffer(IDirectSoundImpl *dsound, DWORD len)
...
@@ -374,18 +374,18 @@ static LPBYTE DSOUND_tmpbuffer(IDirectSoundImpl *dsound, DWORD len)
static
DWORD
DSOUND_MixInBuffer
(
IDirectSoundBufferImpl
*
dsb
,
DWORD
writepos
,
DWORD
fraglen
)
static
DWORD
DSOUND_MixInBuffer
(
IDirectSoundBufferImpl
*
dsb
,
DWORD
writepos
,
DWORD
fraglen
)
{
{
INT
i
,
len
,
ilen
,
temp
,
field
,
nBlockAlign
,
todo
;
INT
i
,
len
,
ilen
,
field
,
nBlockAlign
,
todo
;
BYTE
*
buf
,
*
ibuf
;
BYTE
*
buf
,
*
ibuf
;
TRACE
(
"(%p,%ld,%ld)
\n
"
,
dsb
,
writepos
,
fraglen
);
TRACE
(
"(%p,%ld,%ld)
\n
"
,
dsb
,
writepos
,
fraglen
);
len
=
fraglen
;
len
=
fraglen
;
if
(
!
(
dsb
->
playflags
&
DSBPLAY_LOOPING
))
{
if
(
!
(
dsb
->
playflags
&
DSBPLAY_LOOPING
))
{
temp
=
MulDiv
(
dsb
->
dsound
->
pwfx
->
nAvgBytesPerSec
,
dsb
->
buflen
,
INT
temp
=
MulDiv
(
dsb
->
dsound
->
pwfx
->
nAvgBytesPerSec
,
dsb
->
buflen
,
dsb
->
nAvgBytesPerSec
)
-
dsb
->
nAvgBytesPerSec
)
-
MulDiv
(
dsb
->
dsound
->
pwfx
->
nAvgBytesPerSec
,
dsb
->
buf_mixpos
,
MulDiv
(
dsb
->
dsound
->
pwfx
->
nAvgBytesPerSec
,
dsb
->
buf_mixpos
,
dsb
->
nAvgBytesPerSec
);
dsb
->
nAvgBytesPerSec
);
len
=
(
len
>
temp
)
?
temp
:
len
;
len
=
min
(
len
,
temp
)
;
}
}
nBlockAlign
=
dsb
->
dsound
->
pwfx
->
nBlockAlign
;
nBlockAlign
=
dsb
->
dsound
->
pwfx
->
nBlockAlign
;
len
=
len
/
nBlockAlign
*
nBlockAlign
;
/* data alignment */
len
=
len
/
nBlockAlign
*
nBlockAlign
;
/* data alignment */
...
...
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