Browse Source

add port rename callback to jack_evmon

pull/5/merge
Paul Davis 7 years ago
parent
commit
2ea43fc303
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      evmon.c

+ 11
- 0
evmon.c View File

@@ -26,12 +26,19 @@
#include <jack/metadata.h>
#include <jack/uuid.h>

void
port_rename_callback (jack_port_id_t port, const char* old_name, const char* new_name)
{
printf ("Port %d renamed from %s to %s\n", port, old_name, new_name);
}

void
port_callback (jack_port_id_t port, int yn, void* arg)
{
printf ("Port %d %s\n", port, (yn ? "registered" : "unregistered"));
}


void
connect_callback (jack_port_id_t a, jack_port_id_t b, int yn, void* arg)
{
@@ -104,6 +111,10 @@ main (int argc, char *argv[])
fprintf (stderr, "cannot set port registration callback\n");
return 1;
}
if (jack_set_port_rename_callback (client, port_rename_callback, NULL)) {
fprintf (stderr, "cannot set port registration callback\n");
return 1;
}
if (jack_set_port_connect_callback (client, connect_callback, NULL)) {
fprintf (stderr, "cannot set port connect callback\n");
return 1;


Loading…
Cancel
Save