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
0ba37e23
Commit
0ba37e23
authored
Aug 02, 2004
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Aug 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using round(), which is unportable.
parent
81994233
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
mixer.c
dlls/dsound/mixer.c
+3
-4
No files found.
dlls/dsound/mixer.c
View file @
0ba37e23
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
*/
*/
#include "config.h"
#include "config.h"
#define _GNU_SOURCE
/* for round() in math.h */
#include <assert.h>
#include <assert.h>
#include <stdarg.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdio.h>
...
@@ -85,17 +84,17 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
...
@@ -85,17 +84,17 @@ void DSOUND_AmpFactorToVolPan(PDSVOLUMEPAN volpan)
right
=
600
*
log
(((
double
)
volpan
->
dwTotalRightAmpFactor
)
/
0xffff
)
/
log
(
2
);
right
=
600
*
log
(((
double
)
volpan
->
dwTotalRightAmpFactor
)
/
0xffff
)
/
log
(
2
);
if
(
left
<
right
)
if
(
left
<
right
)
{
{
volpan
->
lVolume
=
r
ound
(
right
)
;
volpan
->
lVolume
=
r
ight
;
volpan
->
dwVolAmpFactor
=
volpan
->
dwTotalRightAmpFactor
;
volpan
->
dwVolAmpFactor
=
volpan
->
dwTotalRightAmpFactor
;
}
}
else
else
{
{
volpan
->
lVolume
=
round
(
left
)
;
volpan
->
lVolume
=
left
;
volpan
->
dwVolAmpFactor
=
volpan
->
dwTotalLeftAmpFactor
;
volpan
->
dwVolAmpFactor
=
volpan
->
dwTotalLeftAmpFactor
;
}
}
if
(
volpan
->
lVolume
<
-
10000
)
if
(
volpan
->
lVolume
<
-
10000
)
volpan
->
lVolume
=-
10000
;
volpan
->
lVolume
=-
10000
;
volpan
->
lPan
=
r
ound
(
right
-
left
)
;
volpan
->
lPan
=
r
ight
-
left
;
if
(
volpan
->
lPan
<
-
10000
)
if
(
volpan
->
lPan
<
-
10000
)
volpan
->
lPan
=-
10000
;
volpan
->
lPan
=-
10000
;
...
...
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