src/JackHandler.h
branchv_0
changeset 9 14cf28d7681c
parent 8 27579c5cdc51
child 10 6aa881c10efd
equal deleted inserted replaced
8:27579c5cdc51 9:14cf28d7681c
    95 
    95 
    96 		int jackError = jack_activate(jackClient);
    96 		int jackError = jack_activate(jackClient);
    97 		if (jackError) throw JackException(L"Could not activate client.");
    97 		if (jackError) throw JackException(L"Could not activate client.");
    98 
    98 
    99 		// Wait for a port connection, because it does not make much sense to send MIDI events nowhere:
    99 		// Wait for a port connection, because it does not make much sense to send MIDI events nowhere:
   100 		// TODO: configurable waiting (number of connections)
   100 		while (jack_port_connected(jackPort) < configuration.requiredJackConnections) usleep(10000);
   101 		while (jack_port_connected(jackPort) == 0) usleep(10000);
       
   102 
   101 
   103 		// TODO: configurable auto-connection to another client/port
   102 		// TODO: configurable auto-connection to another client/port
   104 	}
   103 	}
   105 
   104 
   106 	void startRelation(const relpipe::common::type::StringX name, std::vector<relpipe::reader::handlers::AttributeMetadata> attributes) override {
   105 	void startRelation(const relpipe::common::type::StringX name, std::vector<relpipe::reader::handlers::AttributeMetadata> attributes) override {