/** Ultra-wideband initialisation */ public void uwbinit() { lowenc = new SbEncoder(); ((SbEncoder) lowenc).wbinit(); // Initialize SubModes super.uwbinit(); // Initialize variables init(320, 80, 8, 1280, .7f); uwb = true; nb_modes = 2; sampling_rate = 32000; }
/** Wideband initialisation */ public void wbinit() { lowenc = new NbEncoder(); ((NbEncoder) lowenc).nbinit(); // Initialize SubModes super.wbinit(); // Initialize variables init(160, 40, 8, 640, .9f); uwb = false; nb_modes = 5; sampling_rate = 16000; }
/** * Initialisation * * @param frameSize * @param subframeSize * @param lpcSize * @param bufSize * @param foldingGain */ public void init( final int frameSize, final int subframeSize, final int lpcSize, final int bufSize, final float foldingGain) { super.init(frameSize, subframeSize, lpcSize, bufSize, foldingGain); complexity = 3; // in C it's 2 here, but set to 3 automatically by the encoder vbr_enabled = 0; // disabled by default vad_enabled = 0; // disabled by default abr_enabled = 0; // disabled by default vbr_quality = 8; submodeSelect = submodeID; x1d = new float[frameSize]; h0_mem = new float[QMF_ORDER]; buf = new float[windowSize]; swBuf = new float[frameSize]; res = new float[frameSize]; target = new float[subframeSize]; window = Misc.window(windowSize, subframeSize); lagWindow = Misc.lagWindow(lpcSize, lag_factor); rc = new float[lpcSize]; autocorr = new float[lpcSize + 1]; lsp = new float[lpcSize]; old_lsp = new float[lpcSize]; interp_lsp = new float[lpcSize]; interp_lpc = new float[lpcSize + 1]; bw_lpc1 = new float[lpcSize + 1]; bw_lpc2 = new float[lpcSize + 1]; mem_sp2 = new float[lpcSize]; mem_sw = new float[lpcSize]; abr_count = 0; }