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
26ba64b5
Commit
26ba64b5
authored
Apr 11, 2003
by
Robert Reif
Committed by
Alexandre Julliard
Apr 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed PCM format evaluation bug.
Properly clean up partially created sound buffers.
parent
aa89eccc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
capture.c
dlls/dsound/capture.c
+11
-7
No files found.
dlls/dsound/capture.c
View file @
26ba64b5
...
...
@@ -604,11 +604,11 @@ DSOUND_CreateDirectSoundCaptureBuffer(
wfex
->
nAvgBytesPerSec
,
wfex
->
nBlockAlign
,
wfex
->
wBitsPerSample
,
wfex
->
cbSize
);
if
(
wfex
->
cbSize
==
0
)
memcpy
(
&
(
ipDSC
->
wfx
),
wfex
,
sizeof
(
*
wfex
)
+
wfex
->
cbSize
);
if
(
wfex
->
wFormatTag
==
WAVE_FORMAT_PCM
)
memcpy
(
&
(
ipDSC
->
wfx
),
wfex
,
sizeof
(
WAVEFORMATEX
)
);
else
{
WARN
(
"non PCM formats not supported
\n
"
);
return
DSERR_BADFORMAT
;
/* FIXME: DSERR_INVALIDPARAM ? */
return
DSERR_BADFORMAT
;
}
}
else
{
WARN
(
"lpcDSCBufferDesc->lpwfxFormat == 0
\n
"
);
...
...
@@ -648,8 +648,10 @@ DSOUND_CreateDirectSoundCaptureBuffer(
&
(
ipDSC
->
wfx
),
0
,
0
,
&
(
ipDSC
->
buflen
),
&
(
ipDSC
->
buffer
),(
LPVOID
*
)
&
(
ipDSC
->
hwbuf
));
if
(
err
!=
DS_OK
)
{
WARN
(
"IDsCaptureDriver_CreateCaptureBuffer failed
\n
"
);
ipDSC
->
hwbuf
=
0
;
return
DSERR_GENERIC
;
This
->
dsound
->
capture_buffer
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
*
ppobj
=
NULL
;
return
err
;
}
}
else
{
LPBYTE
newbuf
;
...
...
@@ -662,8 +664,10 @@ DSOUND_CreateDirectSoundCaptureBuffer(
(
DWORD
)
DSOUND_capture_callback
,
(
DWORD
)
ipDSC
,
flags
));
if
(
err
!=
DS_OK
)
{
WARN
(
"waveInOpen failed
\n
"
);
ipDSC
->
hwi
=
0
;
return
DSERR_BADFORMAT
;
/* FIXME: DSERR_INVALIDPARAM ? */
This
->
dsound
->
capture_buffer
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
This
);
*
ppobj
=
NULL
;
return
err
;
}
buflen
=
lpcDSCBufferDesc
->
dwBufferBytes
;
...
...
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