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
d7c5f1a9
Commit
d7c5f1a9
authored
May 13, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
May 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound/tests: Replace malloc() with HeapAlloc().
parent
9cfc021b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ds3d.c
dlls/dsound/tests/ds3d.c
+2
-2
ds3d8.c
dlls/dsound/tests/ds3d8.c
+1
-1
No files found.
dlls/dsound/tests/ds3d.c
View file @
d7c5f1a9
...
...
@@ -48,7 +48,7 @@ char* wave_generate_la(WAVEFORMATEX* wfx, double duration, DWORD* size)
nb_samples
=
(
int
)(
duration
*
wfx
->
nSamplesPerSec
);
*
size
=
nb_samples
*
wfx
->
nBlockAlign
;
b
=
buf
=
malloc
(
*
size
);
b
=
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
size
);
for
(
i
=
0
;
i
<
nb_samples
;
i
++
)
{
double
y
=
sin
(
440
.
0
*
2
*
PI
*
i
/
wfx
->
nSamplesPerSec
);
if
(
wfx
->
wBitsPerSample
==
8
)
{
...
...
@@ -674,7 +674,7 @@ void test_buffer(LPDIRECTSOUND dso, LPDIRECTSOUNDBUFFER *dsbo,
"The sound played for %d ms instead of %g ms
\n
"
,
now
-
start_time
,
1000
*
duration
);
free
(
state
.
wave
);
HeapFree
(
GetProcessHeap
(),
0
,
state
.
wave
);
if
(
is_primary
)
{
/* Set the CooperativeLevel back to normal */
/* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */
...
...
dlls/dsound/tests/ds3d8.c
View file @
d7c5f1a9
...
...
@@ -518,7 +518,7 @@ void test_buffer8(LPDIRECTSOUND8 dso, LPDIRECTSOUNDBUFFER * dsbo,
"The sound played for %d ms instead of %g ms
\n
"
,
now
-
start_time
,
1000
*
duration
);
free
(
state
.
wave
);
HeapFree
(
GetProcessHeap
(),
0
,
state
.
wave
);
if
(
is_primary
)
{
/* Set the CooperativeLevel back to normal */
/* DSOUND: Setting DirectSound cooperative level to DSSCL_NORMAL */
...
...
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