From 343c674c9b04eea6edd715f90bd2de56ec6b3711 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 16 May 2016 14:55:58 -1000 Subject: [PATCH] Arrow-key autoplay --- driver/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/driver/main.cpp b/driver/main.cpp index 8903a3a..b7dab39 100644 --- a/driver/main.cpp +++ b/driver/main.cpp @@ -303,6 +303,14 @@ struct AppCallback : boo::IApplicationCallback void SelectSFX(int sfxId) { m_sfxId = sfxId; + + bool playing = m_vox && m_vox->state() == amuse::VoiceState::Playing; + if (playing) + { + m_vox->keyOff(); + m_vox = m_engine->fxStart(m_sfxId, m_volume, 0.f); + } + UpdateSFXDisplay(); }