misaligment fixes

This commit is contained in:
nillerusr
2022-05-15 21:09:59 +03:00
parent 1218fa659c
commit 3a73624b7e
39 changed files with 7592 additions and 6056 deletions

View File

@@ -166,7 +166,7 @@ void GenerateSquareWaveEffect( RumbleWaveform_t *pWaveform, const WaveGenParams_
while( i < NUM_WAVE_SAMPLES )
{
for( j = 0 ; j < steps ; j++ )
for( j = 0 ; j < steps && i < NUM_WAVE_SAMPLES; j++ )
{
if( params.leftChannel )
{
@@ -177,7 +177,7 @@ void GenerateSquareWaveEffect( RumbleWaveform_t *pWaveform, const WaveGenParams_
pWaveform->amplitude_right[i++] = params.minAmplitude;
}
}
for( j = 0 ; j < steps ; j++ )
for( j = 0 ; j < steps && i < NUM_WAVE_SAMPLES; j++ )
{
if( params.leftChannel )
{