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
ec7d7b72
Commit
ec7d7b72
authored
Aug 09, 2002
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Convert HDRVR to a void*.
- Fix declaration of DriverCallback().
parent
6a775981
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
65 additions
and
55 deletions
+65
-55
driver.c
dlls/msacm/driver.c
+1
-1
msvideo_main.c
dlls/msvideo/msvideo_main.c
+5
-2
driver.c
dlls/winmm/driver.c
+1
-2
joystick.c
dlls/winmm/joystick.c
+2
-1
lolvldrv.c
dlls/winmm/lolvldrv.c
+1
-1
mmsystem.c
dlls/winmm/mmsystem.c
+15
-11
wavemap.c
dlls/winmm/wavemap/wavemap.c
+4
-4
winemm.h
dlls/winmm/winemm.h
+2
-0
audio.c
dlls/winmm/wineoss/audio.c
+32
-30
mmddk.h
include/mmddk.h
+1
-2
mmsystem.h
include/mmsystem.h
+1
-1
No files found.
dlls/msacm/driver.c
View file @
ec7d7b72
...
...
@@ -271,7 +271,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
pad
->
obj
.
dwType
=
WINE_ACMOBJ_DRIVER
;
pad
->
obj
.
pACMDriverID
=
padid
;
if
(
!
(
pad
->
hDrvr
=
padid
->
hInstModule
))
if
(
!
(
pad
->
hDrvr
=
(
HDRVR
)
padid
->
hInstModule
))
{
ACMDRVOPENDESCW
adod
;
int
len
;
...
...
dlls/msvideo/msvideo_main.c
View file @
ec7d7b72
...
...
@@ -46,6 +46,9 @@ LPVOID MSVIDEO_MapMsg16To32(UINT msg, LPDWORD lParam1, LPDWORD lParam2);
void
MSVIDEO_UnmapMsg16To32
(
UINT
msg
,
LPVOID
lpv
,
LPDWORD
lParam1
,
LPDWORD
lParam2
);
LRESULT
MSVIDEO_SendMessage
(
HIC
hic
,
UINT
msg
,
DWORD
lParam1
,
DWORD
lParam2
,
BOOL
bFrom32
);
#define HDRVR_16(h32) (LOWORD(h32))
/***********************************************************************
* VideoForWindowsVersion [MSVFW32.2]
* VideoForWindowsVersion [MSVIDEO.2]
...
...
@@ -268,7 +271,7 @@ HIC MSVIDEO_OpenFunc(DWORD fccType, DWORD fccHandler, UINT wMode, FARPROC lpfnHa
MSVIDEO_SendMessage
(
hic
,
DRV_ENABLE
,
0L
,
0L
,
bFrom32
);
seg_icopen
=
MapLS
(
&
icopen
);
whic
->
hdrv
=
MSVIDEO_SendMessage
(
hic
,
DRV_OPEN
,
0
,
seg_icopen
,
FALSE
);
whic
->
hdrv
=
(
HDRVR
)
MSVIDEO_SendMessage
(
hic
,
DRV_OPEN
,
0
,
seg_icopen
,
FALSE
);
UnMapLS
(
seg_icopen
);
if
(
whic
->
hdrv
==
0
)
{
WARN
(
"DRV_OPEN failed for hic 0x%08lx
\n
"
,(
DWORD
)
hic
);
...
...
@@ -976,7 +979,7 @@ LRESULT MSVIDEO_SendMessage(HIC hic,UINT msg,DWORD lParam1,DWORD lParam2, BOOL b
if
(
bDrv32
)
{
ret
=
whic
->
driverproc
(
whic
->
hdrv
,
hic
,
msg
,
lParam1
,
lParam2
);
}
else
{
ret
=
MSVIDEO_CallTo16_long_lwwll
((
FARPROC16
)
whic
->
driverproc
,
whic
->
hdrv
,
hic
,
msg
,
lParam1
,
lParam2
);
ret
=
MSVIDEO_CallTo16_long_lwwll
((
FARPROC16
)
whic
->
driverproc
,
HDRVR_16
(
whic
->
hdrv
)
,
hic
,
msg
,
lParam1
,
lParam2
);
}
}
else
{
ret
=
SendDriverMessage
(
whic
->
hdrv
,
msg
,
lParam1
,
lParam2
);
...
...
dlls/winmm/driver.c
View file @
ec7d7b72
...
...
@@ -458,7 +458,7 @@ HDRVR WINAPI OpenDriverA(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lPara
TRACE
(
"Failed to open driver %s from system.ini file, section %s
\n
"
,
debugstr_a
(
lpDriverName
),
debugstr_a
(
lpSectionName
));
the_end:
if
(
lpDrv
)
TRACE
(
"=> %08lx
\n
"
,
(
DWORD
)
lpDrv
);
return
(
DWORD
)
lpDrv
;
return
(
HDRVR
)
lpDrv
;
}
/**************************************************************************
...
...
@@ -638,4 +638,3 @@ LRESULT WINAPI DriverProc16(DWORD dwDevID, HDRVR16 hDrv, WORD wMsg,
return
DrvDefDriverProc16
(
dwDevID
,
hDrv
,
wMsg
,
dwParam1
,
dwParam2
);
}
dlls/winmm/joystick.c
View file @
ec7d7b72
...
...
@@ -70,7 +70,8 @@ static BOOL JOY_LoadDriver(DWORD dwJoyID)
if
(
JOY_Sticks
[
dwJoyID
].
hDriver
)
return
TRUE
;
return
JOY_Sticks
[
dwJoyID
].
hDriver
=
OpenDriverA
(
"joystick.drv"
,
0
,
dwJoyID
);
JOY_Sticks
[
dwJoyID
].
hDriver
=
OpenDriverA
(
"joystick.drv"
,
0
,
dwJoyID
);
return
(
JOY_Sticks
[
dwJoyID
].
hDriver
!=
0
);
}
/**************************************************************************
...
...
dlls/winmm/lolvldrv.c
View file @
ec7d7b72
...
...
@@ -198,7 +198,7 @@ static void MMDRV_Callback(LPWINE_MLD mld, HDRVR hDev, UINT uMsg, DWORD dwParam1
if
(
!
mld
->
bFrom32
&&
(
mld
->
dwFlags
&
DCB_TYPEMASK
)
==
DCB_FUNCTION
)
{
/* 16 bit func, call it */
TRACE
(
"Function (16 bit) !
\n
"
);
MMDRV_CallTo16_word_wwlll
((
FARPROC16
)
mld
->
dwCallback
,
hDev
,
uMsg
,
MMDRV_CallTo16_word_wwlll
((
FARPROC16
)
mld
->
dwCallback
,
HDRVR_16
(
hDev
)
,
uMsg
,
mld
->
dwClientInstance
,
dwParam1
,
dwParam2
);
}
else
{
DriverCallback
(
mld
->
dwCallback
,
mld
->
dwFlags
,
hDev
,
uMsg
,
...
...
dlls/winmm/mmsystem.c
View file @
ec7d7b72
...
...
@@ -755,11 +755,11 @@ BOOL WINAPI DriverCallback(DWORD dwCallBack, UINT uFlags, HDRVR hDev,
break
;
case
DCB_WINDOW
:
TRACE
(
"Window(%04lX) handle=%04X!
\n
"
,
dwCallBack
,
hDev
);
PostMessageA
((
HWND
)
dwCallBack
,
wMsg
,
hDev
,
dwParam1
);
PostMessageA
((
HWND
)
dwCallBack
,
wMsg
,
(
WPARAM
)
hDev
,
dwParam1
);
break
;
case
DCB_TASK
:
/* aka DCB_THREAD */
TRACE
(
"Task(%04lx) !
\n
"
,
dwCallBack
);
PostThreadMessageA
(
dwCallBack
,
wMsg
,
hDev
,
dwParam1
);
PostThreadMessageA
(
dwCallBack
,
wMsg
,
(
WPARAM
)
hDev
,
dwParam1
);
break
;
case
DCB_FUNCTION
:
TRACE
(
"Function (32 bit) !
\n
"
);
...
...
@@ -804,7 +804,7 @@ BOOL16 WINAPI DriverCallback16(DWORD dwCallBack, UINT16 uFlags, HDRVR16 hDev,
WORD
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
return
DriverCallback
(
dwCallBack
,
uFlags
,
hDev
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
return
DriverCallback
(
dwCallBack
,
uFlags
,
HDRVR_32
(
hDev
)
,
wMsg
,
dwUser
,
dwParam1
,
dwParam2
);
}
/**************************************************************************
...
...
@@ -3158,8 +3158,9 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
(
HDRVR
)
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
}
lpMidiStrm
->
lpMidiHdr
=
0
;
SetEvent
(
lpMidiStrm
->
hEvent
);
...
...
@@ -3231,8 +3232,9 @@ static BOOL MMSYSTEM_MidiStream_MessageHandler(WINE_MIDIStream* lpMidiStrm, LPWI
lpMidiHdr
->
dwFlags
|=
MHDR_DONE
;
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
(
HDRVR
)
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
break
;
}
...
...
@@ -3352,8 +3354,9 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
break
;
}
if
(
me
->
dwEvent
&
MEVT_F_CALLBACK
)
{
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
lpMidiStrm
->
hDevice
,
MM_MOM_POSITIONCB
,
lpwm
->
mod
.
dwInstance
,
(
LPARAM
)
lpMidiHdr
,
0L
);
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
(
HDRVR
)
lpMidiStrm
->
hDevice
,
MM_MOM_POSITIONCB
,
lpwm
->
mod
.
dwInstance
,
(
LPARAM
)
lpMidiHdr
,
0L
);
}
lpMidiHdr
->
dwOffset
+=
sizeof
(
MIDIEVENT
)
-
sizeof
(
me
->
dwParms
);
if
(
me
->
dwEvent
&
MEVT_F_LONG
)
...
...
@@ -3364,8 +3367,9 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
lpMidiHdr
->
dwFlags
&=
~
MHDR_INQUEUE
;
lpMidiStrm
->
lpMidiHdr
=
(
LPMIDIHDR
)
lpMidiHdr
->
lpNext
;
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
DriverCallback
(
lpwm
->
mod
.
dwCallback
,
lpMidiStrm
->
wFlags
,
(
HDRVR
)
lpMidiStrm
->
hDevice
,
MM_MOM_DONE
,
lpwm
->
mod
.
dwInstance
,
(
DWORD
)
lpMidiHdr
,
0L
);
lpData
=
0
;
}
}
...
...
dlls/winmm/wavemap/wavemap.c
View file @
ec7d7b72
...
...
@@ -94,8 +94,8 @@ static void CALLBACK wodCallback(HWAVE hWave, UINT uMsg, DWORD dwInstance,
ERR
(
"Unknown msg %u
\n
"
,
uMsg
);
}
DriverCallback
(
wom
->
dwCallback
,
HIWORD
(
wom
->
dwFlags
),
wom
->
hOuterWave
,
uMsg
,
wom
->
dwClientInstance
,
dwParam1
,
dwParam2
);
DriverCallback
(
wom
->
dwCallback
,
HIWORD
(
wom
->
dwFlags
),
(
HDRVR
)
wom
->
hOuterWave
,
uMsg
,
wom
->
dwClientInstance
,
dwParam1
,
dwParam2
);
}
static
DWORD
wodOpenHelper
(
WAVEMAPDATA
*
wom
,
UINT
idx
,
...
...
@@ -502,8 +502,8 @@ static void CALLBACK widCallback(HWAVE hWave, UINT uMsg, DWORD dwInstance,
ERR
(
"Unknown msg %u
\n
"
,
uMsg
);
}
DriverCallback
(
wim
->
dwCallback
,
HIWORD
(
wim
->
dwFlags
),
wim
->
hOuterWave
,
uMsg
,
wim
->
dwClientInstance
,
dwParam1
,
dwParam2
);
DriverCallback
(
wim
->
dwCallback
,
HIWORD
(
wim
->
dwFlags
),
(
HDRVR
)
wim
->
hOuterWave
,
uMsg
,
wim
->
dwClientInstance
,
dwParam1
,
dwParam2
);
}
static
DWORD
widOpenHelper
(
WAVEMAPDATA
*
wim
,
UINT
idx
,
...
...
dlls/winmm/winemm.h
View file @
ec7d7b72
...
...
@@ -228,6 +228,7 @@ LPWINE_MM_IDATA TIME_MMTimeStart(void);
void
TIME_MMTimeStop
(
void
);
/* HANDLE16 -> HANDLE conversions */
#define HDRVR_32(h16) ((HDRVR)(ULONG_PTR)(h16))
#define HMIDI_32(h16) ((HMIDI)(ULONG_PTR)(h16))
#define HMIDIIN_32(h16) ((HMIDIIN)(ULONG_PTR)(h16))
#define HMIDIOUT_32(h16) ((HMIDIOUT)(ULONG_PTR)(h16))
...
...
@@ -239,6 +240,7 @@ void TIME_MMTimeStop(void);
#define HWAVEOUT_32(h16) ((HWAVEOUT)(ULONG_PTR)(h16))
/* HANDLE -> HANDLE16 conversions */
#define HDRVR_16(h32) (LOWORD(h32))
#define HMIDI_16(h32) (LOWORD(h32))
#define HMIDIIN_16(h32) (LOWORD(h32))
#define HMIDIOUT_16(h32) (LOWORD(h32))
...
...
dlls/winmm/wineoss/audio.c
View file @
ec7d7b72
...
...
@@ -217,7 +217,7 @@ static DWORD OSS_OpenDevice(unsigned wDevID, int* pfd, unsigned req_access,
int
val
;
int
fd
=
-
1
;
if
(
wDevID
>=
MAX_WAVEDRV
)
return
MMSYSERR_BADDEVICEID
;
;
if
(
wDevID
>=
MAX_WAVEDRV
)
return
MMSYSERR_BADDEVICEID
;
ossdev
=
&
OSS_Devices
[
wDevID
];
if
(
ossdev
->
full_duplex
&&
(
req_access
==
O_RDONLY
||
req_access
==
O_WRONLY
))
...
...
@@ -292,7 +292,7 @@ static DWORD OSS_OpenDevice(unsigned wDevID, int* pfd, unsigned req_access,
WARN
(
"FullDuplex: mismatch in PCM parameters for input and output
\n
"
"OSS doesn't allow us different parameters
\n
"
"audio_frag(%x/%x) sample_rate(%d/%d) stereo(%d/%d) fmt(%d/%d)
\n
"
,
ossdev
->
audio_fragment
,
frag
?
*
frag
:
0
,
ossdev
->
audio_fragment
,
frag
?
*
frag
:
0
,
ossdev
->
sample_rate
,
sample_rate
,
ossdev
->
stereo
,
stereo
,
ossdev
->
format
,
fmt
);
...
...
@@ -373,16 +373,16 @@ static void OSS_WaveOutInit(unsigned devID, OSS_DEVICE* ossdev)
ossdev
->
out_caps
.
vDriverVersion
=
0x0100
;
ossdev
->
out_caps
.
dwFormats
=
0x00000000
;
ossdev
->
out_caps
.
dwSupport
=
WAVECAPS_VOLUME
;
ioctl
(
audio
,
SNDCTL_DSP_GETFMTS
,
&
mask
);
TRACE
(
"OSS dsp out mask=%08x
\n
"
,
mask
);
/* First bytespersampl, then stereo */
bytespersmpl
=
(
ioctl
(
audio
,
SNDCTL_DSP_SAMPLESIZE
,
&
samplesize
)
!=
0
)
?
1
:
2
;
ossdev
->
out_caps
.
wChannels
=
(
ioctl
(
audio
,
SNDCTL_DSP_STEREO
,
&
dsp_stereo
)
!=
0
)
?
1
:
2
;
if
(
ossdev
->
out_caps
.
wChannels
>
1
)
ossdev
->
out_caps
.
dwSupport
|=
WAVECAPS_LRVOLUME
;
smplrate
=
44100
;
if
(
ioctl
(
audio
,
SNDCTL_DSP_SPEED
,
&
smplrate
)
==
0
)
{
if
(
mask
&
AFMT_U8
)
{
...
...
@@ -455,9 +455,9 @@ static void OSS_WaveInInit(unsigned devID, OSS_DEVICE* ossdev)
samplesize
=
16
;
dsp_stereo
=
1
;
WInDev
[
devID
].
unixdev
=
-
1
;
memset
(
&
ossdev
->
in_caps
,
0
,
sizeof
(
ossdev
->
in_caps
));
if
(
OSS_OpenDevice
(
0
,
&
audio
,
O_RDONLY
,
NULL
,
0
,
0
,
0
)
!=
0
)
return
;
...
...
@@ -476,7 +476,7 @@ static void OSS_WaveInInit(unsigned devID, OSS_DEVICE* ossdev)
#endif
ossdev
->
in_caps
.
dwFormats
=
0x00000000
;
ossdev
->
in_caps
.
wChannels
=
(
ioctl
(
audio
,
SNDCTL_DSP_STEREO
,
&
dsp_stereo
)
!=
0
)
?
1
:
2
;
WInDev
[
devID
].
bTriggerSupport
=
FALSE
;
if
(
ioctl
(
audio
,
SNDCTL_DSP_GETCAPS
,
&
caps
)
==
0
)
{
TRACE
(
"OSS dsp in caps=%08X
\n
"
,
caps
);
...
...
@@ -543,7 +543,7 @@ static void OSS_WaveFullDuplexInit(unsigned devID, OSS_DEVICE* ossdev)
int
caps
;
if
(
OSS_OpenDevice
(
devID
,
&
audio
,
O_RDWR
,
NULL
,
0
,
0
,
0
)
!=
0
)
return
;
if
(
ioctl
(
audio
,
SNDCTL_DSP_GETCAPS
,
&
caps
)
==
0
)
if
(
ioctl
(
audio
,
SNDCTL_DSP_GETCAPS
,
&
caps
)
==
0
)
{
ossdev
->
full_duplex
=
(
caps
&
DSP_CAP_DUPLEX
);
}
...
...
@@ -564,7 +564,7 @@ LONG OSS_WaveInit(void)
memset
(
&
OSS_Devices
,
0
,
sizeof
(
OSS_Devices
));
OSS_Devices
[
0
].
dev_name
=
"/dev/dsp"
;
OSS_Devices
[
0
].
mixer_name
=
"/dev/mixer"
;
/* start with output device */
for
(
i
=
0
;
i
<
MAX_WAVEDRV
;
++
i
)
OSS_WaveOutInit
(
i
,
&
OSS_Devices
[
i
]);
...
...
@@ -702,8 +702,9 @@ static DWORD wodNotifyClient(WINE_WAVEOUT* wwo, WORD wMsg, DWORD dwParam1, DWORD
case
WOM_CLOSE
:
case
WOM_DONE
:
if
(
wwo
->
wFlags
!=
DCB_NULL
&&
!
DriverCallback
(
wwo
->
waveDesc
.
dwCallback
,
wwo
->
wFlags
,
wwo
->
waveDesc
.
hWave
,
wMsg
,
wwo
->
waveDesc
.
dwInstance
,
dwParam1
,
dwParam2
))
{
!
DriverCallback
(
wwo
->
waveDesc
.
dwCallback
,
wwo
->
wFlags
,
(
HDRVR
)
wwo
->
waveDesc
.
hWave
,
wMsg
,
wwo
->
waveDesc
.
dwInstance
,
dwParam1
,
dwParam2
))
{
WARN
(
"can't notify client !
\n
"
);
return
MMSYSERR_ERROR
;
}
...
...
@@ -1130,7 +1131,7 @@ static DWORD wodGetDevCaps(WORD wDevID, LPWAVEOUTCAPSA lpCaps, DWORD dwSize)
TRACE
(
"(%u, %p, %lu);
\n
"
,
wDevID
,
lpCaps
,
dwSize
);
if
(
lpCaps
==
NULL
)
return
MMSYSERR_NOTENABLED
;
if
(
wDevID
>=
MAX_WAVEDRV
)
{
TRACE
(
"MAX_WAVDRV reached !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1206,7 +1207,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
(
dwFlags
&
WAVE_DIRECTSOUND
)
?
O_RDWR
:
O_WRONLY
,
&
audio_fragment
,
lpDesc
->
lpFormat
->
nSamplesPerSec
,
(
lpDesc
->
lpFormat
->
nChannels
>
1
)
?
1
:
0
,
(
lpDesc
->
lpFormat
->
wBitsPerSample
==
16
)
(
lpDesc
->
lpFormat
->
wBitsPerSample
==
16
)
?
AFMT_S16_LE
:
AFMT_U8
);
if
(
ret
!=
0
)
return
ret
;
...
...
@@ -1279,7 +1280,7 @@ static DWORD wodClose(WORD wDevID)
WINE_WAVEOUT
*
wwo
;
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1349,7 +1350,7 @@ static DWORD wodWrite(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
static
DWORD
wodPrepare
(
WORD
wDevID
,
LPWAVEHDR
lpWaveHdr
,
DWORD
dwSize
)
{
TRACE
(
"(%u, %p, %08lX);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
if
(
wDevID
>=
MAX_WAVEDRV
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1369,7 +1370,7 @@ static DWORD wodPrepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
static
DWORD
wodUnprepare
(
WORD
wDevID
,
LPWAVEHDR
lpWaveHdr
,
DWORD
dwSize
)
{
TRACE
(
"(%u, %p, %08lX);
\n
"
,
wDevID
,
lpWaveHdr
,
dwSize
);
if
(
wDevID
>=
MAX_WAVEDRV
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1390,7 +1391,7 @@ static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
static
DWORD
wodPause
(
WORD
wDevID
)
{
TRACE
(
"(%u);!
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1407,7 +1408,7 @@ static DWORD wodPause(WORD wDevID)
static
DWORD
wodRestart
(
WORD
wDevID
)
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1429,7 +1430,7 @@ static DWORD wodRestart(WORD wDevID)
static
DWORD
wodReset
(
WORD
wDevID
)
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1450,7 +1451,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
WINE_WAVEOUT
*
wwo
;
TRACE
(
"(%u, %p, %lu);
\n
"
,
wDevID
,
lpTime
,
uSize
);
if
(
wDevID
>=
MAX_WAVEDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1508,7 +1509,7 @@ static DWORD wodGetPosition(WORD wDevID, LPMMTIME lpTime, DWORD uSize)
static
DWORD
wodBreakLoop
(
WORD
wDevID
)
{
TRACE
(
"(%u);
\n
"
,
wDevID
);
if
(
wDevID
>=
MAX_WAVEDRV
||
WOutDev
[
wDevID
].
unixdev
==
-
1
)
{
WARN
(
"bad device ID !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -1562,7 +1563,7 @@ static DWORD wodSetVolume(WORD wDevID, DWORD dwParam)
left
=
(
LOWORD
(
dwParam
)
*
100
)
/
0xFFFFl
;
right
=
(
HIWORD
(
dwParam
)
*
100
)
/
0xFFFFl
;
volume
=
left
+
(
right
<<
8
);
if
(
wDevID
>=
MAX_WAVEDRV
)
return
MMSYSERR_INVALPARAM
;
if
((
mixer
=
open
(
OSS_Devices
[
wDevID
].
mixer_name
,
O_WRONLY
|
O_NDELAY
))
<
0
)
{
...
...
@@ -2079,8 +2080,9 @@ static DWORD widNotifyClient(WINE_WAVEIN* wwi, WORD wMsg, DWORD dwParam1, DWORD
case
WIM_CLOSE
:
case
WIM_DATA
:
if
(
wwi
->
wFlags
!=
DCB_NULL
&&
!
DriverCallback
(
wwi
->
waveDesc
.
dwCallback
,
wwi
->
wFlags
,
wwi
->
waveDesc
.
hWave
,
wMsg
,
wwi
->
waveDesc
.
dwInstance
,
dwParam1
,
dwParam2
))
{
!
DriverCallback
(
wwi
->
waveDesc
.
dwCallback
,
wwi
->
wFlags
,
(
HDRVR
)
wwi
->
waveDesc
.
hWave
,
wMsg
,
wwi
->
waveDesc
.
dwInstance
,
dwParam1
,
dwParam2
))
{
WARN
(
"can't notify client !
\n
"
);
return
MMSYSERR_ERROR
;
}
...
...
@@ -2100,7 +2102,7 @@ static DWORD widGetDevCaps(WORD wDevID, LPWAVEINCAPSA lpCaps, DWORD dwSize)
TRACE
(
"(%u, %p, %lu);
\n
"
,
wDevID
,
lpCaps
,
dwSize
);
if
(
lpCaps
==
NULL
)
return
MMSYSERR_NOTENABLED
;
if
(
wDevID
>=
MAX_WAVEDRV
)
{
TRACE
(
"MAX_WAVDRV reached !
\n
"
);
return
MMSYSERR_BADDEVICEID
;
...
...
@@ -2364,11 +2366,11 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
*/
/* 15 fragments max, 2^10 = 1024 bytes per fragment */
audio_fragment
=
0x000F000A
;
ret
=
OSS_OpenDevice
(
wDevID
,
&
wwi
->
unixdev
,
O_RDONLY
,
&
audio_fragment
,
ret
=
OSS_OpenDevice
(
wDevID
,
&
wwi
->
unixdev
,
O_RDONLY
,
&
audio_fragment
,
lpDesc
->
lpFormat
->
nSamplesPerSec
,
(
lpDesc
->
lpFormat
->
nChannels
>
1
)
?
1
:
0
,
(
lpDesc
->
lpFormat
->
wBitsPerSample
==
16
)
(
lpDesc
->
lpFormat
->
nChannels
>
1
)
?
1
:
0
,
(
lpDesc
->
lpFormat
->
wBitsPerSample
==
16
)
?
AFMT_S16_LE
:
AFMT_U8
);
if
(
ret
!=
0
)
return
ret
;
if
(
wwi
->
lpQueuePtr
)
{
...
...
include/mmddk.h
View file @
ec7d7b72
...
...
@@ -515,10 +515,9 @@ BOOL16 WINAPI mmThreadIsCurrent16(HANDLE16 hndl);
BOOL16
WINAPI
DriverCallback16
(
DWORD
dwCallBack
,
UINT16
uFlags
,
HANDLE16
hDev
,
WORD
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
);
BOOL
WINAPI
DriverCallback
(
DWORD
dwCallBack
,
UINT
uFlags
,
H
ANDLE
hDev
,
BOOL
WINAPI
DriverCallback
(
DWORD
dwCallBack
,
UINT
uFlags
,
H
DRVR
hDev
,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
);
#include "poppack.h"
#endif
/* __MMDDK_H */
include/mmsystem.h
View file @
ec7d7b72
...
...
@@ -30,7 +30,7 @@ extern "C" {
typedef
LPSTR
HPSTR
;
/* a huge version of LPSTR */
typedef
LPCSTR
HPCSTR
;
/* a huge version of LPCSTR */
DECLARE_
OLD_
HANDLE
(
HDRVR
);
DECLARE_HANDLE
(
HDRVR
);
DECLARE_HANDLE
(
HWAVE
);
DECLARE_HANDLE
(
HWAVEIN
);
DECLARE_HANDLE
(
HWAVEOUT
);
...
...
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