Turhaksi jäänyt if ehto pois.
This commit is contained in:
@ -184,11 +184,7 @@ int __cdecl main(int argc, char* argv[])
|
||||
compute_fft(fft_input, fft_output);
|
||||
|
||||
// Normalize output
|
||||
for (int i = 0; i < (FFT_SIZE / 2); i++)
|
||||
{
|
||||
//maximum = max(fft_output[i], maximum);
|
||||
//fft_output[i] = fft_output[i] / maximum;
|
||||
if (i < (FFT_SIZE / 4)) // Limit uniform fft size. High frequencys contain nothing interesing.
|
||||
for (int i = 0; i < (FFT_SIZE / 4); i++)
|
||||
{
|
||||
float gain = 50.0f;
|
||||
float alpha = 0.15f; // "Hidastaa" FFT:n piikkej<65>
|
||||
@ -198,7 +194,6 @@ int __cdecl main(int argc, char* argv[])
|
||||
// s(t) = alpha*x(t)+(1-alpha)*s(t-1)
|
||||
fft_uniform[i] = (x_t < threshhold) ? 0.f : alpha*(x_t) + (1-alpha)*fft_uniform[i];
|
||||
}
|
||||
}
|
||||
|
||||
syncs[0] = (float)playCursor / (SU_SAMPLE_RATE * SU_CHANNEL_COUNT * SU_SAMPLE_SIZE); // Aika sekunteina.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user