Trying to use JACK-AUDIO-CONNECTION-KIT from Rust ( documentation ), I ran into problems when calling
jack_client_t* jack_client_open ( const char * client_name,
jack_options_t options,
jack_status_t * status,
... )
In Rust, I use
#[link(name = "jack")]
extern "C" {
pub fn jack_client_open(name: *const libc::c_char,
options: JackOptions,
status: &JackStatus)
-> *mut JackClientT;
}
( full code )
When I use namewith four characters, it works, for example
let name = CString::new("yass").unwrap().as_ptr();
but if I use 5 or more characters, this will not work. The JACK docs associated with the above say that a name can be no more than int jack_client_name_size()characters long, which in my case is 64. Why is this happening?
source
share