Adding more effects

This commit is contained in:
2025-10-11 16:47:20 +02:00
parent be7ba5fad8
commit 7f150e8bb4
19 changed files with 2495 additions and 9 deletions

View File

@ -0,0 +1,27 @@
import type { AudioProcessor } from './AudioProcessor';
export class Reverser implements AudioProcessor {
getName(): string {
return 'Reverser';
}
getDescription(): string {
return 'Plays the sound backwards';
}
process(
leftChannel: Float32Array,
rightChannel: Float32Array
): [Float32Array, Float32Array] {
const length = leftChannel.length;
const outputLeft = new Float32Array(length);
const outputRight = new Float32Array(length);
for (let i = 0; i < length; i++) {
outputLeft[i] = leftChannel[length - 1 - i];
outputRight[i] = rightChannel[length - 1 - i];
}
return [outputLeft, outputRight];
}
}