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
e2c0ea01
Commit
e2c0ea01
authored
Sep 23, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Sep 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound/tests: Remove some explicit casts that happen implicitly.
parent
6074bd51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ds3d.c
dlls/dsound/tests/ds3d.c
+4
-4
No files found.
dlls/dsound/tests/ds3d.c
View file @
e2c0ea01
...
...
@@ -54,12 +54,12 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size, BOOL iee
for
(
i
=
0
;
i
<
nb_samples
;
i
++
)
{
double
y
=
sin
(
440
.
0
*
2
*
PI
*
i
/
wfx
->
nSamplesPerSec
);
if
(
wfx
->
wBitsPerSample
==
8
)
{
unsigned
char
sample
=
(
unsigned
char
)((
double
)
127
.
5
*
(
y
+
1
.
0
)
);
unsigned
char
sample
=
127
.
5
*
(
y
+
1
.
0
);
*
b
++=
sample
;
if
(
wfx
->
nChannels
==
2
)
*
b
++=
sample
;
}
else
if
(
wfx
->
wBitsPerSample
==
16
)
{
signed
short
sample
=
(
signed
short
)((
double
)
32767
.
5
*
y
-
0
.
5
)
;
signed
short
sample
=
32767
.
5
*
y
-
0
.
5
;
b
[
0
]
=
sample
&
0xff
;
b
[
1
]
=
sample
>>
8
;
b
+=
2
;
...
...
@@ -69,7 +69,7 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size, BOOL iee
b
+=
2
;
}
}
else
if
(
wfx
->
wBitsPerSample
==
24
)
{
signed
int
sample
=
(
signed
int
)((
double
)
8388607
.
5
*
y
-
0
.
5
)
;
signed
int
sample
=
8388607
.
5
*
y
-
0
.
5
;
b
[
0
]
=
sample
&
0xff
;
b
[
1
]
=
(
sample
>>
8
)
&
0xff
;
b
[
2
]
=
sample
>>
16
;
...
...
@@ -93,7 +93,7 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size, BOOL iee
b
+=
4
;
}
}
else
{
signed
int
sample
=
(
signed
int
)((
double
)
2147483647
.
5
*
y
-
0
.
5
)
;
signed
int
sample
=
2147483647
.
5
*
y
-
0
.
5
;
b
[
0
]
=
sample
&
0xff
;
b
[
1
]
=
(
sample
>>
8
)
&
0xff
;
b
[
2
]
=
(
sample
>>
16
)
&
0xff
;
...
...
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