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
24fa177c
Commit
24fa177c
authored
Apr 23, 2023
by
Anton Baskanov
Committed by
Alexandre Julliard
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Enable Doppler shift.
parent
3c349125
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
sound3d.c
dlls/dsound/sound3d.c
+1
-5
ds3d.c
dlls/dsound/tests/ds3d.c
+2
-2
No files found.
dlls/dsound/sound3d.c
View file @
24fa177c
...
@@ -167,6 +167,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
...
@@ -167,6 +167,7 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
int
i
,
num_main_speakers
;
int
i
,
num_main_speakers
;
float
a
,
ingain
;
float
a
,
ingain
;
/* doppler shift related stuff */
/* doppler shift related stuff */
D3DVALUE
flFreq
,
flBufferVel
,
flListenerVel
;
TRACE
(
"(%p)
\n
"
,
dsb
);
TRACE
(
"(%p)
\n
"
,
dsb
);
...
@@ -290,10 +291,6 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
...
@@ -290,10 +291,6 @@ void DSOUND_Calc3DBuffer(IDirectSoundBufferImpl *dsb)
dsb
->
freq
=
dsb
->
ds3db_freq
;
dsb
->
freq
=
dsb
->
ds3db_freq
;
/* FIXME: Doppler Effect disabled since i have no idea which frequency to change and how to do it */
if
(
0
)
{
D3DVALUE
flFreq
,
flBufferVel
,
flListenerVel
;
/* doppler shift*/
/* doppler shift*/
if
(
!
VectorMagnitude
(
&
dsb
->
ds3db_ds3db
.
vVelocity
)
&&
!
VectorMagnitude
(
&
dsb
->
device
->
ds3dl
.
vVelocity
))
if
(
!
VectorMagnitude
(
&
dsb
->
ds3db_ds3db
.
vVelocity
)
&&
!
VectorMagnitude
(
&
dsb
->
device
->
ds3dl
.
vVelocity
))
{
{
...
@@ -317,7 +314,6 @@ if(0)
...
@@ -317,7 +314,6 @@ if(0)
flBufferVel
,
flListenerVel
,
dsb
->
ds3db_freq
,
flFreq
);
flBufferVel
,
flListenerVel
,
dsb
->
ds3db_freq
,
flFreq
);
dsb
->
freq
=
flFreq
;
dsb
->
freq
=
flFreq
;
}
}
}
DSOUND_RecalcFormat
(
dsb
);
DSOUND_RecalcFormat
(
dsb
);
...
...
dlls/dsound/tests/ds3d.c
View file @
24fa177c
...
@@ -1436,9 +1436,9 @@ static void test_doppler(GUID *guid, BOOL play)
...
@@ -1436,9 +1436,9 @@ static void test_doppler(GUID *guid, BOOL play)
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
0
,
1
,
0
,
22050
,
22050
);
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
0
,
1
,
0
,
22050
,
22050
);
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
-
90
,
1
,
-
90
,
22050
,
22050
);
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
-
90
,
1
,
-
90
,
22050
,
22050
);
/* Wine TODO:
Doppler shift is missing
. */
/* Wine TODO:
The frequency is slightly off
. */
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
0
,
1
,
-
90
,
22050
,
29400
);
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
0
,
1
,
-
90
,
22050
,
29400
);
/* Wine TODO:
Doppler shift is missing
. */
/* Wine TODO:
The frequency is slightly off
. */
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
0
,
1
,
90
,
22050
,
17640
);
check_doppler
(
dsound
,
listener
,
play
,
DS3DMODE_NORMAL
,
0
,
0
,
1
,
90
,
22050
,
17640
);
IDirectSound3DListener_Release
(
listener
);
IDirectSound3DListener_Release
(
listener
);
...
...
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