private void silent(ByteArray target, int length) { target.position = 0; while (length > 0) { length--; target.writeFloat(0.0); target.writeFloat(0.0); } }
public void supplyFile(string path, ByteArray data) { }
/** * This methods extracts audio data from the mp3 and wraps it automatically with respect to encoder delay * * @param target The ByteArray where to write the audio data * @param length The amount of samples to be read */ private void extract(ByteArray target, int length) { while (0 < length) { if (samplesPosition + length > samplesTotal) { var read = samplesTotal - samplesPosition; mp3.extract(target, read, samplesPosition + MAGIC_DELAY); samplesPosition += read; length -= read; } else { mp3.extract(target, length, samplesPosition + MAGIC_DELAY); samplesPosition += length; length = 0; } if (samplesPosition == samplesTotal) // END OF LOOP > WRAP { samplesPosition = 0; } } }