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
4a787831
Commit
4a787831
authored
May 11, 2004
by
Robert Reif
Committed by
Alexandre Julliard
May 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an interface name to wineoss, winealsa, winearts and winejack.
Add support for wave interface message where missing.
parent
ee51a0c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
187 additions
and
12 deletions
+187
-12
audio.c
dlls/winmm/winealsa/audio.c
+41
-8
audio.c
dlls/winmm/winearts/audio.c
+65
-0
audio.c
dlls/winmm/winejack/audio.c
+75
-1
audio.c
dlls/winmm/wineoss/audio.c
+6
-3
No files found.
dlls/winmm/winealsa/audio.c
View file @
4a787831
...
@@ -149,7 +149,8 @@ typedef struct {
...
@@ -149,7 +149,8 @@ typedef struct {
WAVEOUTCAPSA
caps
;
WAVEOUTCAPSA
caps
;
/* ALSA information (ALSA 0.9/1.x uses two different devices for playback/capture) */
/* ALSA information (ALSA 0.9/1.x uses two different devices for playback/capture) */
char
*
device
;
char
*
device
;
char
interface_name
[
64
];
snd_pcm_t
*
p_handle
;
/* handle to ALSA playback device */
snd_pcm_t
*
p_handle
;
/* handle to ALSA playback device */
snd_pcm_t
*
c_handle
;
/* handle to ALSA capture device */
snd_pcm_t
*
c_handle
;
/* handle to ALSA capture device */
snd_pcm_hw_params_t
*
hw_params
;
/* ALSA Hw params */
snd_pcm_hw_params_t
*
hw_params
;
/* ALSA Hw params */
...
@@ -195,7 +196,8 @@ typedef struct {
...
@@ -195,7 +196,8 @@ typedef struct {
WAVEOUTCAPSA
caps
;
WAVEOUTCAPSA
caps
;
/* ALSA information (ALSA 0.9/1.x uses two different devices for playback/capture) */
/* ALSA information (ALSA 0.9/1.x uses two different devices for playback/capture) */
char
*
device
;
char
*
device
;
char
interface_name
[
64
];
snd_pcm_t
*
p_handle
;
/* handle to ALSA playback device */
snd_pcm_t
*
p_handle
;
/* handle to ALSA playback device */
snd_pcm_t
*
c_handle
;
/* handle to ALSA capture device */
snd_pcm_t
*
c_handle
;
/* handle to ALSA capture device */
snd_pcm_hw_params_t
*
hw_params
;
/* ALSA Hw params */
snd_pcm_hw_params_t
*
hw_params
;
/* ALSA Hw params */
...
@@ -581,6 +583,8 @@ LONG ALSA_WaveInit(void)
...
@@ -581,6 +583,8 @@ LONG ALSA_WaveInit(void)
wwo
->
device
=
ALSA_GetDeviceFromReg
(
"PlaybackDevice"
);
wwo
->
device
=
ALSA_GetDeviceFromReg
(
"PlaybackDevice"
);
TRACE
(
"using waveout device
\"
%s
\"\n
"
,
wwo
->
device
);
TRACE
(
"using waveout device
\"
%s
\"\n
"
,
wwo
->
device
);
snprintf
(
wwo
->
interface_name
,
sizeof
(
wwo
->
interface_name
),
"winealsa: %s"
,
wwo
->
device
);
wwo
->
caps
.
wMid
=
0x0002
;
wwo
->
caps
.
wMid
=
0x0002
;
wwo
->
caps
.
wPid
=
0x0104
;
wwo
->
caps
.
wPid
=
0x0104
;
strcpy
(
wwo
->
caps
.
szPname
,
"SB16 Wave Out"
);
strcpy
(
wwo
->
caps
.
szPname
,
"SB16 Wave Out"
);
...
@@ -694,6 +698,8 @@ LONG ALSA_WaveInit(void)
...
@@ -694,6 +698,8 @@ LONG ALSA_WaveInit(void)
wwi
->
device
=
ALSA_GetDeviceFromReg
(
"RecordDevice"
);
wwi
->
device
=
ALSA_GetDeviceFromReg
(
"RecordDevice"
);
TRACE
(
"using wavein device
\"
%s
\"\n
"
,
wwi
->
device
);
TRACE
(
"using wavein device
\"
%s
\"\n
"
,
wwi
->
device
);
snprintf
(
wwi
->
interface_name
,
sizeof
(
wwi
->
interface_name
),
"winealsa: %s"
,
wwi
->
device
);
wwi
->
caps
.
wMid
=
0x0002
;
wwi
->
caps
.
wMid
=
0x0002
;
wwi
->
caps
.
wPid
=
0x0104
;
wwi
->
caps
.
wPid
=
0x0104
;
strcpy
(
wwi
->
caps
.
szPname
,
"SB16 Wave In"
);
strcpy
(
wwi
->
caps
.
szPname
,
"SB16 Wave In"
);
...
@@ -2000,7 +2006,7 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
...
@@ -2000,7 +2006,7 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
{
{
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
devic
e
,
-
1
,
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_nam
e
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
MMSYSERR_NOERROR
;
return
MMSYSERR_NOERROR
;
}
}
...
@@ -2010,10 +2016,10 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
...
@@ -2010,10 +2016,10 @@ static DWORD wodDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
*/
*/
static
DWORD
wodDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
static
DWORD
wodDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
{
{
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
devic
e
,
-
1
,
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_nam
e
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
))
NULL
,
0
)
*
sizeof
(
WCHAR
))
{
{
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
devic
e
,
-
1
,
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_nam
e
,
-
1
,
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
return
MMSYSERR_NOERROR
;
return
MMSYSERR_NOERROR
;
}
}
...
@@ -3394,6 +3400,33 @@ static DWORD widGetNumDevs(void)
...
@@ -3394,6 +3400,33 @@ static DWORD widGetNumDevs(void)
}
}
/**************************************************************************
/**************************************************************************
* widDevInterfaceSize [internal]
*/
static
DWORD
widDevInterfaceSize
(
UINT
wDevID
,
LPDWORD
dwParam1
)
{
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
MMSYSERR_NOERROR
;
}
/**************************************************************************
* widDevInterface [internal]
*/
static
DWORD
widDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
{
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
))
{
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
return
MMSYSERR_NOERROR
;
}
return
MMSYSERR_INVALPARAM
;
}
/**************************************************************************
* widMessage (WINEALSA.@)
* widMessage (WINEALSA.@)
*/
*/
DWORD
WINAPI
ALSA_widMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
WINAPI
ALSA_widMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
...
@@ -3420,9 +3453,9 @@ DWORD WINAPI ALSA_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
...
@@ -3420,9 +3453,9 @@ DWORD WINAPI ALSA_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case
WIDM_RESET
:
return
widReset
(
wDevID
);
case
WIDM_RESET
:
return
widReset
(
wDevID
);
case
WIDM_START
:
return
widStart
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
case
WIDM_START
:
return
widStart
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
case
WIDM_STOP
:
return
widStop
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
case
WIDM_STOP
:
return
widStop
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
/*case DRV_QUERYDEVICEINTERFACESIZE: return w
dDevInterfaceSize (wDevID, (LPDWORD)dwParam1);
case
DRV_QUERYDEVICEINTERFACESIZE
:
return
wi
dDevInterfaceSize
(
wDevID
,
(
LPDWORD
)
dwParam1
);
case DRV_QUERYDEVICEINTERFACE: return wdDevInterface (wDevID, (PWCHAR)dwParam1, dwParam2);
case
DRV_QUERYDEVICEINTERFACE
:
return
w
i
dDevInterface
(
wDevID
,
(
PWCHAR
)
dwParam1
,
dwParam2
);
case DRV_QUERYDSOUNDIFACE: return widDsCreate (wDevID, (PIDSCDRIVER*)dwParam1);
/*
case DRV_QUERYDSOUNDIFACE: return widDsCreate (wDevID, (PIDSCDRIVER*)dwParam1);
case DRV_QUERYDSOUNDDESC: return widDsDesc (wDevID, (PDSDRIVERDESC)dwParam1);
case DRV_QUERYDSOUNDDESC: return widDsDesc (wDevID, (PDSDRIVERDESC)dwParam1);
case DRV_QUERYDSOUNDGUID: return widDsGuid (wDevID, (LPGUID)dwParam1);*/
case DRV_QUERYDSOUNDGUID: return widDsGuid (wDevID, (LPGUID)dwParam1);*/
default:
default:
...
...
dlls/winmm/winearts/audio.c
View file @
4a787831
...
@@ -146,6 +146,7 @@ typedef struct {
...
@@ -146,6 +146,7 @@ typedef struct {
WORD
wFlags
;
WORD
wFlags
;
PCMWAVEFORMAT
format
;
PCMWAVEFORMAT
format
;
WAVEOUTCAPSA
caps
;
WAVEOUTCAPSA
caps
;
char
interface_name
[
32
];
DWORD
dwSleepTime
;
/* Num of milliseconds to sleep between filling the dsp buffers */
DWORD
dwSleepTime
;
/* Num of milliseconds to sleep between filling the dsp buffers */
...
@@ -183,6 +184,7 @@ typedef struct {
...
@@ -183,6 +184,7 @@ typedef struct {
WORD
wFlags
;
WORD
wFlags
;
PCMWAVEFORMAT
format
;
PCMWAVEFORMAT
format
;
WAVEINCAPSA
caps
;
WAVEINCAPSA
caps
;
char
interface_name
[
32
];
/* arts information */
/* arts information */
arts_stream_t
record_stream
;
/* the stream structure we get from arts when opening a stream for recording */
arts_stream_t
record_stream
;
/* the stream structure we get from arts when opening a stream for recording */
...
@@ -378,6 +380,8 @@ LONG ARTS_WaveInit(void)
...
@@ -378,6 +380,8 @@ LONG ARTS_WaveInit(void)
/* strcpy(WOutDev[i].caps.szPname, "OpenSoundSystem WAVOUT Driver");*/
/* strcpy(WOutDev[i].caps.szPname, "OpenSoundSystem WAVOUT Driver");*/
strcpy
(
WOutDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
strcpy
(
WOutDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
#endif
#endif
snprintf
(
WOutDev
[
i
].
interface_name
,
sizeof
(
WOutDev
[
i
].
interface_name
),
"winearts: %d"
,
i
);
WOutDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WOutDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WOutDev
[
i
].
caps
.
dwFormats
=
0x00000000
;
WOutDev
[
i
].
caps
.
dwFormats
=
0x00000000
;
WOutDev
[
i
].
caps
.
dwSupport
=
WAVECAPS_VOLUME
;
WOutDev
[
i
].
caps
.
dwSupport
=
WAVECAPS_VOLUME
;
...
@@ -417,6 +421,8 @@ LONG ARTS_WaveInit(void)
...
@@ -417,6 +421,8 @@ LONG ARTS_WaveInit(void)
WInDev
[
i
].
caps
.
wPid
=
0x0001
;
WInDev
[
i
].
caps
.
wPid
=
0x0001
;
strcpy
(
WInDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
strcpy
(
WInDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
#endif
#endif
snprintf
(
WInDev
[
i
].
interface_name
,
sizeof
(
WInDev
[
i
].
interface_name
),
"winearts: %d"
,
i
);
WInDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WInDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WInDev
[
i
].
caps
.
dwFormats
=
0x00000000
;
WInDev
[
i
].
caps
.
dwFormats
=
0x00000000
;
...
@@ -1498,6 +1504,33 @@ static DWORD wodGetNumDevs(void)
...
@@ -1498,6 +1504,33 @@ static DWORD wodGetNumDevs(void)
}
}
/**************************************************************************
/**************************************************************************
* wodDevInterfaceSize [internal]
*/
static
DWORD
wodDevInterfaceSize
(
UINT
wDevID
,
LPDWORD
dwParam1
)
{
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
MMSYSERR_NOERROR
;
}
/**************************************************************************
* wodDevInterface [internal]
*/
static
DWORD
wodDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
{
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
))
{
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_name
,
-
1
,
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
return
MMSYSERR_NOERROR
;
}
return
MMSYSERR_INVALPARAM
;
}
/**************************************************************************
* wodMessage (WINEARTS.@)
* wodMessage (WINEARTS.@)
*/
*/
DWORD
WINAPI
ARTS_wodMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
WINAPI
ARTS_wodMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
...
@@ -1532,6 +1565,8 @@ DWORD WINAPI ARTS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
...
@@ -1532,6 +1565,8 @@ DWORD WINAPI ARTS_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case
WODM_RESTART
:
return
wodRestart
(
wDevID
);
case
WODM_RESTART
:
return
wodRestart
(
wDevID
);
case
WODM_RESET
:
return
wodReset
(
wDevID
);
case
WODM_RESET
:
return
wodReset
(
wDevID
);
case
DRV_QUERYDEVICEINTERFACESIZE
:
return
wodDevInterfaceSize
(
wDevID
,
(
LPDWORD
)
dwParam1
);
case
DRV_QUERYDEVICEINTERFACE
:
return
wodDevInterface
(
wDevID
,
(
PWCHAR
)
dwParam1
,
dwParam2
);
case
DRV_QUERYDSOUNDIFACE
:
return
wodDsCreate
(
wDevID
,
(
PIDSDRIVER
*
)
dwParam1
);
case
DRV_QUERYDSOUNDIFACE
:
return
wodDsCreate
(
wDevID
,
(
PIDSDRIVER
*
)
dwParam1
);
case
DRV_QUERYDSOUNDDESC
:
return
wodDsDesc
(
wDevID
,
(
PDSDRIVERDESC
)
dwParam1
);
case
DRV_QUERYDSOUNDDESC
:
return
wodDsDesc
(
wDevID
,
(
PDSDRIVERDESC
)
dwParam1
);
case
DRV_QUERYDSOUNDGUID
:
return
wodDsGuid
(
wDevID
,
(
LPGUID
)
dwParam1
);
case
DRV_QUERYDSOUNDGUID
:
return
wodDsGuid
(
wDevID
,
(
LPGUID
)
dwParam1
);
...
@@ -1555,6 +1590,34 @@ static DWORD widGetNumDevs(void)
...
@@ -1555,6 +1590,34 @@ static DWORD widGetNumDevs(void)
}
}
/**************************************************************************
/**************************************************************************
* widDevInterfaceSize [internal]
*/
static
DWORD
widDevInterfaceSize
(
UINT
wDevID
,
LPDWORD
dwParam1
)
{
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
MMSYSERR_NOERROR
;
}
/**************************************************************************
* widDevInterface [internal]
*/
static
DWORD
widDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
{
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
))
{
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
return
MMSYSERR_NOERROR
;
}
return
MMSYSERR_INVALPARAM
;
}
/**************************************************************************
* widNotifyClient [internal]
* widNotifyClient [internal]
*/
*/
static
DWORD
widNotifyClient
(
WINE_WAVEIN
*
wwi
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
static
DWORD
widNotifyClient
(
WINE_WAVEIN
*
wwi
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
...
@@ -2029,6 +2092,8 @@ DWORD WINAPI ARTS_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
...
@@ -2029,6 +2092,8 @@ DWORD WINAPI ARTS_widMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case
WIDM_RESET
:
return
widReset
(
wDevID
);
case
WIDM_RESET
:
return
widReset
(
wDevID
);
case
WIDM_START
:
return
widStart
(
wDevID
);
case
WIDM_START
:
return
widStart
(
wDevID
);
case
WIDM_STOP
:
return
widStop
(
wDevID
);
case
WIDM_STOP
:
return
widStop
(
wDevID
);
case
DRV_QUERYDEVICEINTERFACESIZE
:
return
widDevInterfaceSize
(
wDevID
,
(
LPDWORD
)
dwParam1
);
case
DRV_QUERYDEVICEINTERFACE
:
return
widDevInterface
(
wDevID
,
(
PWCHAR
)
dwParam1
,
dwParam2
);
default:
default:
FIXME
(
"unknown message %d!
\n
"
,
wMsg
);
FIXME
(
"unknown message %d!
\n
"
,
wMsg
);
}
}
...
...
dlls/winmm/winejack/audio.c
View file @
4a787831
...
@@ -128,6 +128,7 @@ typedef struct {
...
@@ -128,6 +128,7 @@ typedef struct {
PCMWAVEFORMAT
format
;
PCMWAVEFORMAT
format
;
WAVEOUTCAPSA
caps
;
WAVEOUTCAPSA
caps
;
WORD
wDevID
;
WORD
wDevID
;
char
interface_name
[
32
];
jack_port_t
*
out_port_l
;
/* ports for left and right channels */
jack_port_t
*
out_port_l
;
/* ports for left and right channels */
jack_port_t
*
out_port_r
;
jack_port_t
*
out_port_r
;
...
@@ -171,6 +172,7 @@ typedef struct {
...
@@ -171,6 +172,7 @@ typedef struct {
WAVEINCAPSA
caps
;
WAVEINCAPSA
caps
;
BOOL
bTriggerSupport
;
BOOL
bTriggerSupport
;
WORD
wDevID
;
WORD
wDevID
;
char
interface_name
[
32
];
jack_port_t
*
in_port_l
;
/* ports for left and right channels */
jack_port_t
*
in_port_l
;
/* ports for left and right channels */
jack_port_t
*
in_port_r
;
jack_port_t
*
in_port_r
;
...
@@ -892,6 +894,9 @@ LONG JACK_WaveInit(void)
...
@@ -892,6 +894,9 @@ LONG JACK_WaveInit(void)
/* strcpy(WOutDev[i].caps.szPname, "OpenSoundSystem WAVOUT Driver");*/
/* strcpy(WOutDev[i].caps.szPname, "OpenSoundSystem WAVOUT Driver");*/
strcpy
(
WOutDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
strcpy
(
WOutDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
#endif
#endif
snprintf
(
WOutDev
[
i
].
interface_name
,
sizeof
(
WOutDev
[
i
].
interface_name
),
"winejack: %d"
,
i
);
WOutDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WOutDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WOutDev
[
i
].
caps
.
dwFormats
=
0x00000000
;
WOutDev
[
i
].
caps
.
dwFormats
=
0x00000000
;
WOutDev
[
i
].
caps
.
dwSupport
=
WAVECAPS_VOLUME
;
WOutDev
[
i
].
caps
.
dwSupport
=
WAVECAPS_VOLUME
;
...
@@ -933,6 +938,8 @@ LONG JACK_WaveInit(void)
...
@@ -933,6 +938,8 @@ LONG JACK_WaveInit(void)
WInDev
[
i
].
caps
.
wPid
=
0x0001
;
WInDev
[
i
].
caps
.
wPid
=
0x0001
;
strcpy
(
WInDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
strcpy
(
WInDev
[
i
].
caps
.
szPname
,
"CS4236/37/38"
);
#endif
#endif
snprintf
(
WInDev
[
i
].
interface_name
,
sizeof
(
WInDev
[
i
].
interface_name
),
"winejack: %d"
,
i
);
WInDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WInDev
[
i
].
caps
.
vDriverVersion
=
0x0100
;
WInDev
[
i
].
caps
.
wChannels
=
0x2
;
WInDev
[
i
].
caps
.
wChannels
=
0x2
;
...
@@ -1676,6 +1683,33 @@ static DWORD wodGetNumDevs(void)
...
@@ -1676,6 +1683,33 @@ static DWORD wodGetNumDevs(void)
}
}
/**************************************************************************
/**************************************************************************
* wodDevInterfaceSize [internal]
*/
static
DWORD
wodDevInterfaceSize
(
UINT
wDevID
,
LPDWORD
dwParam1
)
{
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
MMSYSERR_NOERROR
;
}
/**************************************************************************
* wodDevInterface [internal]
*/
static
DWORD
wodDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
{
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
))
{
MultiByteToWideChar
(
CP_ACP
,
0
,
WOutDev
[
wDevID
].
interface_name
,
-
1
,
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
return
MMSYSERR_NOERROR
;
}
return
MMSYSERR_INVALPARAM
;
}
/**************************************************************************
* wodMessage (WINEJACK.7)
* wodMessage (WINEJACK.7)
*/
*/
DWORD
WINAPI
JACK_wodMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
WINAPI
JACK_wodMessage
(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
...
@@ -1718,6 +1752,8 @@ DWORD WINAPI JACK_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
...
@@ -1718,6 +1752,8 @@ DWORD WINAPI JACK_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
case
WODM_RESTART
:
return
wodRestart
(
wDevID
);
case
WODM_RESTART
:
return
wodRestart
(
wDevID
);
case
WODM_RESET
:
return
wodReset
(
wDevID
);
case
WODM_RESET
:
return
wodReset
(
wDevID
);
case
DRV_QUERYDEVICEINTERFACESIZE
:
return
wodDevInterfaceSize
(
wDevID
,
(
LPDWORD
)
dwParam1
);
case
DRV_QUERYDEVICEINTERFACE
:
return
wodDevInterface
(
wDevID
,
(
PWCHAR
)
dwParam1
,
dwParam2
);
case
DRV_QUERYDSOUNDIFACE
:
return
wodDsCreate
(
wDevID
,
(
PIDSDRIVER
*
)
dwParam1
);
case
DRV_QUERYDSOUNDIFACE
:
return
wodDsCreate
(
wDevID
,
(
PIDSDRIVER
*
)
dwParam1
);
case
DRV_QUERYDSOUNDDESC
:
return
wodDsDesc
(
wDevID
,
(
PDSDRIVERDESC
)
dwParam1
);
case
DRV_QUERYDSOUNDDESC
:
return
wodDsDesc
(
wDevID
,
(
PDSDRIVERDESC
)
dwParam1
);
case
DRV_QUERYDSOUNDGUID
:
return
wodDsGuid
(
wDevID
,
(
LPGUID
)
dwParam1
);
case
DRV_QUERYDSOUNDGUID
:
return
wodDsGuid
(
wDevID
,
(
LPGUID
)
dwParam1
);
...
@@ -2391,6 +2427,42 @@ static DWORD widReset(WORD wDevID)
...
@@ -2391,6 +2427,42 @@ static DWORD widReset(WORD wDevID)
}
}
/**************************************************************************
/**************************************************************************
* widGetNumDevs [internal]
*/
static
DWORD
widGetNumDevs
(
void
)
{
return
MAX_WAVEINDRV
;
}
/**************************************************************************
* widDevInterfaceSize [internal]
*/
static
DWORD
widDevInterfaceSize
(
UINT
wDevID
,
LPDWORD
dwParam1
)
{
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
MMSYSERR_NOERROR
;
}
/**************************************************************************
* widDevInterface [internal]
*/
static
DWORD
widDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
{
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
))
{
MultiByteToWideChar
(
CP_ACP
,
0
,
WInDev
[
wDevID
].
interface_name
,
-
1
,
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
return
MMSYSERR_NOERROR
;
}
return
MMSYSERR_INVALPARAM
;
}
/**************************************************************************
* widMessage (WINEJACK.6)
* widMessage (WINEJACK.6)
*/
*/
DWORD
WINAPI
JACK_widMessage
(
WORD
wDevID
,
WORD
wMsg
,
DWORD
dwUser
,
DWORD
WINAPI
JACK_widMessage
(
WORD
wDevID
,
WORD
wMsg
,
DWORD
dwUser
,
...
@@ -2412,10 +2484,12 @@ DWORD WINAPI JACK_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
...
@@ -2412,10 +2484,12 @@ DWORD WINAPI JACK_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
case
WIDM_PREPARE
:
return
widPrepare
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
case
WIDM_PREPARE
:
return
widPrepare
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
case
WIDM_UNPREPARE
:
return
widUnprepare
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
case
WIDM_UNPREPARE
:
return
widUnprepare
(
wDevID
,
(
LPWAVEHDR
)
dwParam1
,
dwParam2
);
case
WIDM_GETDEVCAPS
:
return
widGetDevCaps
(
wDevID
,
(
LPWAVEINCAPSA
)
dwParam1
,
dwParam2
);
case
WIDM_GETDEVCAPS
:
return
widGetDevCaps
(
wDevID
,
(
LPWAVEINCAPSA
)
dwParam1
,
dwParam2
);
case
WIDM_GETNUMDEVS
:
return
MAX_WAVEINDRV
;
case
WIDM_GETNUMDEVS
:
return
widGetNumDevs
()
;
case
WIDM_RESET
:
return
widReset
(
wDevID
);
case
WIDM_RESET
:
return
widReset
(
wDevID
);
case
WIDM_START
:
return
widStart
(
wDevID
);
case
WIDM_START
:
return
widStart
(
wDevID
);
case
WIDM_STOP
:
return
widStop
(
wDevID
);
case
WIDM_STOP
:
return
widStop
(
wDevID
);
case
DRV_QUERYDEVICEINTERFACESIZE
:
return
widDevInterfaceSize
(
wDevID
,
(
LPDWORD
)
dwParam1
);
case
DRV_QUERYDEVICEINTERFACE
:
return
widDevInterface
(
wDevID
,
(
PWCHAR
)
dwParam1
,
dwParam2
);
default:
default:
FIXME
(
"unknown message %d!
\n
"
,
wMsg
);
FIXME
(
"unknown message %d!
\n
"
,
wMsg
);
}
}
...
...
dlls/winmm/wineoss/audio.c
View file @
4a787831
...
@@ -150,6 +150,7 @@ typedef struct {
...
@@ -150,6 +150,7 @@ typedef struct {
typedef
struct
tagOSS_DEVICE
{
typedef
struct
tagOSS_DEVICE
{
char
dev_name
[
32
];
char
dev_name
[
32
];
char
mixer_name
[
32
];
char
mixer_name
[
32
];
char
interface_name
[
64
];
unsigned
open_count
;
unsigned
open_count
;
WAVEOUTCAPSA
out_caps
;
WAVEOUTCAPSA
out_caps
;
WAVEINCAPSA
in_caps
;
WAVEINCAPSA
in_caps
;
...
@@ -256,17 +257,17 @@ static DWORD wdDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
...
@@ -256,17 +257,17 @@ static DWORD wdDevInterfaceSize(UINT wDevID, LPDWORD dwParam1)
{
{
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
TRACE
(
"(%u, %p)
\n
"
,
wDevID
,
dwParam1
);
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
OSS_Devices
[
wDevID
].
dev
_name
,
-
1
,
*
dwParam1
=
MultiByteToWideChar
(
CP_ACP
,
0
,
OSS_Devices
[
wDevID
].
interface
_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
MMSYSERR_NOERROR
;
return
MMSYSERR_NOERROR
;
}
}
static
DWORD
wdDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
static
DWORD
wdDevInterface
(
UINT
wDevID
,
PWCHAR
dwParam1
,
DWORD
dwParam2
)
{
{
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
OSS_Devices
[
wDevID
].
dev
_name
,
-
1
,
if
(
dwParam2
>=
MultiByteToWideChar
(
CP_ACP
,
0
,
OSS_Devices
[
wDevID
].
interface
_name
,
-
1
,
NULL
,
0
)
*
sizeof
(
WCHAR
))
NULL
,
0
)
*
sizeof
(
WCHAR
))
{
{
MultiByteToWideChar
(
CP_ACP
,
0
,
OSS_Devices
[
wDevID
].
dev
_name
,
-
1
,
MultiByteToWideChar
(
CP_ACP
,
0
,
OSS_Devices
[
wDevID
].
interface
_name
,
-
1
,
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
dwParam1
,
dwParam2
/
sizeof
(
WCHAR
));
return
MMSYSERR_NOERROR
;
return
MMSYSERR_NOERROR
;
}
}
...
@@ -965,6 +966,8 @@ LONG OSS_WaveInit(void)
...
@@ -965,6 +966,8 @@ LONG OSS_WaveInit(void)
sprintf
((
char
*
)
OSS_Devices
[
i
].
mixer_name
,
"/dev/mixer%d"
,
i
);
sprintf
((
char
*
)
OSS_Devices
[
i
].
mixer_name
,
"/dev/mixer%d"
,
i
);
}
}
sprintf
(
OSS_Devices
[
i
].
interface_name
,
"wineoss: %s"
,
OSS_Devices
[
i
].
dev_name
);
INIT_GUID
(
OSS_Devices
[
i
].
ds_guid
,
0xbd6dd71a
,
0x3deb
,
0x11d1
,
0xb1
,
0x71
,
0x00
,
0xc0
,
0x4f
,
0xc2
,
0x00
,
0x00
+
i
);
INIT_GUID
(
OSS_Devices
[
i
].
ds_guid
,
0xbd6dd71a
,
0x3deb
,
0x11d1
,
0xb1
,
0x71
,
0x00
,
0xc0
,
0x4f
,
0xc2
,
0x00
,
0x00
+
i
);
INIT_GUID
(
OSS_Devices
[
i
].
dsc_guid
,
0xbd6dd71b
,
0x3deb
,
0x11d1
,
0xb1
,
0x71
,
0x00
,
0xc0
,
0x4f
,
0xc2
,
0x00
,
0x00
+
i
);
INIT_GUID
(
OSS_Devices
[
i
].
dsc_guid
,
0xbd6dd71b
,
0x3deb
,
0x11d1
,
0xb1
,
0x71
,
0x00
,
0xc0
,
0x4f
,
0xc2
,
0x00
,
0x00
+
i
);
}
}
...
...
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