Arrow-key autoplay

This commit is contained in:
Jack Andersen 2016-05-16 14:55:58 -10:00
parent e55271111a
commit 343c674c9b
1 changed files with 8 additions and 0 deletions

View File

@ -303,6 +303,14 @@ struct AppCallback : boo::IApplicationCallback
void SelectSFX(int sfxId) void SelectSFX(int sfxId)
{ {
m_sfxId = 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(); UpdateSFXDisplay();
} }