< prev index next >
src/java.desktop/share/classes/com/sun/media/sound/SoftAbstractResampler.java
Print this page
@@ -20,10 +20,11 @@
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+
package com.sun.media.sound;
import java.io.IOException;
import java.util.Arrays;
@@ -72,18 +73,21 @@
pad2 = getPadding() * 2;
ibuffer = new float[2][sector_size + pad2];
ibuffer_order = true;
}
+ @Override
public void noteOn(MidiChannel channel, VoiceStatus voice,
int noteNumber, int velocity) {
}
+ @Override
public void noteOff(int velocity) {
noteOff_flag = true;
}
+ @Override
public void open(ModelWavetable osc, float outputsamplerate)
throws IOException {
eof = false;
nrofchannels = osc.getChannels();
@@ -133,10 +137,11 @@
streampos = -sector_size;
nextBuffer();
}
+ @Override
public void setPitch(float pitch) {
/*
this.pitch = (float) Math.pow(2f,
(pitchcorrection + pitch) / 1200.0f)
* samplerateconv;
@@ -252,10 +257,11 @@
cbuff[len - i] = x;
}
}
}
+ @Override
public int read(float[][] buffer, int offset, int len)
throws IOException {
if (eof)
return -1;
@@ -371,10 +377,11 @@
current_pitch[0] = this.target_pitch;
return len;
}
+ @Override
public void close() throws IOException {
stream.close();
}
}
@@ -382,9 +389,10 @@
public abstract void interpolate(float[] in, float[] in_offset,
float in_end, float[] pitch, float pitchstep, float[] out,
int[] out_offset, int out_end);
+ @Override
public final SoftResamplerStreamer openStreamer() {
return new ModelAbstractResamplerStream();
}
}
< prev index next >