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
6f6e054f
Commit
6f6e054f
authored
Oct 06, 2006
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/winenas: Win64 printf format warning fixes.
parent
c8ef2390
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
Makefile.in
dlls/winmm/winenas/Makefile.in
+0
-1
audio.c
dlls/winmm/winenas/audio.c
+21
-21
No files found.
dlls/winmm/winenas/Makefile.in
View file @
6f6e054f
...
...
@@ -6,7 +6,6 @@ MODULE = winenas.drv
IMPORTS
=
winmm user32 kernel32
EXTRAINCL
=
@X_CFLAGS@
EXTRALIBS
=
-ldxguid
-luuid
@NASLIBS@
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
C_SRCS
=
\
audio.c
\
...
...
dlls/winmm/winenas/audio.c
View file @
6f6e054f
...
...
@@ -280,19 +280,19 @@ static const char* nas_state(unsigned int state)
static
DWORD
bytes_to_mmtime
(
LPMMTIME
lpTime
,
DWORD
position
,
PCMWAVEFORMAT
*
format
)
{
TRACE
(
"wType=%04X wBitsPerSample=%u nSamplesPerSec=%
lu nChannels=%u nAvgBytesPerSec=%l
u
\n
"
,
TRACE
(
"wType=%04X wBitsPerSample=%u nSamplesPerSec=%
u nChannels=%u nAvgBytesPerSec=%
u
\n
"
,
lpTime
->
wType
,
format
->
wBitsPerSample
,
format
->
wf
.
nSamplesPerSec
,
format
->
wf
.
nChannels
,
format
->
wf
.
nAvgBytesPerSec
);
TRACE
(
"Position in bytes=%
l
u
\n
"
,
position
);
TRACE
(
"Position in bytes=%u
\n
"
,
position
);
switch
(
lpTime
->
wType
)
{
case
TIME_SAMPLES
:
lpTime
->
u
.
sample
=
position
/
(
format
->
wBitsPerSample
/
8
*
format
->
wf
.
nChannels
);
TRACE
(
"TIME_SAMPLES=%
l
u
\n
"
,
lpTime
->
u
.
sample
);
TRACE
(
"TIME_SAMPLES=%u
\n
"
,
lpTime
->
u
.
sample
);
break
;
case
TIME_MS
:
lpTime
->
u
.
ms
=
1000
.
0
*
position
/
(
format
->
wBitsPerSample
/
8
*
format
->
wf
.
nChannels
*
format
->
wf
.
nSamplesPerSec
);
TRACE
(
"TIME_MS=%
l
u
\n
"
,
lpTime
->
u
.
ms
);
TRACE
(
"TIME_MS=%u
\n
"
,
lpTime
->
u
.
ms
);
break
;
case
TIME_SMPTE
:
lpTime
->
u
.
smpte
.
fps
=
30
;
...
...
@@ -316,7 +316,7 @@ static DWORD bytes_to_mmtime(LPMMTIME lpTime, DWORD position,
/* fall through */
case
TIME_BYTES
:
lpTime
->
u
.
cb
=
position
;
TRACE
(
"TIME_BYTES=%
l
u
\n
"
,
lpTime
->
u
.
cb
);
TRACE
(
"TIME_BYTES=%u
\n
"
,
lpTime
->
u
.
cb
);
break
;
}
return
MMSYSERR_NOERROR
;
...
...
@@ -580,7 +580,7 @@ static int NAS_RetrieveRingMessage(MSG_RING* mr,
*/
static
DWORD
wodNotifyClient
(
WINE_WAVEOUT
*
wwo
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE
(
"wMsg = 0x%04x dwParm1 = %04
lX dwParam2 = %04l
X
\n
"
,
wMsg
,
dwParam1
,
dwParam2
);
TRACE
(
"wMsg = 0x%04x dwParm1 = %04
X dwParam2 = %04
X
\n
"
,
wMsg
,
dwParam1
,
dwParam2
);
switch
(
wMsg
)
{
case
WOM_OPEN
:
...
...
@@ -628,7 +628,7 @@ static void wodPlayer_BeginWaveHdr(WINE_WAVEOUT* wwo, LPWAVEHDR lpWaveHdr)
WARN
(
"Already in a loop. Discarding loop on this header (%p)
\n
"
,
lpWaveHdr
);
TRACE
(
"Already in a loop. Discarding loop on this header (%p)
\n
"
,
lpWaveHdr
);
}
else
{
TRACE
(
"Starting loop (%l
dx) with %p
\n
"
,
lpWaveHdr
->
dwLoops
,
lpWaveHdr
);
TRACE
(
"Starting loop (%
dx) with %p
\n
"
,
lpWaveHdr
->
dwLoops
,
lpWaveHdr
);
wwo
->
lpLoopPtr
=
lpWaveHdr
;
/* Windows does not touch WAVEHDR.dwLoops,
* so we need to make an internal copy */
...
...
@@ -777,7 +777,7 @@ static void wodPlayer_ProcessMessages(WINE_WAVEOUT* wwo)
HANDLE
ev
;
while
(
NAS_RetrieveRingMessage
(
&
wwo
->
msgRing
,
&
msg
,
&
param
,
&
ev
))
{
TRACE
(
"Received %s %
l
x
\n
"
,
wodPlayerCmdString
[
msg
-
WM_USER
-
1
],
param
);
TRACE
(
"Received %s %x
\n
"
,
wodPlayerCmdString
[
msg
-
WM_USER
-
1
],
param
);
switch
(
msg
)
{
case
WINE_WM_PAUSING
:
wodPlayer_Reset
(
wwo
,
FALSE
);
...
...
@@ -871,7 +871,7 @@ static DWORD CALLBACK wodPlayer(LPVOID pmt)
*/
static
DWORD
wodGetDevCaps
(
WORD
wDevID
,
LPWAVEOUTCAPSW
lpCaps
,
DWORD
dwSize
)
{
TRACE
(
"(%u, %p, %
l
u);
\n
"
,
wDevID
,
lpCaps
,
dwSize
);
TRACE
(
"(%u, %p, %u);
\n
"
,
wDevID
,
lpCaps
,
dwSize
);
if
(
lpCaps
==
NULL
)
return
MMSYSERR_NOTENABLED
;
...
...
@@ -891,7 +891,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
{
WINE_WAVEOUT
*
wwo
;
TRACE
(
"wodOpen (%u, %p, %08
l
X);
\n
"
,
wDevID
,
lpDesc
,
dwFlags
);
TRACE
(
"wodOpen (%u, %p, %08X);
\n
"
,
wDevID
,
lpDesc
,
dwFlags
);
if
(
lpDesc
==
NULL
)
{
WARN
(
"Invalid Parameter !
\n
"
);
...
...
@@ -918,14 +918,14 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
lpDesc
->
lpFormat
->
nChannels
==
0
||
lpDesc
->
lpFormat
->
nSamplesPerSec
==
0
||
(
lpDesc
->
lpFormat
->
wBitsPerSample
!=
8
&&
lpDesc
->
lpFormat
->
wBitsPerSample
!=
16
))
{
WARN
(
"Bad format: tag=%04X nChannels=%d nSamplesPerSec=%
l
d !
\n
"
,
WARN
(
"Bad format: tag=%04X nChannels=%d nSamplesPerSec=%d !
\n
"
,
lpDesc
->
lpFormat
->
wFormatTag
,
lpDesc
->
lpFormat
->
nChannels
,
lpDesc
->
lpFormat
->
nSamplesPerSec
);
return
WAVERR_BADFORMAT
;
}
if
(
dwFlags
&
WAVE_FORMAT_QUERY
)
{
TRACE
(
"Query format: tag=%04X nChannels=%d nSamplesPerSec=%
l
d !
\n
"
,
TRACE
(
"Query format: tag=%04X nChannels=%d nSamplesPerSec=%d !
\n
"
,
lpDesc
->
lpFormat
->
wFormatTag
,
lpDesc
->
lpFormat
->
nChannels
,
lpDesc
->
lpFormat
->
nSamplesPerSec
);
return
MMSYSERR_NOERROR
;
...
...
@@ -966,9 +966,9 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
}
wwo
->
hStartUpEvent
=
INVALID_HANDLE_VALUE
;
TRACE
(
"stream=0x%lx, BufferSize=%
l
d
\n
"
,
(
long
)
wwo
->
AuServ
,
wwo
->
BufferSize
);
TRACE
(
"stream=0x%lx, BufferSize=%d
\n
"
,
(
long
)
wwo
->
AuServ
,
wwo
->
BufferSize
);
TRACE
(
"wBitsPerSample=%u nAvgBytesPerSec=%
lu nSamplesPerSec=%l
u nChannels=%u nBlockAlign=%u
\n
"
,
TRACE
(
"wBitsPerSample=%u nAvgBytesPerSec=%
u nSamplesPerSec=%
u nChannels=%u nBlockAlign=%u
\n
"
,
wwo
->
format
.
wBitsPerSample
,
wwo
->
format
.
wf
.
nAvgBytesPerSec
,
wwo
->
format
.
wf
.
nSamplesPerSec
,
wwo
->
format
.
wf
.
nChannels
,
wwo
->
format
.
wf
.
nBlockAlign
);
...
...
@@ -1017,7 +1017,7 @@ static DWORD wodClose(WORD wDevID)
*/
static
DWORD
wodWrite
(
WORD
wDevID
,
LPWAVEHDR
lpWaveHdr
,
DWORD
dwSize
)
{
TRACE
(
"(%u, %p, %08
l
X);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
TRACE
(
"(%u, %p, %08X);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
/* first, do the sanity checks... */
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
AuServ
==
NULL
)
...
...
@@ -1119,7 +1119,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
{
WINE_WAVEOUT
*
wwo
;
TRACE
(
"%u, %p, %
l
u);
\n
"
,
wDevID
,
lpTime
,
uSize
);
TRACE
(
"%u, %p, %u);
\n
"
,
wDevID
,
lpTime
,
uSize
);
if
(
wDevID
>=
MAX_WAVEOUTDRV
||
AuServ
==
NULL
)
{
...
...
@@ -1180,7 +1180,7 @@ static DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
left
=
(
LOWORD
(
dwParam
)
*
100
)
/
0xFFFFl
;
right
=
(
HIWORD
(
dwParam
)
*
100
)
/
0xFFFFl
;
TRACE
(
"(%u, %08
l
X);
\n
"
,
wDevID
,
dwParam
);
TRACE
(
"(%u, %08X);
\n
"
,
wDevID
,
dwParam
);
WOutDev
[
wDevID
].
volume_left
=
left
;
WOutDev
[
wDevID
].
volume_right
=
right
;
...
...
@@ -1202,7 +1202,7 @@ static DWORD wodGetNumDevs(void)
DWORD
WINAPI
NAS_wodMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE
(
"(%u, %04X, %08
lX, %08lX, %08l
X);
\n
"
,
wDevID
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
TRACE
(
"(%u, %04X, %08
X, %08X, %08
X);
\n
"
,
wDevID
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
switch
(
wMsg
)
{
case
DRVM_INIT
:
...
...
@@ -1349,7 +1349,7 @@ event_handler(AuServer* aud, AuEvent* ev, AuEventHandlerRec* hnd)
break
;
case
AuElementNotifyKindState
:
TRACE
(
"ev: kind %s state %s->%s reason %s numbytes %ld freeB %
l
u
\n
"
,
TRACE
(
"ev: kind %s state %s->%s reason %s numbytes %ld freeB %u
\n
"
,
nas_elementnotify_kind
(
event
->
kind
),
nas_state
(
event
->
prev_state
),
nas_state
(
event
->
cur_state
),
...
...
@@ -1417,7 +1417,7 @@ static int nas_send_buffer(WINE_WAVEOUT* wwo) {
memcpy
(
newdata
,
wwo
->
SoundBuffer
+
len
,
wwo
->
BufferUsed
-
len
);
}
TRACE
(
"envoye de %d bytes / %lu bytes / freeBytes %
l
u
\n
"
,
len
,
wwo
->
BufferUsed
,
wwo
->
freeBytes
);
TRACE
(
"envoye de %d bytes / %lu bytes / freeBytes %u
\n
"
,
len
,
wwo
->
BufferUsed
,
wwo
->
freeBytes
);
AuWriteElement
(
wwo
->
AuServ
,
wwo
->
AuFlow
,
0
,
len
,
ptr
,
AuFalse
,
NULL
);
...
...
@@ -1490,7 +1490,7 @@ static int nas_end(void)
*/
DWORD
WINAPI
NAS_wodMessage
(
WORD
wDevID
,
WORD
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
FIXME
(
"(%u, %04X, %08
lX, %08lX, %08l
X):stub
\n
"
,
wDevID
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
FIXME
(
"(%u, %04X, %08
X, %08X, %08
X):stub
\n
"
,
wDevID
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
return
MMSYSERR_NOTENABLED
;
}
#endif
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