void CMixer::UpdateSettings(int LowCut, int HighCut, int HighDamp, float OverallVol) { float Volume = OverallVol * GetAttenuation(); // Blip-buffer filtering BlipBuffer.bass_freq(LowCut); blip_eq_t eq(-HighDamp, HighCut, m_iSampleRate); Synth2A03SS.treble_eq(eq); Synth2A03TND.treble_eq(eq); SynthVRC6.treble_eq(eq); SynthMMC5.treble_eq(eq); SynthS5B.treble_eq(eq); // N163 special filtering double n163_treble = 24; long n163_rolloff = 12000; if (HighDamp > n163_treble) n163_treble = HighDamp; if (n163_rolloff > HighCut) n163_rolloff = HighCut; blip_eq_t eq_n163(-n163_treble, n163_rolloff, m_iSampleRate); SynthN163.treble_eq(eq_n163); // FDS special filtering (TODO fix this for high sample rates) blip_eq_t fds_eq(-48, 1000, m_iSampleRate); SynthFDS.treble_eq(fds_eq); // Volume levels Synth2A03SS.volume(Volume * m_fLevelAPU1); Synth2A03TND.volume(Volume * m_fLevelAPU2); SynthVRC6.volume(Volume * 3.98333f * m_fLevelVRC6); SynthFDS.volume(Volume * 1.00f * m_fLevelFDS); SynthMMC5.volume(Volume * 1.18421f * m_fLevelMMC5); // Not checked SynthN163.volume(Volume * 1.1f * m_fLevelN163); //SynthS5B.volume(Volume * 1.0f); m_iLowCut = LowCut; m_iHighCut = HighCut; m_iHighDamp = HighDamp; m_fOverallVol = OverallVol; }
void CMixer::SetNamcoVolume(float fVol) { float fVolume = fVol * m_fOverallVol * GetAttenuation(); SynthN163.volume(fVolume * 1.1f * m_fLevelN163); }
//////////////////////////////////////////////////////////// /// Get the attenuation factor of a a //////////////////////////////////////////////////////////// float sfMusic_GetAttenuation(sfMusic* Music) { CSFML_CALL_RETURN(Music, GetAttenuation(), 0.f); }