C++ example (static link).
See full example cpp/sound4.impactfm.cl-pipe-cxx.cpp
Setup and sanity checks
instance.
SetParam(
"ADMIN_USER",
"admin");
instance.
SetParam(
"ADMIN_SECRET",
"admin");
Sample to create the processing instance
if (!instance.
Create(LoginKey, RadioName, KeyId, AccessKey, store_path)) {
std::cerr << "Failed to create the processing instance" << std::endl;
return 1;
}
Communicating with the instance
See also JSON syntax
auto answer = client->ProcessJson(R"JSON({"get":{"processorname":null}})JSON");
std::cerr << "Request for processor name returned "<<answer<<std::endl;
Starting a web-server
std::cerr << "Failed to create the web server on port " << listen_port << std::endl;
return 1;
}
Sample processing loop
while (!stopthread)
{
std::cerr << "ProcessLoop: input stopped"<< std::endl;
stopthread=true;
break;
}
if (stopthread) break;
std::cerr << "Failed to write audio output" << std::endl;
stopthread=true;
}
}