diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/spectool.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/spectool.cc b/tools/spectool.cc index dfb00de..19f3a2f 100644 --- a/tools/spectool.cc +++ b/tools/spectool.cc @@ -131,7 +131,8 @@ int play_spec(const char* in_path) { fread(spec_data.data(), sizeof(float), spec_data.size(), f_in); fclose(f_in); - platform_init_window(false, nullptr, nullptr); + PlatformState platform_state = {}; + platform_init(&platform_state, false, nullptr, nullptr); audio_init(); audio_start(); Spectrogram spec; @@ -144,12 +145,12 @@ int play_spec(const char* in_path) { synth_trigger_voice(spec_id, 0.7f, 0.0f); printf("Playing... Press Ctrl+C to exit.\n"); - while (synth_get_active_voice_count() > 0 && !platform_should_close()) { - platform_poll(); + while (synth_get_active_voice_count() > 0 && !platform_should_close(&platform_state)) { + platform_poll(&platform_state); } audio_shutdown(); - platform_shutdown(); + platform_shutdown(&platform_state); return 0; } |
