Normalize WAV volume
This commit is contained in:
parent
81142c0ef0
commit
f5a36a08bd
@ -79,6 +79,13 @@ const Color INSTRUMENT_COLORS[MAX_INSTRUMENT_TYPES] = {
|
||||
{255, 200, 80, 255}, // yellow
|
||||
};
|
||||
|
||||
const float INSTRUMENT_VOLUME[MAX_INSTRUMENT_TYPES] = {
|
||||
0.4f,
|
||||
0.6f,
|
||||
1.0f,
|
||||
0.7f
|
||||
};
|
||||
|
||||
const char* const INSTRUMENT_LANE_WAV[MAX_INSTRUMENT_TYPES][LANE_COUNT * OCTAVE_COUNT] {
|
||||
{ // Instrument 0 - Synth
|
||||
"assets/sounds/snes_synth/snes_synth_048.wav", "assets/sounds/snes_synth/snes_synth_049.wav",
|
||||
@ -649,6 +656,7 @@ public:
|
||||
if (song_time >= it->play_time)
|
||||
{
|
||||
Sound s = note_sounds[it->instrument_slot][it->octave];
|
||||
SetSoundVolume(s, INSTRUMENT_VOLUME[it->instrument_slot]);
|
||||
PlaySound(s);
|
||||
note_sounds_playing[it->lane][it->instrument_slot].push_back(s);
|
||||
float sustain_sec = std::max(it->duration_sec, time_per_glyph_height);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user