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
3c640dda
Commit
3c640dda
authored
Apr 21, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineesd.drv: Clean up loading.
parent
82e4c76d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
74 deletions
+25
-74
audio.c
dlls/wineesd.drv/audio.c
+14
-5
esound.c
dlls/wineesd.drv/esound.c
+11
-35
esound.h
dlls/wineesd.drv/esound.h
+0
-34
No files found.
dlls/wineesd.drv/audio.c
View file @
3c640dda
...
...
@@ -63,11 +63,14 @@
#include "ks.h"
#include "ksguid.h"
#include "ksmedia.h"
#include "esound.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wave
);
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
#ifdef HAVE_ESD
#include <esd.h>
...
...
@@ -384,13 +387,17 @@ static void ESD_CloseWaveInDevice(WINE_WAVEIN* wwi)
wwi
->
stream_fd
=
-
1
;
}
static
int
WAVE_loadcount
;
/******************************************************************
* ESD_WaveClose
*/
LONG
ESD_WaveClose
(
void
)
static
LONG
ESD_WaveClose
(
void
)
{
int
iDevice
;
if
(
--
WAVE_loadcount
)
return
1
;
/* close all open devices */
for
(
iDevice
=
0
;
iDevice
<
MAX_WAVEOUTDRV
;
iDevice
++
)
{
...
...
@@ -416,18 +423,20 @@ LONG ESD_WaveClose(void)
*
* Initialize internal structures from ESD server info
*/
LONG
ESD_WaveInit
(
void
)
static
LONG
ESD_WaveInit
(
void
)
{
int
i
;
int
fd
;
TRACE
(
"called
\n
"
);
if
(
WAVE_loadcount
++
)
return
1
;
/* Testing whether the esd host is alive. */
if
((
fd
=
esd_open_sound
(
NULL
))
<
0
)
{
WARN
(
"esd_open_sound() failed (%d)
\n
"
,
errno
);
return
-
1
;
return
0
;
}
esd_close
(
fd
);
...
...
@@ -497,7 +506,7 @@ LONG ESD_WaveInit(void)
WInDev
[
i
].
caps
.
wReserved1
=
0
;
}
return
0
;
return
1
;
}
/******************************************************************
...
...
dlls/wineesd.drv/esound.c
View file @
3c640dda
...
...
@@ -31,27 +31,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "mmddk.h"
#include "esound.h"
#ifdef HAVE_ESD
/**************************************************************************
* ESD_drvOpen [internal]
*/
static
LRESULT
ESD_drvOpen
(
LPSTR
str
)
{
return
1
;
}
/**************************************************************************
* ESD_drvClose [internal]
*/
static
LRESULT
ESD_drvClose
(
DWORD_PTR
dwDevID
)
{
return
1
;
}
#endif
/* #ifdef HAVE_ESD */
/**************************************************************************
* DriverProc (WINEESD.@)
...
...
@@ -59,24 +38,21 @@ static LRESULT ESD_drvClose(DWORD_PTR dwDevID)
LRESULT
CALLBACK
ESD_DriverProc
(
DWORD_PTR
dwDevID
,
HDRVR
hDriv
,
UINT
wMsg
,
LPARAM
dwParam1
,
LPARAM
dwParam2
)
{
/* EPP TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n", */
/* EPP dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
switch
(
wMsg
)
{
#ifdef HAVE_ESD
case
DRV_LOAD
:
if
(
ESD_WaveInit
()
<
0
)
return
0
;
return
1
;
case
DRV_FREE
:
return
ESD_WaveClose
();
case
DRV_OPEN
:
return
ESD_drvOpen
((
LPSTR
)
dwParam1
);
case
DRV_CLOSE
:
return
ESD_drvClose
(
dwDevID
);
case
DRV_ENABLE
:
return
1
;
case
DRV_DISABLE
:
return
1
;
case
DRV_QUERYCONFIGURE
:
return
1
;
case
DRV_LOAD
:
case
DRV_FREE
:
case
DRV_OPEN
:
case
DRV_CLOSE
:
case
DRV_INSTALL
:
case
DRV_REMOVE
:
case
DRV_ENABLE
:
case
DRV_DISABLE
:
case
DRV_QUERYCONFIGURE
:
return
1
;
case
DRV_CONFIGURE
:
MessageBoxA
(
0
,
"EsounD MultiMedia Driver!"
,
"EsounD Driver"
,
MB_OK
);
return
1
;
case
DRV_INSTALL
:
return
DRVCNF_RESTART
;
case
DRV_REMOVE
:
return
DRVCNF_RESTART
;
#endif
default:
return
DefDriverProc
(
dwDevID
,
hDriv
,
wMsg
,
dwParam1
,
dwParam2
)
;
return
0
;
}
}
dlls/wineesd.drv/esound.h
deleted
100644 → 0
View file @
82e4c76d
/* Definition for EsounD drivers : wine multimedia system
*
* Copyright 2004 Zhangrong Huang <hzhr@users.sourceforge.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_ESD_H
#define __WINE_ESD_H
#ifndef __WINE_CONFIG_H
# error You must include config.h to use this header
#endif
#ifdef HAVE_SYS_ERRNO_H
#include <sys/errno.h>
#endif
extern
LONG
ESD_WaveInit
(
void
);
extern
LONG
ESD_WaveClose
(
void
);
#endif
/* __WINE_ESD_H */
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