@@ -402,9 +402,9 @@ class jack_description_t(Structure):
402402
403403
404404# JACK2 only:
405- def get_version_string ():
405+ def get_version_string (encoding = ENCODING ):
406406 if jlib .jack_get_version_string :
407- return jlib .jack_get_version_string ()
407+ return _d ( jlib .jack_get_version_string (), encoding )
408408
409409 return None
410410
@@ -416,9 +416,10 @@ def client_open(client_name, options, status, uuid=""):
416416 return None
417417
418418
419- def client_rename (client , new_name ):
419+ # JACK1 < 0.126:
420+ def client_rename (client , new_name , encoding = ENCODING ):
420421 if jlib .jack_client_rename :
421- return jlib .jack_client_rename (client , _e (new_name ))
422+ return _d ( jlib .jack_client_rename (client , _e (new_name )), encoding )
422423
423424 return None
424425
@@ -437,9 +438,9 @@ def client_name_size():
437438 return 0
438439
439440
440- def get_client_name (client ):
441+ def get_client_name (client , encoding = ENCODING ):
441442 if jlib .jack_get_client_name :
442- return jlib .jack_get_client_name (client )
443+ return _d ( jlib .jack_get_client_name (client ), encoding )
443444
444445 return None
445446
@@ -965,20 +966,20 @@ def port_get_buffer(port, nframes):
965966 return jlib .jack_port_get_buffer (port , nframes )
966967
967968
968- def port_name (port ):
969- return _d (jlib .jack_port_name (port ))
969+ def port_name (port , encoding = ENCODING ):
970+ return _d (jlib .jack_port_name (port ), encoding )
970971
971972
972- def port_short_name (port ):
973- return _d (jlib .jack_port_short_name (port ))
973+ def port_short_name (port , encoding = ENCODING ):
974+ return _d (jlib .jack_port_short_name (port ), encoding )
974975
975976
976977def port_flags (port ):
977978 return jlib .jack_port_flags (port )
978979
979980
980- def port_type (port ):
981- return _d (jlib .jack_port_type (port ))
981+ def port_type (port , encoding = ENCODING ):
982+ return _d (jlib .jack_port_type (port ), encoding )
982983
983984
984985# JACK2 only:
@@ -998,24 +999,24 @@ def port_connected_to(port, port_name):
998999 return jlib .jack_port_connected_to (port , _e (port_name ))
9991000
10001001
1001- def port_get_connections (port ):
1002+ def port_get_connections (port , encoding = ENCODING ):
10021003 ports = jlib .jack_port_get_connections (port )
10031004 if not ports :
10041005 return
10051006 for port_name in ports :
10061007 if port_name is None :
10071008 break
1008- yield _d (port_name )
1009+ yield _d (port_name , encoding )
10091010
10101011
1011- def port_get_all_connections (client , port ):
1012+ def port_get_all_connections (client , port , encoding = ENCODING ):
10121013 ports = jlib .jack_port_get_all_connections (client , port )
10131014 if not ports :
10141015 return
10151016 for port_name in ports :
10161017 if port_name is None :
10171018 break
1018- yield _d (port_name )
1019+ yield _d (port_name , encoding )
10191020
10201021
10211022def port_tie (src , dst ):
@@ -1038,14 +1039,14 @@ def port_unset_alias(port, alias):
10381039 return jlib .jack_port_unset_alias (port , _e (alias ))
10391040
10401041
1041- def port_get_aliases (port ):
1042- # NOTE - this function has no 2nd argument in jacklib
1042+ def port_get_aliases (port , encoding = ENCODING ):
1043+ # NOTE - this function has no input argument in jacklib
10431044 # Instead, aliases will be passed in return value, in form of (int ret, str alias1, str alias2)
10441045 name_size = port_name_size ()
10451046 alias_type = c_char_p * 2
10461047 aliases = alias_type (b" " * name_size , b" " * name_size )
10471048 ret = jlib .jack_port_get_aliases (port , pointer (aliases ))
1048- return ret , _d (aliases [0 ]), _d (aliases [1 ])
1049+ return ret , _d (aliases [0 ], encoding ), _d (aliases [1 ], encoding )
10491050
10501051
10511052def port_request_monitor (port , onoff ):
@@ -1544,9 +1545,9 @@ def session_event_free(event):
15441545 jlib .jack_session_event_free (event )
15451546
15461547
1547- def client_get_uuid (client ):
1548+ def client_get_uuid (client , encoding = ENCODING ):
15481549 if jlib .jack_client_get_uuid :
1549- return _d (jlib .jack_client_get_uuid (client ))
1550+ return _d (jlib .jack_client_get_uuid (client ), encoding )
15501551
15511552 return None
15521553
@@ -1563,16 +1564,16 @@ def session_commands_free(cmds):
15631564 jlib .jack_session_commands_free (cmds )
15641565
15651566
1566- def get_uuid_for_client_name (client , client_name ):
1567+ def get_uuid_for_client_name (client , client_name , encoding = ENCODING ):
15671568 if jlib .jack_get_uuid_for_client_name :
1568- return jlib .jack_get_uuid_for_client_name (client , _e (client_name ))
1569+ return _d ( jlib .jack_get_uuid_for_client_name (client , _e (client_name )), encoding )
15691570
15701571 return None
15711572
15721573
1573- def get_client_name_by_uuid (client , client_uuid ):
1574+ def get_client_name_by_uuid (client , client_uuid , encoding = ENCODING ):
15741575 if jlib .jack_get_client_name_by_uuid :
1575- return jlib .jack_get_client_name_by_uuid (client , _e (client_uuid ))
1576+ return _d ( jlib .jack_get_client_name_by_uuid (client , _e (client_uuid )), encoding )
15761577
15771578 return None
15781579
0 commit comments