#include <iostream>
//#include <glib.h>

#include "AudioContext.h"
#include "SingleApplication.h"
#include "VolumeControl.h"

int main()
{
    GMainLoop* mainloop;
    GMainContext* context = nullptr;

    mainloop = g_main_loop_new(context, FALSE);
    SingleApplication app("ukui-audio-service");

    if (app.isAlreadyRuning()) {
        std::cerr << "ukui-audio-service is already running. Exiting." << std::endl;
        return 1;
    }

    UkuiAudioFramwork::VolumeControl::getInstance().init();

    g_main_loop_run(mainloop);
    return 0;
}
