winejack.drv: use jack_client_open instead of deprecated function

André Hentschel nerv at dawncrow.de
Tue May 25 12:12:30 CDT 2010


This turns of the warning by jack-audio and makes the driver usable.
---
 dlls/winejack.drv/audio.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/winejack.drv/audio.c b/dlls/winejack.drv/audio.c
index ffaffae..da04824 100644
--- a/dlls/winejack.drv/audio.c
+++ b/dlls/winejack.drv/audio.c
@@ -68,10 +68,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave);
 #define MAKE_FUNCPTR(f) static typeof(f) * fp_##f = NULL;
 
 /* Function pointers for dynamic loading of libjack */
-/* these are prefixed with "fp_", ie. "fp_jack_client_new" */
+/* these are prefixed with "fp_", ie. "fp_jack_client_open" */
 MAKE_FUNCPTR(jack_activate);
 MAKE_FUNCPTR(jack_connect);
-MAKE_FUNCPTR(jack_client_new);
+MAKE_FUNCPTR(jack_client_open);
 MAKE_FUNCPTR(jack_client_close);
 MAKE_FUNCPTR(jack_deactivate);
 MAKE_FUNCPTR(jack_set_process_callback);
@@ -633,12 +633,12 @@ static int JACK_OpenWaveOutDevice(WINE_WAVEOUT* wwo)
         /* try to become a client of the JACK server */
         snprintf(client_name, sizeof(client_name), "wine_jack_out_%d", wwo->wDevID);
 	TRACE("client name '%s'\n", client_name);
-        if ((client = fp_jack_client_new (client_name)) == 0)
+        if ((client = fp_jack_client_open (client_name, JackUseExactName, NULL)) == 0)
         {
                 /* jack has problems with shutting down clients, so lets */
                 /* wait a short while and try once more before we give up */
                 Sleep(250);
-                if ((client = fp_jack_client_new (client_name)) == 0)
+                if ((client = fp_jack_client_open (client_name, JackUseExactName, NULL)) == 0)
                 {
                   ERR("jack server not running?\n");
                   return 0;
@@ -904,7 +904,7 @@ static LONG JACK_WaveInit(void)
 #define LOAD_FUNCPTR(f) if((fp_##f = wine_dlsym(jackhandle, #f, NULL, 0)) == NULL) goto sym_not_found;    
     LOAD_FUNCPTR(jack_activate);
     LOAD_FUNCPTR(jack_connect);
-    LOAD_FUNCPTR(jack_client_new);
+    LOAD_FUNCPTR(jack_client_open);
     LOAD_FUNCPTR(jack_client_close);
     LOAD_FUNCPTR(jack_deactivate);
     LOAD_FUNCPTR(jack_set_process_callback);
@@ -1911,12 +1911,12 @@ static int JACK_OpenWaveInDevice(WINE_WAVEIN* wwi, WORD nChannels)
         /* try to become a client of the JACK server */
         snprintf(client_name, sizeof(client_name), "wine_jack_in_%d", wwi->wDevID);
         TRACE("client name '%s'\n", client_name);
-        if ((client = fp_jack_client_new (client_name)) == 0)
+        if ((client = fp_jack_client_open (client_name, JackUseExactName, NULL)) == 0)
         {
                 /* jack has problems with shutting down clients, so lets */
                 /* wait a short while and try once more before we give up */
                 Sleep(250);
-                if ((client = fp_jack_client_new (client_name)) == 0)
+                if ((client = fp_jack_client_open (client_name, JackUseExactName, NULL)) == 0)
                 {
                   ERR("jack server not running?\n");
                   return 0;
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list