--- old/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java 2016-08-12 17:01:58.000000000 +0300 +++ new/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java 2016-08-12 17:01:58.000000000 +0300 @@ -22,14 +22,16 @@ * 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.io.InputStream; + import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; -import javax.sound.sampled.AudioFormat.Encoding; /** * Wavetable oscillator for pre-loaded data. @@ -52,6 +54,7 @@ bigendian = format.isBigEndian(); } + @Override public int read(byte[] b, int off, int len) throws IOException { int avail = available(); if (avail <= 0) @@ -82,6 +85,7 @@ return len; } + @Override public long skip(long n) throws IOException { int avail = available(); if (avail <= 0) @@ -93,10 +97,12 @@ return super.skip(n); } + @Override public int read(byte[] b) throws IOException { return read(b, 0, b.length); } + @Override public int read() throws IOException { byte[] b = new byte[1]; int ret = read(b, 0, 1); @@ -105,19 +111,23 @@ return 0 & 0xFF; } + @Override public boolean markSupported() { return true; } + @Override public int available() throws IOException { return (int)buffer.capacity() + (int)buffer8.capacity() - pos - pos2; } + @Override public synchronized void mark(int readlimit) { markpos = pos; markpos2 = pos2; } + @Override public synchronized void reset() throws IOException { pos = markpos; pos2 = markpos2; @@ -189,6 +199,7 @@ return format; } + @Override public AudioFloatInputStream openStream() { if (buffer == null) return null; @@ -230,16 +241,19 @@ (int)buffer.arrayOffset(), (int)buffer.capacity()); } + @Override public int getChannels() { return getFormat().getChannels(); } + @Override public ModelOscillatorStream open(float samplerate) { // ModelWavetableOscillator doesn't support ModelOscillatorStream return null; } // attenuation is in cB + @Override public float getAttenuation() { return attenuation; } @@ -248,6 +262,7 @@ this.attenuation = attenuation; } + @Override public float getLoopLength() { return loopLength; } @@ -256,6 +271,7 @@ this.loopLength = loopLength; } + @Override public float getLoopStart() { return loopStart; } @@ -268,10 +284,12 @@ this.loopType = loopType; } + @Override public int getLoopType() { return loopType; } + @Override public float getPitchcorrection() { return pitchcorrection; }