added AudioBuffer
This commit is contained in:
parent
87b3faaa81
commit
f96b2802f6
|
@ -0,0 +1,28 @@
|
|||
package com.danitheskunk.skunkworks.audio;
|
||||
|
||||
public class AudioBuffer {
|
||||
private double[] left;
|
||||
private double[] right;
|
||||
|
||||
public AudioBuffer(int size) {
|
||||
left = new double[size];
|
||||
right = new double[size];
|
||||
}
|
||||
|
||||
public int getSize() {
|
||||
return left.length;
|
||||
}
|
||||
|
||||
public void setSample(int pos, double left, double right) {
|
||||
this.left[pos] = left;
|
||||
this.right[pos] = right;
|
||||
}
|
||||
|
||||
public double getLeft(int pos) {
|
||||
return left[pos];
|
||||
}
|
||||
|
||||
public double getRight(int pos) {
|
||||
return right[pos];
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue