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
249bc5ca
Commit
249bc5ca
authored
Feb 10, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Feb 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always allocate an empty buffer.
parent
1eed552b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
buffer.c
dlls/dsound/buffer.c
+11
-19
No files found.
dlls/dsound/buffer.c
View file @
249bc5ca
...
...
@@ -1084,17 +1084,18 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
/* FIXME: check whether any hardware buffers are left */
/* FIXME: handle DSDHEAP_CREATEHEAP for hardware buffers */
/* Allocate system memory if applicable */
if
((
ds
->
drvdesc
.
dwFlags
&
DSDDESC_USESYSTEMMEMORY
)
||
!
use_hw
)
{
dsb
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
(
dsb
->
buffer
)));
if
(
dsb
->
buffer
==
NULL
)
{
WARN
(
"out of memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
dsb
->
pwfx
);
HeapFree
(
GetProcessHeap
(),
0
,
dsb
);
*
pdsb
=
NULL
;
return
DSERR_OUTOFMEMORY
;
}
/* Allocate an empty buffer */
dsb
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
(
dsb
->
buffer
)));
if
(
dsb
->
buffer
==
NULL
)
{
WARN
(
"out of memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
dsb
->
pwfx
);
HeapFree
(
GetProcessHeap
(),
0
,
dsb
);
*
pdsb
=
NULL
;
return
DSERR_OUTOFMEMORY
;
}
/* Allocate system memory for buffer if applicable */
if
((
ds
->
drvdesc
.
dwFlags
&
DSDDESC_USESYSTEMMEMORY
)
||
!
use_hw
)
{
dsb
->
buffer
->
memory
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dsb
->
buflen
);
if
(
dsb
->
buffer
->
memory
==
NULL
)
{
WARN
(
"out of memory
\n
"
);
...
...
@@ -1118,15 +1119,6 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
TRACE
(
"IDsDriver_CreateSoundBuffer failed, falling back to software buffer
\n
"
);
use_hw
=
0
;
if
(
ds
->
drvdesc
.
dwFlags
&
DSDDESC_USESYSTEMMEMORY
)
{
dsb
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
(
dsb
->
buffer
)));
if
(
dsb
->
buffer
==
NULL
)
{
WARN
(
"out of memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
dsb
->
pwfx
);
HeapFree
(
GetProcessHeap
(),
0
,
dsb
);
*
pdsb
=
NULL
;
return
DSERR_OUTOFMEMORY
;
}
dsb
->
buffer
->
memory
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dsb
->
buflen
);
if
(
dsb
->
buffer
->
memory
==
NULL
)
{
WARN
(
"out of memory
\n
"
);
...
...
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