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
82e4c76d
Commit
82e4c76d
authored
Apr 21, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winejack.drv: Clean up loading.
parent
c0a602c2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
47 deletions
+25
-47
audio.c
dlls/winejack.drv/audio.c
+12
-2
jack.c
dlls/winejack.drv/jack.c
+13
-42
jack.h
dlls/winejack.drv/jack.h
+0
-3
No files found.
dlls/winejack.drv/audio.c
View file @
82e4c76d
...
...
@@ -834,15 +834,19 @@ static void JACK_CloseWaveInDevice(WINE_WAVEIN* wwi)
#endif
}
static
int
WAVE_loadcount
;
/******************************************************************
* JACK_WaveRelease
*
*
*/
LONG
JACK_WaveRelease
(
void
)
static
LONG
JACK_WaveRelease
(
void
)
{
int
iDevice
;
if
(
--
WAVE_loadcount
)
return
1
;
TRACE
(
"closing all open waveout devices
\n
"
);
/* close all open output devices */
...
...
@@ -887,12 +891,14 @@ LONG JACK_WaveRelease(void)
*
* Initialize internal structures from JACK server info
*/
LONG
JACK_WaveInit
(
void
)
static
LONG
JACK_WaveInit
(
void
)
{
int
i
;
CHAR
szPname
[
MAXPNAMELEN
];
TRACE
(
"called
\n
"
);
if
(
WAVE_loadcount
++
)
return
1
;
/* setup function pointers */
#define LOAD_FUNCPTR(f) if((fp_##f = wine_dlsym(jackhandle, #f, NULL, 0)) == NULL) goto sym_not_found;
...
...
@@ -1665,7 +1671,9 @@ DWORD WINAPI JACK_wodMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
switch
(
wMsg
)
{
case
DRVM_INIT
:
return
JACK_WaveInit
();
case
DRVM_EXIT
:
return
JACK_WaveRelease
();
case
DRVM_ENABLE
:
case
DRVM_DISABLE
:
/* FIXME: Pretend this is supported */
...
...
@@ -2362,7 +2370,9 @@ DWORD WINAPI JACK_widMessage(WORD wDevID, WORD wMsg, DWORD dwUser,
switch
(
wMsg
)
{
case
DRVM_INIT
:
return
JACK_WaveInit
();
case
DRVM_EXIT
:
return
JACK_WaveRelease
();
case
DRVM_ENABLE
:
case
DRVM_DISABLE
:
/* FIXME: Pretend this is supported */
...
...
dlls/winejack.drv/jack.c
View file @
82e4c76d
...
...
@@ -49,20 +49,17 @@ static LRESULT JACK_drvLoad(void)
TRACE
(
"()
\n
"
);
/* dynamically load the jack library if not already loaded */
if
(
!
jackhandle
)
{
jackhandle
=
wine_dlopen
(
SONAME_LIBJACK
,
RTLD_NOW
,
NULL
,
0
);
TRACE
(
"SONAME_LIBJACK == %s
\n
"
,
SONAME_LIBJACK
);
TRACE
(
"jackhandle == %p
\n
"
,
jackhandle
);
if
(
!
jackhandle
)
{
FIXME
(
"error loading the jack library %s, please install this library to use jack
\n
"
,
SONAME_LIBJACK
);
jackhandle
=
(
void
*
)
-
1
;
FIXME
(
"error loading the jack library %s, please install this library to use jack
\n
"
,
SONAME_LIBJACK
)
;
return
0
;
}
}
return
JACK_WaveInit
()
;
return
1
;
}
/**************************************************************************
...
...
@@ -73,10 +70,8 @@ static LRESULT JACK_drvFree(void)
{
TRACE
(
"()
\n
"
);
if
(
jackhandle
&&
(
jackhandle
!=
(
void
*
)
-
1
)
)
if
(
jackhandle
)
{
JACK_WaveRelease
();
TRACE
(
"calling wine_dlclose() on jackhandle
\n
"
);
wine_dlclose
(
jackhandle
,
NULL
,
0
);
jackhandle
=
NULL
;
...
...
@@ -85,31 +80,6 @@ static LRESULT JACK_drvFree(void)
return
1
;
}
/**************************************************************************
* JACK_drvOpen [internal]
*/
static
LRESULT
JACK_drvOpen
(
LPSTR
str
)
{
TRACE
(
"(%s)
\n
"
,
str
);
/* if we were unable to load the jack library then fail the */
/* driver open */
if
(
!
jackhandle
)
{
FIXME
(
"unable to open the jack library, returning 0
\n
"
);
return
0
;
}
return
1
;
}
/**************************************************************************
* JACK_drvClose [internal]
*/
static
LRESULT
JACK_drvClose
(
DWORD_PTR
dwDevID
)
{
TRACE
(
"(%08lx)
\n
"
,
dwDevID
);
return
1
;
}
#endif
/* #ifdef SONAME_LIBJACK */
...
...
@@ -136,16 +106,17 @@ LRESULT CALLBACK JACK_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
#ifdef SONAME_LIBJACK
case
DRV_LOAD
:
return
JACK_drvLoad
();
case
DRV_FREE
:
return
JACK_drvFree
();
case
DRV_OPEN
:
return
JACK_drvOpen
((
LPSTR
)
dwParam1
);
case
DRV_CLOSE
:
return
JACK_drvClose
(
dwDevID
);
case
DRV_ENABLE
:
return
1
;
case
DRV_DISABLE
:
return
1
;
case
DRV_QUERYCONFIGURE
:
return
1
;
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
,
"jack audio driver!"
,
"jack 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/winejack.drv/jack.h
View file @
82e4c76d
...
...
@@ -22,7 +22,4 @@
extern
void
*
jackhandle
;
/* pointer to the libjack library */
extern
LONG
JACK_WaveInit
(
void
);
extern
LONG
JACK_WaveRelease
(
void
);
#endif
/* __WINE_JACK_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