Ejemplo n.º 1
0
 def set_property(port, key, value, jackPropertyType=""):
     """empty jackPropertyType leads to UTF-8 string
     for convenience we see if value is a python int and send the right jack_property_t::type
     jackio.c checks if the port exists, even though metadata allows keys for non-existent uuids.
     """
     if type(value) is int:
         jackPropertyType = "http://www.w3.org/2001/XMLSchema#int"
         value = str(value)
     elif not type(value) is str:
         return TypeError("value {} must be int or str but was {}".format(
             value, type(value)))
     do_cmd("/io/set_property", None, [port, key, value, jackPropertyType])
Ejemplo n.º 2
0
    def client_set_property(key, value, jackPropertyType=""):
        """empty jackPropertyType leads to UTF-8 string
        for convenience we see if value is a python int and send the right jack_property_t::type

        This is directly for our client, which we do not need to provide here.
        """
        if type(value) is int:
            jackPropertyType = "http://www.w3.org/2001/XMLSchema#int"
            value = str(value)
        elif not type(value) is str:
            return TypeError("value {} must be int or str but was {}".format(
                value, type(value)))
        do_cmd("/io/client_set_property", None, [key, value, jackPropertyType])
Ejemplo n.º 3
0
 def remove_all_properties():
     """Remove all metadata from jack server"""
     do_cmd("/io/remove_all_properties", None, [])
Ejemplo n.º 4
0
 def remove_properties(port):
     """port is the portname as string System:out_1"""
     do_cmd("/io/remove_properties", None, [port])
Ejemplo n.º 5
0
 def remove_property(port, key):
     """port is the portname as string System:out_1"""
     do_cmd("/io/remove_property", None, [port, key])
Ejemplo n.º 6
0
 def client_remove_property(key):
     """
     This is directly for our client, which we do not need to provide here.
     """
     do_cmd("/io/client_remove_property", None, [key])