Commit 05216197 authored by falkTX's avatar falkTX
Browse files

Make JackPortRenameCallback return void, to match JACK1 API

JACK2 added this function first, but the int return has been always wrong.
When JACK1 added JackPortRenameCallback it used the proper return.

Now that JACK1 supports port renames, devs will start to use it.
(previously it didn't work properly because of the missing jack_client_t* arg)

Some code might be broken because of this, but it's a very simple change,
and existing code would have been broken when changing JACK1 to JACK2.

Finally, JACK2 code never uses the int return value of this callback.
So there's no real reason to NOT change this.
parent fc6344e5
......@@ -403,10 +403,8 @@ typedef void (*JackPortConnectCallback)(jack_port_id_t a, jack_port_id_t b, int
* @param port the port that has been renamed
* @param new_name the new name
* @param arg pointer to a client supplied structure
*
* @return zero on success, non-zero on error
*/
typedef int (*JackPortRenameCallback)(jack_port_id_t port, const char* old_name, const char* new_name, void *arg);
typedef void (*JackPortRenameCallback)(jack_port_id_t port, const char* old_name, const char* new_name, void *arg);
/**
* Prototype for the client supplied function that is called
......
......@@ -186,11 +186,10 @@ void Jack_Client_Registration_Callback(const char* name, int val, void *arg)
client_register--;
}
int Jack_Port_Rename_Callback(jack_port_id_t port, const char* old_name, const char* new_name, void *arg)
void Jack_Port_Rename_Callback(jack_port_id_t port, const char* old_name, const char* new_name, void *arg)
{
Log("Rename callback has been successfully called with old_name '%s' and new_name '%s'. (msg from callback)\n", old_name, new_name);
port_rename_clbk = 1;
return 0;
}
int Jack_Update_Buffer_Size(jack_nframes_t nframes, void *arg)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment