Remove VolumeLUT; SoundMacro mixing appears to be linear

This commit is contained in:
Jack Andersen 2017-01-10 20:54:40 -10:00
parent 2836e73812
commit ecd990e94e
4 changed files with 2 additions and 65557 deletions

View File

@ -27,7 +27,6 @@ set(SOURCES
lib/SongConverter.cpp
lib/SongState.cpp
lib/Voice.cpp
lib/VolumeLUT.c
lib/Submix.cpp
lib/Studio.cpp
lib/EffectReverb.cpp

View File

@ -384,12 +384,10 @@ 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(clamp(0.f, vol, 1.f) * 65536)] * 1.46245869f);
m_backend.setVolume(vol);
}
/** Find voice from VoiceId */

View File

@ -12,7 +12,6 @@
namespace amuse
{
extern "C" const float VolumeLUT[];
void Voice::_destroy()
{
@ -193,8 +192,7 @@ std::list<std::shared_ptr<Voice>>::iterator Voice::_destroyVoice(std::list<std::
template <typename T>
static T ApplyVolume(float vol, T samp)
{
/* -10dB to 0dB mapped to full volume range */
return samp * VolumeLUT[int(vol * 65536)];
return samp * 0.5f * vol;
}
void Voice::_procSamplePre(int16_t& samp)

File diff suppressed because it is too large Load Diff