< prev index next >

src/java.desktop/share/classes/com/sun/media/sound/SoftAbstractResampler.java

Print this page

        

*** 20,29 **** --- 20,30 ---- * * 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,89 **** --- 73,93 ---- 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,142 **** --- 137,147 ---- streampos = -sector_size; nextBuffer(); } + @Override public void setPitch(float pitch) { /* this.pitch = (float) Math.pow(2f, (pitchcorrection + pitch) / 1200.0f) * samplerateconv;
*** 252,261 **** --- 257,267 ---- cbuff[len - i] = x; } } } + @Override public int read(float[][] buffer, int offset, int len) throws IOException { if (eof) return -1;
*** 371,380 **** --- 377,387 ---- current_pitch[0] = this.target_pitch; return len; } + @Override public void close() throws IOException { stream.close(); } }
*** 382,390 **** --- 389,398 ---- 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 >