code cleanup: pass voice_t wvoice as a parameter to Wavegen() instead of using a

global
This commit is contained in:
Juho Hiltunen
2020-07-21 12:39:41 +03:00
parent 3b4cca4832
commit 992745508e
+2 -2
View File
@@ -681,7 +681,7 @@ static int ApplyBreath(void)
return value;
}
static int Wavegen(int length, int modulation, bool resume, frame_t *fr1, frame_t *fr2)
static int Wavegen(int length, int modulation, bool resume, frame_t *fr1, frame_t *fr2, voice_t *wvoice)
{
if (resume == false)
SetSynth(length, modulation, fr1, fr2, wvoice);
@@ -1335,7 +1335,7 @@ static int WavegenFill2()
wdata.n_mix_wavefile = 0; // ... and drop through to WCMD_SPECT case
case WCMD_SPECT:
echo_complete = echo_length;
result = Wavegen(length & 0xffff, q[1] >> 16, resume, (frame_t *)q[2], (frame_t *)q[3]);
result = Wavegen(length & 0xffff, q[1] >> 16, resume, (frame_t *)q[2], (frame_t *)q[3], wvoice);
break;
#ifdef INCLUDE_KLATT
case WCMD_KLATT2: // as WCMD_SPECT but stop any concurrent wave file