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
104d9d44
Commit
104d9d44
authored
Jul 03, 2003
by
Marcus Meissner
Committed by
Alexandre Julliard
Jul 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use standard debugging macros for jack.
JACK_SONAME -> SONAME_LIBJACK so we do not need the devel symlink there.
parent
39d1b9c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
30 deletions
+28
-30
jack.c
dlls/winmm/winejack/jack.c
+28
-30
No files found.
dlls/winmm/winejack/jack.c
View file @
104d9d44
...
...
@@ -22,7 +22,8 @@
#include "config.h"
#include "wine/port.h"
#include "wine/library.h"
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -30,21 +31,18 @@
#include "winuser.h"
#include "mmddk.h"
#include "jack.h"
#include "wine/library.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
jack
);
#ifdef HAVE_JACK_JACK_H
static
int
jack
=
0
;
/* set this to zero or one to enable or disable tracing in here */
#define TRACING 0
#if TRACING
#define PRINTF(...) printf(...)
#else
#define PRINTF(...)
#endif
#ifndef
JACK_SONAME
#define
JACK_SONAME
"libjack.so"
#ifndef
SONAME_LIBJACK
#define
SONAME_LIBJACK
"libjack.so"
#endif
void
*
jackhandle
=
NULL
;
...
...
@@ -54,17 +52,17 @@ void *jackhandle = NULL;
*/
static
DWORD
JACK_drvLoad
(
void
)
{
PRINTF
(
"JACK_drvLoad()
\n
"
);
TRACE
(
"JACK_drvLoad()
\n
"
);
/* dynamically load the jack library if not already loaded */
if
(
!
jackhandle
)
{
jackhandle
=
wine_dlopen
(
JACK_SONAME
,
RTLD_NOW
,
NULL
,
0
);
PRINTF
(
"JACK_drvLoad: JACK_SONAME == %s
\n
"
,
JACK_SONAME
);
PRINTF
(
"JACK_drvLoad: jackhandle == 0x%x
\n
"
,
jackhandle
);
jackhandle
=
wine_dlopen
(
SONAME_LIBJACK
,
RTLD_NOW
,
NULL
,
0
);
TRACE
(
"JACK_drvLoad: SONAME_LIBJACK == %s
\n
"
,
SONAME_LIBJACK
);
TRACE
(
"JACK_drvLoad: jackhandle == 0x%x
\n
"
,
jackhandle
);
if
(
!
jackhandle
)
{
PRINTF
(
"JACK_drvLoad: error loading the jack library %s, please install this library to use jack
\n
"
,
JACK_SONAME
);
FIXME
(
"JACK_drvLoad: error loading the jack library %s, please install this library to use jack
\n
"
,
SONAME_LIBJACK
);
jackhandle
=
(
void
*
)
-
1
;
return
0
;
}
...
...
@@ -79,11 +77,11 @@ static DWORD JACK_drvLoad(void)
/* unload the jack library on driver free */
static
DWORD
JACK_drvFree
(
void
)
{
PRINTF
(
"JACK_drvFree()
\n
"
);
TRACE
(
"JACK_drvFree()
\n
"
);
if
(
jackhandle
&&
(
jackhandle
!=
(
void
*
)
-
1
))
{
PRINTF
(
"JACK_drvFree: calling wine_dlclose() on jackhandle
\n
"
);
TRACE
(
"JACK_drvFree: calling wine_dlclose() on jackhandle
\n
"
);
wine_dlclose
(
jackhandle
,
NULL
,
0
);
jackhandle
=
NULL
;
}
...
...
@@ -100,18 +98,18 @@ static DWORD JACK_drvOpen(LPSTR str)
/* driver open */
if
(
!
jackhandle
)
{
PRINTF
(
"JACK_drvOpen: unable to open the jack library, returning 0
\n
"
);
FIXME
(
"JACK_drvOpen: unable to open the jack library, returning 0
\n
"
);
return
0
;
}
if
(
jack
)
{
PRINTF
(
"JACK_drvOpen: jack != 0 (already open), returning 0
\n
"
);
FIXME
(
"JACK_drvOpen: jack != 0 (already open), returning 0
\n
"
);
return
0
;
}
/* I know, this is ugly, but who cares... */
PRINTF
(
"JACK_drvOpen: opened jack(set jack = 1), returning 1
\n
"
);
TRACE
(
"JACK_drvOpen: opened jack(set jack = 1), returning 1
\n
"
);
jack
=
1
;
return
1
;
}
...
...
@@ -123,12 +121,12 @@ static DWORD JACK_drvClose(DWORD dwDevID)
{
if
(
jack
)
{
PRINTF
(
"JACK_drvClose: jack is nonzero, setting jack to 0 and returning 1
\n
"
);
TRACE
(
"JACK_drvClose: jack is nonzero, setting jack to 0 and returning 1
\n
"
);
jack
=
0
;
return
1
;
}
PRINTF
(
"JACK_drvClose: jack is zero(closed), returning 0
\n
"
);
TRACE
(
"JACK_drvClose: jack is zero(closed), returning 0
\n
"
);
return
0
;
}
#endif
/* #ifdef HAVE_JACK_JACK_H */
...
...
@@ -146,30 +144,30 @@ LONG CALLBACK JACK_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
switch
(
wMsg
)
{
#ifdef HAVE_JACK_JACK_H
case
DRV_LOAD
:
PRINTF
(
"JACK_DriverProc: DRV_LOAD
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_LOAD
\n
"
);
return
JACK_drvLoad
();
case
DRV_FREE
:
PRINTF
(
"JACK_DriverProc: DRV_FREE
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_FREE
\n
"
);
return
JACK_drvFree
();
case
DRV_OPEN
:
PRINTF
(
"JACK_DriverProc: DRV_OPEN
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_OPEN
\n
"
);
return
JACK_drvOpen
((
LPSTR
)
dwParam1
);
case
DRV_CLOSE
:
PRINTF
(
"JACK_DriverProc: DRV_CLOSE
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_CLOSE
\n
"
);
return
JACK_drvClose
(
dwDevID
);
case
DRV_ENABLE
:
PRINTF
(
"JACK_DriverProc: DRV_ENABLE
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_ENABLE
\n
"
);
return
1
;
case
DRV_DISABLE
:
PRINTF
(
"JACK_DriverProc: DRV_DISABLE
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_DISABLE
\n
"
);
return
1
;
case
DRV_QUERYCONFIGURE
:
return
1
;
case
DRV_CONFIGURE
:
MessageBoxA
(
0
,
"jack audio driver!"
,
"jack driver"
,
MB_OK
);
return
1
;
case
DRV_INSTALL
:
PRINTF
(
"JACK_DriverProc: DRV_INSTALL
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_INSTALL
\n
"
);
return
DRVCNF_RESTART
;
case
DRV_REMOVE
:
PRINTF
(
"JACK_DriverProc: DRV_REMOVE
\n
"
);
TRACE
(
"JACK_DriverProc: DRV_REMOVE
\n
"
);
return
DRVCNF_RESTART
;
#endif
default:
...
...
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