#include #include #include #include #include "Client.hpp" #include "Server.hpp" int main(int argc, char* argv[]) { // TODO(Faraphel): move in the Client // initialize the mpg123 library if (mpg123_init() != MPG123_OK) throw std::runtime_error("Error while initializing mpg123."); // initialize the PortAudio library if (Pa_Initialize() != paNoError) throw std::runtime_error("Could not initialize PortAudio."); // start the client and server Server server; Client client; std::thread serverThread(&Server::loop, &server); std::thread clientThread(&Client::loop, &client); serverThread.join(); clientThread.join(); // terminate the libraries Pa_Terminate(); mpg123_exit(); }