22 lines
550 B
C++
22 lines
550 B
C++
#include <mpg123.h>
|
|
#include <portaudio.h>
|
|
#include <stdexcept>
|
|
#include "EventManager.hpp"
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
|
// 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.");
|
|
|
|
EventManager eventManager;
|
|
eventManager.loop();
|
|
|
|
// terminate the libraries
|
|
Pa_Terminate();
|
|
mpg123_exit();
|
|
}
|