Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yoann Laissus
wine
Commits
12cf61fb
Commit
12cf61fb
authored
23 years ago
by
Eric Pouech
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
A few fixes.
parent
3c03f75c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msacm/pcmconverter.c
+14
-10
14 additions, 10 deletions
dlls/msacm/pcmconverter.c
with
14 additions
and
10 deletions
dlls/msacm/pcmconverter.c
+
14
−
10
View file @
12cf61fb
...
...
@@ -30,9 +30,11 @@ DEFAULT_DEBUG_CHANNEL(msacm);
/***********************************************************************
* PCM_drvOpen
*/
static
DWORD
PCM_drvOpen
(
LPCSTR
str
)
static
DWORD
PCM_drvOpen
(
LPCSTR
str
,
PACMDRVOPENDESCW
adod
)
{
return
1
;
return
adod
->
fccType
==
ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
&&
adod
->
fccComp
==
ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
;
}
/***********************************************************************
...
...
@@ -726,7 +728,7 @@ static LRESULT PCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery)
break
;
case
ACM_FORMATTAGDETAILSF_LARGESTSIZE
:
if
(
aftd
->
dwFormatTag
!=
WAVE_FORMAT_UNKNOWN
&&
aftd
->
dwFormatTag
!=
WAVE_FORMAT_
UNKNOWN
)
aftd
->
dwFormatTag
!=
WAVE_FORMAT_
PCM
)
return
ACMERR_NOTPOSSIBLE
;
break
;
default:
...
...
@@ -752,8 +754,7 @@ static LRESULT PCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
{
switch
(
dwQuery
)
{
case
ACM_FORMATDETAILSF_FORMAT
:
afd
->
dwFormatIndex
=
PCM_GetFormatIndex
(
afd
->
pwfx
);
if
(
afd
->
dwFormatIndex
==
0xFFFFFFFF
)
return
ACMERR_NOTPOSSIBLE
;
if
(
PCM_GetFormatIndex
(
afd
->
pwfx
)
==
0xFFFFFFFF
)
return
ACMERR_NOTPOSSIBLE
;
break
;
case
ACM_FORMATDETAILSF_INDEX
:
assert
(
afd
->
dwFormatIndex
<
NUM_PCM_FORMATS
);
...
...
@@ -875,18 +876,21 @@ static inline DWORD PCM_round(DWORD a, DWORD b, DWORD c)
*/
static
LRESULT
PCM_StreamSize
(
PACMDRVSTREAMINSTANCE
adsi
,
PACMDRVSTREAMSIZE
adss
)
{
DWORD
srcMask
=
~
(
adsi
->
pwfxSrc
->
nBlockAlign
-
1
);
DWORD
dstMask
=
~
(
adsi
->
pwfxDst
->
nBlockAlign
-
1
);
switch
(
adss
->
fdwSize
)
{
case
ACM_STREAMSIZEF_DESTINATION
:
/* cbDstLength => cbSrcLength */
adss
->
cbSrcLength
=
PCM_round
(
adss
->
cbDstLength
,
adss
->
cbSrcLength
=
PCM_round
(
adss
->
cbDstLength
&
dstMask
,
adsi
->
pwfxSrc
->
nAvgBytesPerSec
,
adsi
->
pwfxDst
->
nAvgBytesPerSec
);
adsi
->
pwfxDst
->
nAvgBytesPerSec
)
&
srcMask
;
break
;
case
ACM_STREAMSIZEF_SOURCE
:
/* cbSrcLength => cbDstLength */
adss
->
cbDstLength
=
PCM_round
(
adss
->
cbSrcLength
,
adss
->
cbDstLength
=
PCM_round
(
adss
->
cbSrcLength
&
srcMask
,
adsi
->
pwfxDst
->
nAvgBytesPerSec
,
adsi
->
pwfxSrc
->
nAvgBytesPerSec
);
adsi
->
pwfxSrc
->
nAvgBytesPerSec
)
&
dstMask
;
break
;
default:
WARN
(
"Unsupported query %08lx
\n
"
,
adss
->
fdwSize
);
...
...
@@ -954,7 +958,7 @@ LRESULT CALLBACK PCM_DriverProc(DWORD dwDevID, HDRVR hDriv, UINT wMsg,
switch
(
wMsg
)
{
case
DRV_LOAD
:
return
1
;
case
DRV_FREE
:
return
1
;
case
DRV_OPEN
:
return
PCM_drvOpen
((
LPSTR
)
dwParam1
);
case
DRV_OPEN
:
return
PCM_drvOpen
((
LPSTR
)
dwParam1
,
(
PACMDRVOPENDESCW
)
dwParam2
);
case
DRV_CLOSE
:
return
PCM_drvClose
(
dwDevID
);
case
DRV_ENABLE
:
return
1
;
case
DRV_DISABLE
:
return
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment