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
f5715f96
Commit
f5715f96
authored
Oct 13, 2009
by
Jörg Höhle
Committed by
Alexandre Julliard
May 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imaadp32: Refine size checks.
parent
8fa84df7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
imaadp32.c
dlls/imaadp32.acm/imaadp32.c
+2
-1
No files found.
dlls/imaadp32.acm/imaadp32.c
View file @
f5715f96
...
...
@@ -657,7 +657,6 @@ static LRESULT ADPCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
adfs
->
cbwfxDst
<
sizeof
(
PCMWAVEFORMAT
)
||
adfs
->
pwfxSrc
->
wFormatTag
==
adfs
->
pwfxDst
->
wFormatTag
||
ADPCM_GetFormatIndex
(
adfs
->
pwfxSrc
)
==
0xFFFFFFFF
)
return
ACMERR_NOTPOSSIBLE
;
/* FIXME: should do those tests against the real size (according to format tag */
/* If no suggestion for destination, then copy source value */
if
(
!
(
adfs
->
fdwSuggest
&
ACM_FORMATSUGGESTF_NCHANNELS
))
...
...
@@ -684,12 +683,14 @@ static LRESULT ADPCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
switch
(
adfs
->
pwfxDst
->
wFormatTag
)
{
case
WAVE_FORMAT_PCM
:
if
(
adfs
->
cbwfxSrc
<
sizeof
(
IMAADPCMWAVEFORMAT
))
return
ACMERR_NOTPOSSIBLE
;
adfs
->
pwfxDst
->
nBlockAlign
=
(
adfs
->
pwfxDst
->
nChannels
*
adfs
->
pwfxDst
->
wBitsPerSample
)
/
8
;
adfs
->
pwfxDst
->
nAvgBytesPerSec
=
adfs
->
pwfxDst
->
nSamplesPerSec
*
adfs
->
pwfxDst
->
nBlockAlign
;
/* check if result is ok */
if
(
ADPCM_GetFormatIndex
(
adfs
->
pwfxDst
)
==
0xFFFFFFFF
)
return
ACMERR_NOTPOSSIBLE
;
break
;
case
WAVE_FORMAT_IMA_ADPCM
:
if
(
adfs
->
cbwfxDst
<
sizeof
(
IMAADPCMWAVEFORMAT
))
return
ACMERR_NOTPOSSIBLE
;
init_wfx_ima_adpcm
((
IMAADPCMWAVEFORMAT
*
)
adfs
->
pwfxDst
);
/* FIXME: not handling header overhead */
TRACE
(
"setting spb=%u
\n
"
,
((
IMAADPCMWAVEFORMAT
*
)
adfs
->
pwfxDst
)
->
wSamplesPerBlock
);
...
...
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