-
Notifications
You must be signed in to change notification settings - Fork 12
/
ditest.cpp
53 lines (41 loc) · 1.18 KB
/
ditest.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "catch.hpp"
#include "src/MusicDatabase.h"
#include "src/ChipMachine.h"
#include "src/MusicPlayerList.h"
#include "src/modutils.h"
#include <audioplayer/audioplayer.h>
#include "src/di.hpp"
using namespace chipmachine;
namespace di = boost::di;
#include <coreutils/log.h>
#include <musicplayer/chipplugin.h>
#include <string>
#include <array>
TEST_CASE("ditest", "[machine]")
{
struct App
{
//App(MusicPlayerList& mp) : mp(mp) {}
//MusicPlayerList& mp;
ChipMachine& cm;
};
//MusicDatabase db;
//db.initFromLua("");
logging::setLevel(logging::Level::Verbose);
AudioPlayer ap{44100};
const auto injector = di::make_injector(
// di::bind<AudioPlayer>.to(ap),
// di::bind<MusicDatabase>.to(db),
di::bind<utils::path>.to(".")
);
musix::ChipPlugin::createPlugins("data");
grappix::screen.open(64, 64, false);
App cm = injector.create<App>();
/* App a = injector.create<App>(); */
/* a.mp.addSong({"music/Amiga/Nuke - Loader.mod"}); */
/* a.mp.nextSong(); */
/* while(true) { */
/* //a.mp.update(); */
/* utils::sleepms(1); */
/* } */
}