/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* 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.
*/
/**
* Abstract resampler class.
*
* @author Karl Helgason
*/
boolean stream_eof = false;
int loopmode;
float loopstart;
float looplen;
float target_pitch;
boolean started;
boolean eof;
boolean markset = false;
boolean noteOff_flag = false;
float[][] ibuffer;
boolean ibuffer_order = true;
float[] sbuffer;
int pad;
int pad2;
pad = getPadding();
ibuffer_order = true;
}
int noteNumber, int velocity) {
}
noteOff_flag = true;
}
throws IOException {
eof = false;
}
streampos = 0;
stream_eof = false;
sector_pos = 0;
if (sector_loopstart < 0)
sector_loopstart = 0;
started = false;
if (loopmode != 0) {
markset = false;
} else
markset = true;
// loopmode = 0;
ibuffer_order = true;
loopdirection = true;
noteOff_flag = false;
for (int i = 0; i < nrofchannels; i++)
eof = false;
sector_pos = -1;
streampos = -sector_size;
nextBuffer();
}
/*
this.pitch = (float) Math.pow(2f,
(pitchcorrection + pitch) / 1200.0f)
* samplerateconv;
*/
if (!started)
}
if (markset) {
// reset to target sector
// and go one sector backward
sector_pos -= 1;
streampos -= sector_size;
stream_eof = false;
}
}
if (stream_eof) {
eof = true;
return;
}
}
sector_pos += skips;
}
if (!markset) {
markset = true;
}
}
sector_pos++;
streampos += sector_size;
for (int c = 0; c < nrofchannels; c++) {
for (int i = 0; i < pad2; i++)
}
int ret;
if (nrofchannels == 1)
else {
if (sret == -1)
ret = -1;
else {
for (int i = 0; i < nrofchannels; i++) {
int ix = i;
int ix_step = nrofchannels;
}
}
}
if (ret == -1) {
ret = 0;
stream_eof = true;
for (int i = 0; i < nrofchannels; i++)
return;
}
if (ret != sector_size) {
for (int i = 0; i < nrofchannels; i++)
}
ibuffer_order = true;
}
}
public void reverseBuffers() {
for (int c = 0; c < nrofchannels; c++) {
for (int i = 0; i < len2; i++) {
float x = cbuff[i];
}
}
}
throws IOException {
if (eof)
return -1;
if (noteOff_flag)
if (loopdirection)
loopmode = 0;
float[] current_pitch = this.current_pitch;
started = true;
if (!loopdirection)
nextBuffer();
if (!loopdirection) {
// If we are in backward playing part of pingpong
// or reverse loop
// Ping pong loop, change loopdirection
loopdirection = true;
continue;
}
continue;
}
}
if (ibuffer_order != loopdirection)
ixend++;
for (int i = 0; i < nrofchannels; i++) {
}
}
ixend--;
if (eof) {
}
continue;
}
if (loopmode != 0) {
// Ping pong or revese loop, change loopdirection
loopdirection = false;
continue;
}
continue;
}
}
}
if (ibuffer_order != loopdirection)
for (int i = 0; i < nrofchannels; i++) {
}
}
if (eof) {
}
}
return len;
}
}
}
public abstract int getPadding();
int[] out_offset, int out_end);
return new ModelAbstractResamplerStream();
}
}