Add more UI events and get backend threaded up.

This commit is contained in:
Kevin Whitaker
2017-01-29 19:39:30 -05:00
parent ab4df84657
commit ad26e8351f
5 changed files with 47 additions and 3 deletions

View File

@@ -22,6 +22,10 @@
#include <Wt/Dbo/Session>
#include <Wt/Dbo/backend/Sqlite3>
#include <vector>
#include <thread>
#include "db/User.h"
#include "db/AudioTrack.h"
class GroovePlayer
{
@@ -37,6 +41,13 @@ private:
Wt::Dbo::backend::Sqlite3 sqliteConnection;
Wt::Dbo::Session sqlSession;
std::vector<AudioTrack*> requestQueue;
std::thread* grooveEvents;
static void grooveEventLoop();
std::vector<AudioTrack*> getNextVoteBatch();
std::thread* grooveAudioScanner;
static void grooveAudioScannerLoop();
};
#endif // GROOVEPLAYER_H