package dt.call.aclient.fdkaac;

/**
 * Created by Daniel on 7/15/17.
 */

public class FdkAAC
{
	static
	{
		System.loadLibrary("fdkaac-aclient");
	}

	//for consistency in java and C, keep the scared numbers in 1 place
	public static native int getWavFrameSize();

	//setup for 32kbit/s stereo @ 44100hz, CBR
	public static native void initEncoder();
	public static native int encode(short[] wav, byte[] aac);
	public static native void closeEncoder();

	public static native void initDecoder();
	public static native int decode(byte[] aac, short[] wav);
	public static native void closeDecoder();
}

@@ -351,151 +351,757 @@
 );%0A%09
-public static native int encode(short%5B%5D wav, byte%5B%5D aac);%0A%09public static native void closeEncoder();%0A%0A%09public static native void initDecoder();
+/**%0A%09 * Encode raw wav into aac%0A%09 * @param wav Raw wave audio. MUST be in stereo 44100Hz. In addition, the %22correct%22 array size should be found out by getWavFrameSize()%0A%09 * @param aac Encoded aac audio from the wave. Should supply a cautiously large buffer.%0A%09 * @return Actual size of the encoded audio.%0A%09 */%0A%09public static native int encode(short%5B%5D wav, byte%5B%5D aac);%0A%09public static native void closeEncoder();%0A%0A%09public static native void initDecoder();%0A%09/**%0A%09 * Decode aac audio into raw wave%0A%09 * @param aac Encoded aac audio. Must be the exact size. No padding at the end.%0A%09 * @param wav Where the raw wave will be dumped into. Should get back the size specified by getWavFrameSize()%0A%09 * @return Decoder errors (if there are any). Otherwise 0%0A%09 */
 %0A%09pu

Document aac native functions.