package Audio;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Pointer;

import Audio.Bass.BASS_FILEPROCS;
import Audio.Bass.DOWNLOADPROC;

/**
 * BASS AAC Library
 * @author rdkartono
 *
 */
@SuppressWarnings("unused")
public interface BassAAC extends Library {

	BassAAC Instance = (BassAAC) Native.load("bass_aac",BassAAC.class);
	interface Constant{
		// additional error codes returned by BASS_ErrorGetCode
		int BASS_ERROR_MP4_NOSTREAM = 6000; // non-streamable due to MP4 atom order ("mdat" before "moov")

		// Additional BASS_SetConfig options
		int BASS_CONFIG_MP4_VIDEO = 0x10700; // play the audio from MP4 videos
		int BASS_CONFIG_AAC_MP4 = 0x10701; // support MP4 in BASS_AAC_StreamCreateXXX functions (no need for BASS_MP4_StreamCreateXXX)
		int BASS_CONFIG_AAC_PRESCAN	= 0x10702; // pre-scan ADTS AAC files for seek points and accurate length

		// Additional BASS_AAC_StreamCreateFile/etc flags
		int BASS_AAC_FRAME960 = 0x1000; // 960 samples per frame
		int BASS_AAC_STEREO = 0x400000; // downmatrix to stereo

		// BASS_CHANNELINFO type
		int BASS_CTYPE_STREAM_AAC = 0x10b00; // AAC
		int BASS_CTYPE_STREAM_MP4 = 0x10b01; // AAC in MP4
	}
	
	
	int BASS_AAC_StreamCreateFile(String file, long offset, long length, int flags);
	int BASS_AAC_StreamCreateFile(Pointer file, long offset, long length, int flags);
	int BASS_AAC_StreamCreateURL(String url, int offset, int flags, DOWNLOADPROC proc, Pointer user);
	int BASS_AAC_StreamCreateFileUser(int system, int flags, BASS_FILEPROCS procs, Pointer user);
	int BASS_MP4_StreamCreateFile(String file, long offset, long length, int flags);
	int BASS_MP4_StreamCreateFile(Pointer file, long offset, long length, int flags);
	int BASS_MP4_StreamCreateFileUser(int system, int flags, BASS_FILEPROCS procs, Pointer user);
}
