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
2b981177
Commit
2b981177
authored
Dec 25, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Dec 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Use if(0) instead of #if 0 to make sure code still compiles.
parent
825a25ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
sound3d.c
dlls/dsound/sound3d.c
+11
-10
No files found.
dlls/dsound/sound3d.c
View file @
2b981177
...
...
@@ -162,9 +162,6 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
D3DVALUE
flAngle
;
D3DVECTOR
vLeft
;
/* doppler shift related stuff */
#if 0
D3DVALUE flFreq, flBufferVel, flListenerVel;
#endif
TRACE
(
"(%p)
\n
"
,
dsb
);
...
...
@@ -263,13 +260,17 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
TRACE
(
"panning: Angle = %f rad, lPan = %d
\n
"
,
flAngle
,
dsb
->
volpan
.
lPan
);
/* FIXME: Doppler Effect disabled since i have no idea which frequency to change and how to do it */
#if 0
if
(
0
)
{
D3DVALUE
flFreq
,
flBufferVel
,
flListenerVel
;
/* doppler shift*/
if (
(VectorMagnitude(&ds3db_ds3db.vVelocity) == 0) && (VectorMagnitude(&dsb->device->ds3dl.vVelocity) == 0
))
if
(
!
VectorMagnitude
(
&
dsb
->
ds3db_ds3db
.
vVelocity
)
&&
!
VectorMagnitude
(
&
dsb
->
device
->
ds3dl
.
vVelocity
))
{
TRACE
(
"doppler: Buffer and Listener don't have velocities
\n
"
);
}
else if (ds3db_ds3db.vVelocity != dsb->device->ds3dl.vVelocity)
else
if
(
!
(
dsb
->
ds3db_ds3db
.
vVelocity
.
x
==
dsb
->
device
->
ds3dl
.
vVelocity
.
x
&&
dsb
->
ds3db_ds3db
.
vVelocity
.
y
==
dsb
->
device
->
ds3dl
.
vVelocity
.
y
&&
dsb
->
ds3db_ds3db
.
vVelocity
.
z
==
dsb
->
device
->
ds3dl
.
vVelocity
.
z
))
{
/* calculate length of ds3db_ds3db.vVelocity component which causes Doppler Effect
NOTE: if buffer moves TOWARDS the listener, it's velocity component is NEGATIVE
...
...
@@ -282,14 +283,14 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
/* formula taken from Gianicoli D.: Physics, 4th edition: */
/* FIXME: replace dsb->freq with appropriate frequency ! */
flFreq
=
dsb
->
freq
*
((
DEFAULT_VELOCITY
+
flListenerVel
)
/
(
DEFAULT_VELOCITY
+
flBufferVel
));
TRACE("doppler: Buffer velocity (component) = %
lf, Listener velocity (component) = %lf => Doppler shift: %ld Hz -> %lf Hz\n", flBufferVel, flListenerVel
,
dsb->freq, flFreq);
TRACE
(
"doppler: Buffer velocity (component) = %
f, Listener velocity (component) = %f => Doppler shift: %d Hz -> %f Hz
\n
"
,
flBufferVel
,
flListenerVel
,
dsb
->
freq
,
flFreq
);
/* FIXME: replace following line with correct frequency setting ! */
dsb
->
freq
=
flFreq
;
DSOUND_RecalcFormat
(
dsb
);
DSOUND_MixToTemporary(dsb, 0, dsb->buflen);
DSOUND_MixToTemporary
(
dsb
,
0
,
dsb
->
buflen
,
FALSE
);
}
#endif
}
/* time for remix */
DSOUND_RecalcVolPan
(
&
dsb
->
volpan
);
...
...
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