Skip to content

Commit 7a6d45b

Browse files
committed
Don't hardcode my harddrive name LOL
1 parent 1b20a20 commit 7a6d45b

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ add_executable(LabSynthToy
3434
PocketModNode.cpp
3535
LabSoundTemplateNode.h
3636
LabSoundTemplateNode.cpp
37+
LabSynthToy.h
3738
LabSynthToy.cpp)
3839

3940
target_link_libraries(LabSynthToy Lab::Sound ${PLATFORM_LIBS})

LabSynthToy.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,10 @@ void test_pocketmod(lab::AudioContext& ac)
211211

212212
std::shared_ptr<PocketModNode> pocketmod(new PocketModNode(ac));
213213
ac.connect(ac.device(), pocketmod, 0, 0);
214-
pocketmod->loadMOD("/Users/dp/Projects/LabSound/install-synth/install/share/LabSynthToy/bananasplit.mod");
215-
std::this_thread::sleep_for(std::chrono::seconds(20));
214+
std::string path = synth_toy_asset_base;
215+
path += "/bananasplit.mod";
216+
pocketmod->loadMOD(path.c_str());
217+
std::this_thread::sleep_for(std::chrono::seconds(120));
216218
}
217219

218220
int main(int argc, char *argv[]) try

LabSynthToy.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#ifndef LABSYNTHTOYCONFIG_H
2-
#define LABSYNTHTOYCONFIG_H
3-
4-
const char* synth_toy_asset_base = "/Users/dp/Projects/LabSound/install-synth/install/share/LabSynthToy/";
5-
6-
#endif
1+
#ifndef LABSYNTHTOYCONFIG_H
2+
#define LABSYNTHTOYCONFIG_H
3+
4+
const char* synth_toy_asset_base = "C:/Projects/LabSound/build-synth/install/share/LabSynthToy/";
5+
6+
#endif

pocketmod/pocketmod.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int _pocketmod_clamp_volume(int x)
145145
/* Zero out a block of memory */
146146
static void _pocketmod_zero(void *data, int size)
147147
{
148-
char *byte = data, *end = byte + size;
148+
char *byte = (char*) data, *end = byte + size;
149149
while (byte != end) { *byte++ = 0; }
150150
}
151151

0 commit comments

Comments
 (0)