Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c0a602c2
Commit
c0a602c2
authored
Apr 21, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss.drv: Move opening devices to their respective xxxMessage functions.
parent
ce91ee44
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
75 deletions
+44
-75
audio.c
dlls/wineoss.drv/audio.c
+12
-4
midi.c
dlls/wineoss.drv/midi.c
+22
-22
mixer.c
dlls/wineoss.drv/mixer.c
+4
-2
mmaux.c
dlls/wineoss.drv/mmaux.c
+4
-2
oss.c
dlls/wineoss.drv/oss.c
+2
-33
oss.h
dlls/wineoss.drv/oss.h
+0
-12
No files found.
dlls/wineoss.drv/audio.c
View file @
c0a602c2
...
...
@@ -1140,18 +1140,22 @@ static char* StrDup(const char* str, const char* def)
return
dst
;
}
static
int
WAVE_loadcount
;
/******************************************************************
* OSS_WaveInit
*
* Initialize internal structures from OSS information
*/
LRESULT
OSS_WaveInit
(
void
)
static
LRESULT
OSS_WaveInit
(
void
)
{
char
*
str
;
unsigned
int
i
;
/* FIXME: Remove unneeded members of WOutDev and WInDev */
TRACE
(
"()
\n
"
);
TRACE
(
"(%i)
\n
"
,
WAVE_loadcount
);
if
(
WAVE_loadcount
++
)
return
1
;
str
=
getenv
(
"AUDIODEV"
);
if
(
str
!=
NULL
)
...
...
@@ -1230,10 +1234,12 @@ LRESULT OSS_WaveInit(void)
*
* Delete/clear internal structures of OSS information
*/
LRESULT
OSS_WaveExit
(
void
)
static
LRESULT
OSS_WaveExit
(
void
)
{
int
i
;
TRACE
(
"()
\n
"
);
TRACE
(
"(%i)
\n
"
,
WAVE_loadcount
);
if
(
--
WAVE_loadcount
)
return
1
;
for
(
i
=
0
;
i
<
MAX_WAVEDRV
;
++
i
)
{
...
...
@@ -3136,7 +3142,9 @@ DWORD WINAPI OSS_widMessage(WORD wDevID, WORD wMsg, DWORD_PTR dwUser,
switch
(
wMsg
)
{
case
DRVM_INIT
:
return
OSS_WaveInit
();
case
DRVM_EXIT
:
return
OSS_WaveExit
();
case
DRVM_ENABLE
:
case
DRVM_DISABLE
:
/* FIXME: Pretend this is supported */
...
...
dlls/wineoss.drv/midi.c
View file @
c0a602c2
...
...
@@ -170,23 +170,23 @@ static int MIDI_UnixToWindowsDeviceType(int type)
}
}
static
int
MIDI_loadcount
;
/**************************************************************************
* OSS_MidiInit [internal]
*
* Initializes the MIDI devices information variables
*/
LRESULT
OSS_MidiInit
(
void
)
static
LRESULT
OSS_MidiInit
(
void
)
{
int
i
,
status
,
numsynthdevs
=
255
,
nummididevs
=
255
;
struct
synth_info
sinfo
;
struct
midi_info
minfo
;
static
BOOL
bInitDone
=
FALSE
;
if
(
bInitDone
)
return
0
;
TRACE
(
"(%i)
\n
"
,
MIDI_loadcount
);
if
(
MIDI_loadcount
++
)
return
1
;
TRACE
(
"Initializing the MIDI variables.
\n
"
);
bInitDone
=
TRUE
;
/* try to open device */
if
(
midiOpenSeq
()
==
-
1
)
{
...
...
@@ -381,9 +381,12 @@ LRESULT OSS_MidiInit(void)
*
* Release the MIDI devices information variables
*/
LRESULT
OSS_MidiExit
(
void
)
static
LRESULT
OSS_MidiExit
(
void
)
{
TRACE
(
"()
\n
"
);
TRACE
(
"(%i)
\n
"
,
MIDI_loadcount
);
if
(
--
MIDI_loadcount
)
return
1
;
ZeroMemory
(
MidiInDev
,
sizeof
(
MidiInDev
));
ZeroMemory
(
MidiOutDev
,
sizeof
(
MidiOutDev
));
...
...
@@ -1654,21 +1657,6 @@ static DWORD modReset(WORD wDevID)
return
MMSYSERR_NOERROR
;
}
#else
/* HAVE_OSS_MIDI */
LRESULT
OSS_MidiInit
(
void
)
{
TRACE
(
"()
\n
"
);
return
FALSE
;
}
LRESULT
OSS_MidiExit
(
void
)
{
TRACE
(
"()
\n
"
);
return
0
;
}
#endif
/* HAVE_OSS_MIDI */
/*======================================================================*
...
...
@@ -1686,7 +1674,9 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
switch
(
wMsg
)
{
#ifdef HAVE_OSS_MIDI
case
DRVM_INIT
:
return
OSS_MidiInit
();
case
DRVM_EXIT
:
return
OSS_MidiExit
();
case
DRVM_ENABLE
:
case
DRVM_DISABLE
:
/* FIXME: Pretend this is supported */
...
...
@@ -1711,6 +1701,10 @@ DWORD WINAPI OSS_midMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
return
midStart
(
wDevID
);
case
MIDM_STOP
:
return
midStop
(
wDevID
);
#else
case
DRVM_INIT
:
case
MIDM_GETNUMDEVS
:
return
0
;
#endif
default:
TRACE
(
"Unsupported message
\n
"
);
...
...
@@ -1730,7 +1724,9 @@ DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
switch
(
wMsg
)
{
#ifdef HAVE_OSS_MIDI
case
DRVM_INIT
:
return
OSS_MidiInit
();
case
DRVM_EXIT
:
return
OSS_MidiExit
();
case
DRVM_ENABLE
:
case
DRVM_DISABLE
:
/* FIXME: Pretend this is supported */
...
...
@@ -1757,6 +1753,10 @@ DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
return
0
;
case
MODM_RESET
:
return
modReset
(
wDevID
);
#else
case
DRVM_INIT
:
case
MODM_GETNUMDEVS
:
return
0
;
#endif
default:
TRACE
(
"Unsupported message
\n
"
);
...
...
dlls/wineoss.drv/mixer.c
View file @
c0a602c2
...
...
@@ -1433,7 +1433,7 @@ static DWORD MIX_SetControlDetails(WORD wDevID, LPMIXERCONTROLDETAILS lpmcd,
/**************************************************************************
* MIX_Init [internal]
*/
LRESULT
OSS_MixerInit
(
void
)
static
LRESULT
OSS_MixerInit
(
void
)
{
int
i
,
mixer
;
...
...
@@ -1485,7 +1485,7 @@ LRESULT OSS_MixerInit(void)
/**************************************************************************
* MIX_Exit [internal]
*/
LRESULT
OSS_MixerExit
(
void
)
static
LRESULT
OSS_MixerExit
(
void
)
{
int
i
;
...
...
@@ -1524,7 +1524,9 @@ DWORD WINAPI OSS_mxdMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
switch
(
wMsg
)
{
case
DRVM_INIT
:
return
OSS_MixerInit
();
case
DRVM_EXIT
:
return
OSS_MixerExit
();
case
DRVM_ENABLE
:
case
DRVM_DISABLE
:
/* FIXME: Pretend this is supported */
...
...
dlls/wineoss.drv/mmaux.c
View file @
c0a602c2
...
...
@@ -49,7 +49,7 @@ static int NumDev = 6;
/*-----------------------------------------------------------------------*/
LRESULT
OSS_AuxInit
(
void
)
static
LRESULT
OSS_AuxInit
(
void
)
{
int
mixer
;
TRACE
(
"()
\n
"
);
...
...
@@ -66,7 +66,7 @@ LRESULT OSS_AuxInit(void)
/*-----------------------------------------------------------------------*/
LRESULT
OSS_AuxExit
(
void
)
static
LRESULT
OSS_AuxExit
(
void
)
{
TRACE
(
"()
\n
"
);
return
0
;
...
...
@@ -232,7 +232,9 @@ DWORD WINAPI OSS_auxMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
#ifdef HAVE_OSS
switch
(
wMsg
)
{
case
DRVM_INIT
:
return
OSS_AuxInit
();
case
DRVM_EXIT
:
return
OSS_AuxExit
();
case
DRVM_ENABLE
:
case
DRVM_DISABLE
:
/* FIXME: Pretend this is supported */
...
...
dlls/wineoss.drv/oss.c
View file @
c0a602c2
...
...
@@ -33,37 +33,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wave
);
#ifdef HAVE_OSS
/**************************************************************************
* OSS_drvLoad [internal]
*/
static
LRESULT
OSS_drvLoad
(
void
)
{
TRACE
(
"()
\n
"
);
OSS_WaveInit
();
OSS_MidiInit
();
OSS_MixerInit
();
OSS_AuxInit
();
return
1
;
}
/**************************************************************************
* OSS_drvFree [internal]
*/
static
LRESULT
OSS_drvFree
(
void
)
{
TRACE
(
"()
\n
"
);
OSS_WaveExit
();
OSS_MidiExit
();
OSS_MixerExit
();
OSS_AuxExit
();
return
1
;
}
#endif
/**************************************************************************
* DriverProc (WINEOSS.1)
*/
...
...
@@ -75,8 +44,8 @@ LRESULT CALLBACK OSS_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
switch
(
wMsg
)
{
#ifdef HAVE_OSS
case
DRV_LOAD
:
return
OSS_drvLoad
();
case
DRV_FREE
:
return
OSS_drvFree
();
case
DRV_LOAD
:
case
DRV_FREE
:
case
DRV_OPEN
:
case
DRV_CLOSE
:
case
DRV_ENABLE
:
...
...
dlls/wineoss.drv/oss.h
View file @
c0a602c2
...
...
@@ -37,15 +37,3 @@
#ifdef SNDCTL_DSP_STEREO
# define HAVE_OSS
#endif
LRESULT
OSS_WaveInit
(
void
);
LRESULT
OSS_WaveExit
(
void
);
LRESULT
OSS_MidiInit
(
void
);
LRESULT
OSS_MidiExit
(
void
);
LRESULT
OSS_MixerInit
(
void
);
LRESULT
OSS_MixerExit
(
void
);
LRESULT
OSS_AuxInit
(
void
);
LRESULT
OSS_AuxExit
(
void
);
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