|
|
@@ -23,6 +23,8 @@ |
|
|
|
#include <stdlib.h> |
|
|
|
|
|
|
|
#include <jack/jack.h> |
|
|
|
#include <jack/metadata.h> |
|
|
|
#include <jack/uuid.h> |
|
|
|
|
|
|
|
void |
|
|
|
port_callback (jack_port_id_t port, int yn, void* arg) |
|
|
@@ -49,6 +51,39 @@ graph_callback (void* arg) |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
void |
|
|
|
propchange (jack_uuid_t subject, const char* key, jack_property_change_t change) |
|
|
|
{ |
|
|
|
char buf[JACK_UUID_STRING_SIZE]; |
|
|
|
const char* action = ""; |
|
|
|
|
|
|
|
switch (change) { |
|
|
|
case PropertyCreated: |
|
|
|
action = "created"; |
|
|
|
break; |
|
|
|
|
|
|
|
case PropertyChanged: |
|
|
|
action = "changed"; |
|
|
|
break; |
|
|
|
|
|
|
|
case PropertyDeleted: |
|
|
|
action = "deleted"; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
if (jack_uuid_empty (subject)) { |
|
|
|
printf ("All properties changed!\n"); |
|
|
|
} else { |
|
|
|
jack_uuid_unparse (subject, buf); |
|
|
|
|
|
|
|
if (key) { |
|
|
|
printf ("key [%s] for %s %s\n", key, buf, action); |
|
|
|
} else { |
|
|
|
printf ("all keys for %s %s\n", buf, action); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
int |
|
|
|
main (int argc, char *argv[]) |
|
|
|
{ |
|
|
@@ -81,6 +116,10 @@ main (int argc, char *argv[]) |
|
|
|
fprintf (stderr, "cannot set graph order registration callback\n"); |
|
|
|
return 1; |
|
|
|
} |
|
|
|
if (jack_set_property_change_callback (client, (JackPropertyChangeCallback) propchange, 0)) { |
|
|
|
fprintf (stderr, "cannot set property change callback\n"); |
|
|
|
return 1; |
|
|
|
} |
|
|
|
if (jack_activate (client)) { |
|
|
|
fprintf (stderr, "cannot activate client"); |
|
|
|
return 1; |
|
|
|