Updating audio_jack to new interface for creating a client. Fixes depricated warning.
authorTom Rondeau <trondeau@vt.edu>
Wed, 10 Nov 2010 03:08:58 +0000 (22:08 -0500)
committerTom Rondeau <trondeau@vt.edu>
Wed, 10 Nov 2010 03:08:58 +0000 (22:08 -0500)
gr-audio-jack/src/audio_jack_sink.cc
gr-audio-jack/src/audio_jack_source.cc

index 6e39135c968d550f4f2b967ff6de2d7d878bca4c..f28fddc344c9e3bc9f971d3aad2b55ca386c67b8 100644 (file)
@@ -105,12 +105,17 @@ audio_jack_sink::audio_jack_sink (int sampling_rate,
     d_nunderuns (0)
 {
 #ifndef NO_PTHREAD
-    pthread_cond_init(&d_ringbuffer_ready, NULL);;
-    pthread_mutex_init(&d_jack_process_lock, NULL);
+  pthread_cond_init(&d_ringbuffer_ready, NULL);;
+  pthread_mutex_init(&d_jack_process_lock, NULL);
 #endif
-
+  
   // try to become a client of the JACK server
-  if ((d_jack_client = jack_client_new (d_device_name.c_str ())) == 0) {
+  jack_options_t options = JackNullOption;
+  jack_status_t status;
+  const char *server_name = NULL;
+  if ((d_jack_client = jack_client_open (d_device_name.c_str (),
+                                        options, &status,
+                                        server_name)) == NULL) {
     fprintf (stderr, "audio_jack_sink[%s]: jack server not running?\n",
             d_device_name.c_str());
     throw std::runtime_error ("audio_jack_sink");
index ca3df51d7f5eaf9601cfa8602963e1757414f4db..a92e970f5825efb3febb2c5b2cf4f297fefdeb28 100644 (file)
@@ -110,7 +110,12 @@ audio_jack_source::audio_jack_source (int sampling_rate,
 #endif
 
   // try to become a client of the JACK server
-  if ((d_jack_client = jack_client_new (d_device_name.c_str ())) == 0) {
+  jack_options_t options = JackNullOption;
+  jack_status_t status;
+  const char *server_name = NULL;
+  if ((d_jack_client = jack_client_open (d_device_name.c_str (),
+                                        options, &status,
+                                        server_name)) == NULL) {
     fprintf (stderr, "audio_jack_source[%s]: jack server not running?\n",
             d_device_name.c_str());
     throw std::runtime_error ("audio_jack_source");