📄 reverseeffect.pde
字号:
// this is a really straightforward effect that just reverses the order of the samples it receives
// it doesn't sound like how you think ;-)
class ReverseEffect implements AudioEffect
{
void process(float[] samp)
{
float[] reversed = new float[samp.length];
int i = samp.length - 1;
for (int j = 0; j < reversed.length; i--, j++)
{
reversed[j] = samp[i];
}
// we have to copy the values back into samp for this to work
arraycopy(reversed, samp);
}
void process(float[] left, float[] right)
{
process(left);
process(right);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -