src/JackCommand.h
branchv_0
changeset 16 79520ded76f0
parent 15 463ce61415f1
child 17 4e6b33312c5a
equal deleted inserted replaced
15:463ce61415f1 16:79520ded76f0
   288 
   288 
   289 	void applyConnectionRecipes() {
   289 	void applyConnectionRecipes() {
   290 		for (Configuration::ConnectionRecipe recipe : configuration.connectionRecipes) {
   290 		for (Configuration::ConnectionRecipe recipe : configuration.connectionRecipes) {
   291 			auto operation = recipe.connected ? jack_connect : jack_disconnect;
   291 			auto operation = recipe.connected ? jack_connect : jack_disconnect;
   292 			int result = operation(realTimeContext.jackClient, convertor.to_bytes(recipe.sourcePort).c_str(), convertor.to_bytes(recipe.destinationPort).c_str());
   292 			int result = operation(realTimeContext.jackClient, convertor.to_bytes(recipe.sourcePort).c_str(), convertor.to_bytes(recipe.destinationPort).c_str());
   293 			if (result != 0 && result != EEXIST) std::wcerr << L"Unable to " << (recipe.connected ? L"connect" : L"disconnect") << L": „" << recipe.sourcePort << L"“ to: „" << recipe.destinationPort << L"“." << std::endl;
   293 			if (result != 0 && result != EEXIST) std::wcerr << L"Unable to " << (recipe.connected ? L"connect" : L"disconnect") << L": „" << recipe.sourcePort << (recipe.connected ? L"“ to: „" : L"“ from: „") << recipe.destinationPort << L"“." << std::endl;
   294 		}
   294 		}
   295 	}
   295 	}
   296 
   296 
   297 	static void jackErrorCallback(const char * message) {
   297 	static void jackErrorCallback(const char * message) {
   298 		std::wstring_convert < std::codecvt_utf8<wchar_t>> convertor; // TODO: local system encoding
   298 		std::wstring_convert < std::codecvt_utf8<wchar_t>> convertor; // TODO: local system encoding