reverseeffect.pde
来自「This is processing for java examples.」· PDE 代码 · 共 24 行
PDE
24 行
// 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 + =
减小字号Ctrl + -
显示快捷键?