Skip to content

Commit

Permalink
fix(build): rename shadowing variable in DmSynth_sendBandUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Apr 29, 2024
1 parent 8b8b4ef commit 3ac0857
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void DmSynth_sendBandUpdate(DmSynth* slf, DmBand* band) {
for (size_t i = 0; i < band->instrument_count; ++i) {
DmInstrument* ins = &band->instruments[i];

tsf* tsf = NULL;
DmResult rv = DmSynth_createTsfForInstrument(ins, &tsf);
tsf* t = NULL;
DmResult rv = DmSynth_createTsfForInstrument(ins, &t);
if (rv != DmResult_SUCCESS) {
slf->channels[ins->channel].synth = NULL;
continue;
Expand All @@ -102,12 +102,12 @@ void DmSynth_sendBandUpdate(DmSynth* slf, DmBand* band) {
float pan = (ins->flags & DmInstrument_PAN) ? (float) ins->pan / DmInt_MIDI_MAX : DmInt_PAN_CENTER;
float vol = (ins->flags & DmInstrument_VOLUME) ? (float) ins->volume / DmInt_MIDI_MAX : DmInt_VOLUME_MAX;

bool res = tsf_channel_set_pan(tsf, 0, pan);
bool res = tsf_channel_set_pan(t, 0, pan);
if (!res) {
Dm_report(DmLogLevel_ERROR, "DmSynth: tsf_channel_set_pan encountered an error.");
}

slf->channels[ins->channel].synth = tsf;
slf->channels[ins->channel].synth = t;
slf->channels[ins->channel].pitch_bend_reset = DmInt_PITCH_BEND_NEUTRAL;
slf->channels[ins->channel].volume = vol;
slf->channels[ins->channel].volume_reset = vol;
Expand Down

0 comments on commit 3ac0857

Please sign in to comment.