kopia lustrzana https://github.com/jameshball/osci-render
Another interesting rotation
rodzic
9131c5618a
commit
2094d9a926
|
@ -21,11 +21,11 @@ public class AudioPlayer extends Thread {
|
|||
line.rotate(nextTheta(stream.getFormat().mix.rate, 0.000001));
|
||||
|
||||
int framesToDraw = (int) (line.length() * 100);
|
||||
int neg = line.getX1() < line.getX2() || line.getY1() < line.getY2() ? 1 : -1;
|
||||
//int neg = line.getX1() < line.getX2() || line.getY1() < line.getY2() ? 1 : -1;
|
||||
|
||||
for (int c = 0; c < format.outputs; c++) {
|
||||
((float[]) output)[f * format.outputs] = line.getX1() + Math.abs(line.getX2() - line.getX1()) * (float) (neg * framesDrawn) / framesToDraw;
|
||||
((float[]) output)[f * format.outputs + 1] = line.getY1() + Math.abs(line.getY2() - line.getY1()) * (float) (neg * framesDrawn) / framesToDraw;
|
||||
((float[]) output)[f * format.outputs] = line.getX1() + Math.abs(line.getX2() - line.getX1()) * (float) (framesDrawn) / framesToDraw;
|
||||
((float[]) output)[f * format.outputs + 1] = line.getY1() + Math.abs(line.getY2() - line.getY1()) * (float) (framesDrawn) / framesToDraw;
|
||||
}
|
||||
|
||||
framesDrawn++;
|
||||
|
|
Ładowanie…
Reference in New Issue