cleanup
This commit is contained in:
parent
b3fff0134f
commit
c22c04a6d1
6 changed files with 0 additions and 3019 deletions
|
@ -48,8 +48,6 @@ public class AudioInterface implements Runnable {
|
|||
private final Thread thread;
|
||||
private final List<Command> cmds = Lists.newArrayList();
|
||||
private final short[] volumes = new short[Volume.values().length];
|
||||
// private final int[] mix = new int[Volume.values().length];
|
||||
// private final int[] attn = new int[Volume.values().length];
|
||||
private final Channel[] channels = new Channel[32];
|
||||
|
||||
private SourceDataLine line;
|
||||
|
@ -92,11 +90,9 @@ public class AudioInterface implements Runnable {
|
|||
|
||||
private short generate() {
|
||||
long mix = 0;
|
||||
// long attn = 0; // (32767 * 100) / 95);
|
||||
for(int z = 0; z < this.channels.length; z++) {
|
||||
Channel ch = this.channels[z];
|
||||
if(ch.run) {
|
||||
// attn += (long)ch.level * (long)this.volumes[ch.type]; // (this.attn[ch.type] * 95) / 100;
|
||||
mix += (long)ch.buffer[ch.pos] * (long)ch.level * (((long)this.volumes[ch.type] * (long)this.volumes[0]) / 32767);
|
||||
if(++ch.pos >= ch.buffer.length) {
|
||||
ch.pos = 0;
|
||||
|
@ -105,10 +101,6 @@ public class AudioInterface implements Runnable {
|
|||
}
|
||||
}
|
||||
}
|
||||
// for(int z = 1; z < this.volumes.length; z++) {
|
||||
// if(this.attn[z] > 0)
|
||||
// this.mix[0] += (short)(int)(((this.mix[z] * 32767 / this.attn[z]) * (int)this.volumes[z]) / 32767);
|
||||
// }
|
||||
mix /= 32767L * 32767L;
|
||||
long amp = Math.abs(mix);
|
||||
if(amp > 32767L)
|
||||
|
@ -116,7 +108,6 @@ public class AudioInterface implements Runnable {
|
|||
else if(this.peak > 32767L)
|
||||
this.peak = Math.max(this.peak - 3L, 32767L);
|
||||
return (short)((mix * 32767L) / this.peak);
|
||||
// return attn == 0L ? 0 : (short)(mix / Math.min(attn, 32767L * 32767L * 2L));
|
||||
}
|
||||
|
||||
private void dispatch(Object buf, Cmd op, short addr, int param) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,6 @@ public class MovingSoundMinecart extends MovingSound
|
|||
super(SoundEvent.CART);
|
||||
this.minecart = minecartIn;
|
||||
this.repeat = true;
|
||||
// this.repeatDelay = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,7 +17,6 @@ public class MovingSoundMinecartRiding extends MovingSound
|
|||
this.minecart = minecart;
|
||||
this.attenuationType = false;
|
||||
this.repeat = true;
|
||||
// this.repeatDelay = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,6 @@ public abstract class Sound
|
|||
protected final SoundEvent event;
|
||||
protected Volume type = Volume.SFX;
|
||||
protected float volume = 1.0F;
|
||||
// protected float pitch = 1.0F;
|
||||
protected float xPosF;
|
||||
protected float yPosF;
|
||||
protected float zPosF;
|
||||
|
@ -34,11 +33,6 @@ public abstract class Sound
|
|||
return this.volume;
|
||||
}
|
||||
|
||||
// public float getPitch()
|
||||
// {
|
||||
// return this.pitch;
|
||||
// }
|
||||
|
||||
public float getXPosF()
|
||||
{
|
||||
return this.xPosF;
|
||||
|
|
|
@ -19,7 +19,6 @@ public class SoundManager {
|
|||
private class Source {
|
||||
private final boolean attModel;
|
||||
private final float distOrRoll;
|
||||
// private final short[] buffer;
|
||||
private final int source;
|
||||
|
||||
private float positionX;
|
||||
|
@ -34,7 +33,6 @@ public class SoundManager {
|
|||
this.positionZ = z;
|
||||
this.attModel = attModel;
|
||||
this.distOrRoll = distOrRoll;
|
||||
// this.buffer = buffer;
|
||||
this.volume = volume;
|
||||
this.source = SoundManager.this.getNextChannel(sourcename);
|
||||
updateGain();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue