Added master volume API for entire engine

This commit is contained in:
Jack Andersen
2016-07-13 20:16:00 -10:00
parent 2dcb9dd1c7
commit d602fbacd3
6 changed files with 20 additions and 9 deletions

View File

@@ -384,6 +384,14 @@ std::shared_ptr<Sequencer> Engine::seqPlay(int groupId, int songId, const unsign
return {};
}
extern "C" const float VolumeLUT[];
/** Set total volume of engine */
void Engine::setVolume(float vol)
{
m_backend.setVolume(VolumeLUT[int(vol * 65536)]);
}
/** Find voice from VoiceId */
std::shared_ptr<Voice> Engine::findVoice(int vid)
{