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
4b59776e
Commit
4b59776e
authored
Feb 14, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msacm32.drv: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8c30c527
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
39 deletions
+38
-39
Makefile.in
dlls/msacm32.drv/Makefile.in
+0
-1
wavemap.c
dlls/msacm32.drv/wavemap.c
+38
-38
No files found.
dlls/msacm32.drv/Makefile.in
View file @
4b59776e
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
msacm32.drv
IMPORTS
=
msacm32 winmm user32
...
...
dlls/msacm32.drv/wavemap.c
View file @
4b59776e
...
...
@@ -80,7 +80,7 @@ static void CALLBACK wodCallback(HWAVEOUT hWave, UINT uMsg, DWORD_PTR dwInstance
{
WAVEMAPDATA
*
wom
=
(
WAVEMAPDATA
*
)
dwInstance
;
TRACE
(
"(%p %u %
ld %lx %l
x);
\n
"
,
hWave
,
uMsg
,
dwInstance
,
dwParam1
,
dwParam2
);
TRACE
(
"(%p %u %
Id %Ix %I
x);
\n
"
,
hWave
,
uMsg
,
dwInstance
,
dwParam1
,
dwParam2
);
if
(
!
WAVEMAP_IsData
(
wom
))
{
ERR
(
"Bad data
\n
"
);
...
...
@@ -125,7 +125,7 @@ static DWORD wodOpenHelper(WAVEMAPDATA* wom, UINT idx,
{
DWORD
ret
;
TRACE
(
"(%p %04x %p %p %08x)
\n
"
,
wom
,
idx
,
lpDesc
,
lpwfx
,
dwFlags
);
TRACE
(
"(%p %04x %p %p %08
l
x)
\n
"
,
wom
,
idx
,
lpDesc
,
lpwfx
,
dwFlags
);
/* destination is always PCM, so the formulas below apply */
lpwfx
->
nBlockAlign
=
(
lpwfx
->
nChannels
*
lpwfx
->
wBitsPerSample
)
/
8
;
...
...
@@ -144,7 +144,7 @@ static DWORD wodOpenHelper(WAVEMAPDATA* wom, UINT idx,
wom
->
hAcmStream
=
0
;
}
}
TRACE
(
"ret = %08x
\n
"
,
ret
);
TRACE
(
"ret = %08
l
x
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -155,7 +155,7 @@ static DWORD wodOpen(DWORD_PTR *lpdwUser, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
WAVEMAPDATA
*
wom
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WAVEMAPDATA
));
DWORD
res
;
TRACE
(
"(%p %p %08x)
\n
"
,
lpdwUser
,
lpDesc
,
dwFlags
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
lpdwUser
,
lpDesc
,
dwFlags
);
if
(
!
wom
)
{
WARN
(
"no memory
\n
"
);
...
...
@@ -288,7 +288,7 @@ error:
WARN
(
"ret = WAVERR_BADFORMAT
\n
"
);
return
WAVERR_BADFORMAT
;
}
WARN
(
"ret = 0x%08x
\n
"
,
res
);
WARN
(
"ret = 0x%08
l
x
\n
"
,
res
);
return
res
;
}
...
...
@@ -315,7 +315,7 @@ static DWORD wodWrite(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2)
PACMSTREAMHEADER
ash
;
LPWAVEHDR
lpWaveHdrDst
;
TRACE
(
"(%p %p %08x)
\n
"
,
wom
,
lpWaveHdrSrc
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wom
,
lpWaveHdrSrc
,
dwParam2
);
if
(
!
wom
->
hAcmStream
)
{
return
waveOutWrite
(
wom
->
u
.
out
.
hInnerWave
,
lpWaveHdrSrc
,
dwParam2
);
...
...
@@ -352,7 +352,7 @@ static DWORD wodPrepare(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2
DWORD
dwRet
;
LPWAVEHDR
lpWaveHdrDst
;
TRACE
(
"(%p %p %08x)
\n
"
,
wom
,
lpWaveHdrSrc
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wom
,
lpWaveHdrSrc
,
dwParam2
);
if
(
!
wom
->
hAcmStream
)
return
waveOutPrepareHeader
(
wom
->
u
.
out
.
hInnerWave
,
lpWaveHdrSrc
,
dwParam2
);
...
...
@@ -401,7 +401,7 @@ static DWORD wodPrepare(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwParam2
TRACE
(
"=> (0)
\n
"
);
return
MMSYSERR_NOERROR
;
errCleanUp:
TRACE
(
"=> (%d)
\n
"
,
dwRet
);
TRACE
(
"=> (%
l
d)
\n
"
,
dwRet
);
HeapFree
(
GetProcessHeap
(),
0
,
ash
);
return
dwRet
;
}
...
...
@@ -412,7 +412,7 @@ static DWORD wodUnprepare(WAVEMAPDATA* wom, LPWAVEHDR lpWaveHdrSrc, DWORD dwPara
LPWAVEHDR
lpWaveHdrDst
;
DWORD
dwRet1
,
dwRet2
;
TRACE
(
"(%p %p %08x)
\n
"
,
wom
,
lpWaveHdrSrc
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wom
,
lpWaveHdrSrc
,
dwParam2
);
if
(
!
wom
->
hAcmStream
)
{
return
waveOutUnprepareHeader
(
wom
->
u
.
out
.
hInnerWave
,
lpWaveHdrSrc
,
dwParam2
);
...
...
@@ -433,7 +433,7 @@ static DWORD wodGetPosition(WAVEMAPDATA* wom, LPMMTIME lpTime, DWORD dwParam2)
{
DWORD
val
;
MMTIME
timepos
;
TRACE
(
"(%p %p %08x)
\n
"
,
wom
,
lpTime
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wom
,
lpTime
,
dwParam2
);
timepos
=
*
lpTime
;
...
...
@@ -493,7 +493,7 @@ static DWORD wodGetPosition(WAVEMAPDATA* wom, LPMMTIME lpTime, DWORD dwParam2)
static
DWORD
wodGetDevCaps
(
UINT
wDevID
,
WAVEMAPDATA
*
wom
,
LPWAVEOUTCAPSW
lpWaveCaps
,
DWORD
dwParam2
)
{
TRACE
(
"(%04x %p %p %08x)
\n
"
,
wDevID
,
wom
,
lpWaveCaps
,
dwParam2
);
TRACE
(
"(%04x %p %p %08
l
x)
\n
"
,
wDevID
,
wom
,
lpWaveCaps
,
dwParam2
);
/* if opened low driver, forward message */
if
(
WAVEMAP_IsData
(
wom
))
...
...
@@ -538,7 +538,7 @@ static DWORD wodGetVolume(UINT wDevID, WAVEMAPDATA* wom, LPDWORD lpVol)
static
DWORD
wodSetVolume
(
UINT
wDevID
,
WAVEMAPDATA
*
wom
,
DWORD
vol
)
{
TRACE
(
"(%04x %p %08x)
\n
"
,
wDevID
,
wom
,
vol
);
TRACE
(
"(%04x %p %08
l
x)
\n
"
,
wDevID
,
wom
,
vol
);
if
(
WAVEMAP_IsData
(
wom
))
return
waveOutSetVolume
(
wom
->
u
.
out
.
hInnerWave
,
vol
);
...
...
@@ -578,7 +578,7 @@ static DWORD wodMapperStatus(WAVEMAPDATA* wom, DWORD flags, LPVOID ptr)
UINT
id
;
DWORD
ret
=
MMSYSERR_NOTSUPPORTED
;
TRACE
(
"(%p %08x %p)
\n
"
,
wom
,
flags
,
ptr
);
TRACE
(
"(%p %08
l
x %p)
\n
"
,
wom
,
flags
,
ptr
);
switch
(
flags
)
{
case
WAVEOUT_MAPPER_STATUS_DEVICE
:
...
...
@@ -586,16 +586,16 @@ static DWORD wodMapperStatus(WAVEMAPDATA* wom, DWORD flags, LPVOID ptr)
*
(
LPDWORD
)
ptr
=
id
;
break
;
case
WAVEOUT_MAPPER_STATUS_MAPPED
:
FIXME
(
"Unsupported flag=%d
\n
"
,
flags
);
FIXME
(
"Unsupported flag=%
l
d
\n
"
,
flags
);
*
(
LPDWORD
)
ptr
=
0
;
/* FIXME ?? */
break
;
case
WAVEOUT_MAPPER_STATUS_FORMAT
:
FIXME
(
"Unsupported flag=%d
\n
"
,
flags
);
FIXME
(
"Unsupported flag=%
l
d
\n
"
,
flags
);
/* ptr points to a WAVEFORMATEX struct - before or after streaming ? */
*
(
LPDWORD
)
ptr
=
0
;
break
;
default:
FIXME
(
"Unsupported flag=%d
\n
"
,
flags
);
FIXME
(
"Unsupported flag=%
l
d
\n
"
,
flags
);
*
(
LPDWORD
)
ptr
=
0
;
break
;
}
...
...
@@ -604,7 +604,7 @@ static DWORD wodMapperStatus(WAVEMAPDATA* wom, DWORD flags, LPVOID ptr)
static
DWORD
wodMapperReconfigure
(
WAVEMAPDATA
*
wom
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
FIXME
(
"(%p %08
x %08
x) stub!
\n
"
,
wom
,
dwParam1
,
dwParam2
);
FIXME
(
"(%p %08
lx %08l
x) stub!
\n
"
,
wom
,
dwParam1
,
dwParam2
);
return
MMSYSERR_NOERROR
;
}
...
...
@@ -615,7 +615,7 @@ static DWORD wodMapperReconfigure(WAVEMAPDATA* wom, DWORD dwParam1, DWORD dwP
DWORD
WINAPI
WAVEMAP_wodMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD_PTR
dwUser
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
TRACE
(
"(%u, %04X, %08
lX, %08lX, %08l
X);
\n
"
,
TRACE
(
"(%u, %04X, %08
IX, %08IX, %08I
X);
\n
"
,
wDevID
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
switch
(
wMsg
)
{
...
...
@@ -664,7 +664,7 @@ static void CALLBACK widCallback(HWAVEIN hWave, UINT uMsg, DWORD_PTR dwInstance,
{
WAVEMAPDATA
*
wim
=
(
WAVEMAPDATA
*
)
dwInstance
;
TRACE
(
"(%p %u %
lx %lx %l
x);
\n
"
,
hWave
,
uMsg
,
dwInstance
,
dwParam1
,
dwParam2
);
TRACE
(
"(%p %u %
Ix %Ix %I
x);
\n
"
,
hWave
,
uMsg
,
dwInstance
,
dwParam1
,
dwParam2
);
if
(
!
WAVEMAP_IsData
(
wim
))
{
ERR
(
"Bad data
\n
"
);
...
...
@@ -690,7 +690,7 @@ static void CALLBACK widCallback(HWAVEIN hWave, UINT uMsg, DWORD_PTR dwInstance,
ERR
(
"ACM conversion failed
\n
"
);
return
;
}
else
{
TRACE
(
"Converted %
d bytes into %
d
\n
"
,
ash
->
cbSrcLengthUsed
,
ash
->
cbDstLengthUsed
);
TRACE
(
"Converted %
ld bytes into %l
d
\n
"
,
ash
->
cbSrcLengthUsed
,
ash
->
cbDstLengthUsed
);
}
/* and setup the wavehdr to return accordingly */
lpWaveHdrDst
->
dwFlags
&=
~
WHDR_INQUEUE
;
...
...
@@ -713,7 +713,7 @@ static DWORD widOpenHelper(WAVEMAPDATA* wim, UINT idx,
{
DWORD
ret
;
TRACE
(
"(%p %04x %p %p %08x)
\n
"
,
wim
,
idx
,
lpDesc
,
lpwfx
,
dwFlags
);
TRACE
(
"(%p %04x %p %p %08
l
x)
\n
"
,
wim
,
idx
,
lpDesc
,
lpwfx
,
dwFlags
);
/* source is always PCM, so the formulas below apply */
lpwfx
->
nBlockAlign
=
(
lpwfx
->
nChannels
*
lpwfx
->
wBitsPerSample
)
/
8
;
...
...
@@ -732,7 +732,7 @@ static DWORD widOpenHelper(WAVEMAPDATA* wim, UINT idx,
wim
->
hAcmStream
=
0
;
}
}
TRACE
(
"ret = %08x
\n
"
,
ret
);
TRACE
(
"ret = %08
l
x
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -743,7 +743,7 @@ static DWORD widOpen(DWORD_PTR *lpdwUser, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
WAVEMAPDATA
*
wim
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WAVEMAPDATA
));
DWORD
res
;
TRACE
(
"(%p %p %08x)
\n
"
,
lpdwUser
,
lpDesc
,
dwFlags
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
lpdwUser
,
lpDesc
,
dwFlags
);
if
(
!
wim
)
{
WARN
(
"no memory
\n
"
);
...
...
@@ -859,7 +859,7 @@ error:
WARN
(
"ret = WAVERR_BADFORMAT
\n
"
);
return
WAVERR_BADFORMAT
;
}
WARN
(
"ret = 0x%08x
\n
"
,
res
);
WARN
(
"ret = 0x%08
l
x
\n
"
,
res
);
return
res
;
}
...
...
@@ -886,7 +886,7 @@ static DWORD widAddBuffer(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwPara
PACMSTREAMHEADER
ash
;
LPWAVEHDR
lpWaveHdrSrc
;
TRACE
(
"(%p %p %08x)
\n
"
,
wim
,
lpWaveHdrDst
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wim
,
lpWaveHdrDst
,
dwParam2
);
if
(
!
wim
->
hAcmStream
)
{
return
waveInAddBuffer
(
wim
->
u
.
in
.
hInnerWave
,
lpWaveHdrDst
,
dwParam2
);
...
...
@@ -906,7 +906,7 @@ static DWORD widPrepare(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwParam2
DWORD
dwRet
;
LPWAVEHDR
lpWaveHdrSrc
;
TRACE
(
"(%p %p %08x)
\n
"
,
wim
,
lpWaveHdrDst
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wim
,
lpWaveHdrDst
,
dwParam2
);
if
(
!
wim
->
hAcmStream
)
{
return
waveInPrepareHeader
(
wim
->
u
.
in
.
hInnerWave
,
lpWaveHdrDst
,
dwParam2
);
...
...
@@ -956,7 +956,7 @@ static DWORD widPrepare(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwParam2
TRACE
(
"=> (0)
\n
"
);
return
MMSYSERR_NOERROR
;
errCleanUp:
TRACE
(
"=> (%d)
\n
"
,
dwRet
);
TRACE
(
"=> (%
l
d)
\n
"
,
dwRet
);
HeapFree
(
GetProcessHeap
(),
0
,
ash
);
return
dwRet
;
}
...
...
@@ -967,7 +967,7 @@ static DWORD widUnprepare(WAVEMAPDATA* wim, LPWAVEHDR lpWaveHdrDst, DWORD dwPara
LPWAVEHDR
lpWaveHdrSrc
;
DWORD
dwRet1
,
dwRet2
;
TRACE
(
"(%p %p %08x)
\n
"
,
wim
,
lpWaveHdrDst
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wim
,
lpWaveHdrDst
,
dwParam2
);
if
(
!
wim
->
hAcmStream
)
{
return
waveInUnprepareHeader
(
wim
->
u
.
in
.
hInnerWave
,
lpWaveHdrDst
,
dwParam2
);
...
...
@@ -988,7 +988,7 @@ static DWORD widGetPosition(WAVEMAPDATA* wim, LPMMTIME lpTime, DWORD dwParam2)
{
DWORD
val
;
MMTIME
timepos
;
TRACE
(
"(%p %p %08x)
\n
"
,
wim
,
lpTime
,
dwParam2
);
TRACE
(
"(%p %p %08
l
x)
\n
"
,
wim
,
lpTime
,
dwParam2
);
timepos
=
*
lpTime
;
...
...
@@ -1048,7 +1048,7 @@ static DWORD widGetPosition(WAVEMAPDATA* wim, LPMMTIME lpTime, DWORD dwParam2)
static
DWORD
widGetDevCaps
(
UINT
wDevID
,
WAVEMAPDATA
*
wim
,
LPWAVEINCAPSW
lpWaveCaps
,
DWORD
dwParam2
)
{
TRACE
(
"(%04x, %p %p %08x)
\n
"
,
wDevID
,
wim
,
lpWaveCaps
,
dwParam2
);
TRACE
(
"(%04x, %p %p %08
l
x)
\n
"
,
wDevID
,
wim
,
lpWaveCaps
,
dwParam2
);
/* if opened low driver, forward message */
if
(
WAVEMAP_IsData
(
wim
))
...
...
@@ -1107,7 +1107,7 @@ static DWORD widMapperStatus(WAVEMAPDATA* wim, DWORD flags, LPVOID ptr)
UINT
id
;
DWORD
ret
=
MMSYSERR_NOTSUPPORTED
;
TRACE
(
"(%p %08x %p)
\n
"
,
wim
,
flags
,
ptr
);
TRACE
(
"(%p %08
l
x %p)
\n
"
,
wim
,
flags
,
ptr
);
switch
(
flags
)
{
case
WAVEIN_MAPPER_STATUS_DEVICE
:
...
...
@@ -1115,16 +1115,16 @@ static DWORD widMapperStatus(WAVEMAPDATA* wim, DWORD flags, LPVOID ptr)
*
(
LPDWORD
)
ptr
=
id
;
break
;
case
WAVEIN_MAPPER_STATUS_MAPPED
:
FIXME
(
"Unsupported yet flag=%d
\n
"
,
flags
);
FIXME
(
"Unsupported yet flag=%
l
d
\n
"
,
flags
);
*
(
LPDWORD
)
ptr
=
0
;
/* FIXME ?? */
break
;
case
WAVEIN_MAPPER_STATUS_FORMAT
:
FIXME
(
"Unsupported flag=%d
\n
"
,
flags
);
FIXME
(
"Unsupported flag=%
l
d
\n
"
,
flags
);
/* ptr points to a WAVEFORMATEX struct - before or after streaming ? */
*
(
LPDWORD
)
ptr
=
0
;
/* FIXME ?? */
break
;
default:
FIXME
(
"Unsupported flag=%d
\n
"
,
flags
);
FIXME
(
"Unsupported flag=%
l
d
\n
"
,
flags
);
*
(
LPDWORD
)
ptr
=
0
;
break
;
}
...
...
@@ -1133,7 +1133,7 @@ static DWORD widMapperStatus(WAVEMAPDATA* wim, DWORD flags, LPVOID ptr)
static
DWORD
widMapperReconfigure
(
WAVEMAPDATA
*
wim
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
FIXME
(
"(%p %08
x %08
x) stub!
\n
"
,
wim
,
dwParam1
,
dwParam2
);
FIXME
(
"(%p %08
lx %08l
x) stub!
\n
"
,
wim
,
dwParam1
,
dwParam2
);
return
MMSYSERR_NOERROR
;
}
...
...
@@ -1144,7 +1144,7 @@ static DWORD widMapperReconfigure(WAVEMAPDATA* wim, DWORD dwParam1, DWORD dwP
DWORD
WINAPI
WAVEMAP_widMessage
(
WORD
wDevID
,
WORD
wMsg
,
DWORD_PTR
dwUser
,
DWORD_PTR
dwParam1
,
DWORD_PTR
dwParam2
)
{
TRACE
(
"(%u, %04X, %08
lX, %08lX, %08l
X);
\n
"
,
TRACE
(
"(%u, %04X, %08
IX, %08IX, %08I
X);
\n
"
,
wDevID
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
switch
(
wMsg
)
{
...
...
@@ -1205,7 +1205,7 @@ static LRESULT WAVEMAP_drvOpen(LPSTR str)
*/
static
LRESULT
WAVEMAP_drvClose
(
DWORD_PTR
dwDevID
)
{
TRACE
(
"(%08
l
x)
\n
"
,
dwDevID
);
TRACE
(
"(%08
I
x)
\n
"
,
dwDevID
);
if
(
oss
)
{
oss
=
NULL
;
...
...
@@ -1220,7 +1220,7 @@ static LRESULT WAVEMAP_drvClose(DWORD_PTR dwDevID)
LRESULT
CALLBACK
WAVEMAP_DriverProc
(
DWORD_PTR
dwDevID
,
HDRVR
hDriv
,
UINT
wMsg
,
LPARAM
dwParam1
,
LPARAM
dwParam2
)
{
TRACE
(
"(%08
lX, %p, %08X, %08lX, %08l
X)
\n
"
,
TRACE
(
"(%08
IX, %p, %08X, %08IX, %08I
X)
\n
"
,
dwDevID
,
hDriv
,
wMsg
,
dwParam1
,
dwParam2
);
switch
(
wMsg
)
{
...
...
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