private String thePath; // Path of this file // ------------------------------------------------------------------------------------------ /// <summary> /// Constructor /// </summary> /// <param name="path">Path of the file to be parsed</param> public AudioFileReader(String path) { thePath = path; theFactory = AudioReaderFactory.GetInstance(); audioData = theFactory.GetDataReader(path); metaData = theFactory.GetMetaReader(path, audioData); }
// Codec IDs //public const int CID_NONE = -1; //public const int CID_MP3 = 0; //public const int CID_OGG = 1; //public const int CID_MPC = 2; //public const int CID_FLAC = 3; //public const int CID_APE = 4; //public const int CID_WMA = 5; //public const int CID_MIDI = 6; //public const int CID_AAC = 7; //public const int CID_AC3 = 8; //public const int CID_OFR = 9; //public const int CID_WAVPACK = 10; //public const int CID_WAV = 11; //public const int CID_PSF = 12; //public const int CID_SPC = 13; //public const int CID_DTS = 14; //public const int CID_VQF = 15; //public const int NB_CODECS = 16; // ------------------------------------------------------------------------------------------ /// <summary> /// Gets the instance of this factory (Singleton pattern) /// </summary> /// <returns>Instance of the AudioReaderFactory of the application</returns> public static AudioReaderFactory GetInstance() { if (null == theFactory) { theFactory = new AudioReaderFactory(); } return theFactory; }
// Codec IDs //public const int CID_NONE = -1; //public const int CID_MP3 = 0; //public const int CID_OGG = 1; //public const int CID_MPC = 2; //public const int CID_FLAC = 3; //public const int CID_APE = 4; //public const int CID_WMA = 5; //public const int CID_MIDI = 6; //public const int CID_AAC = 7; //public const int CID_AC3 = 8; //public const int CID_OFR = 9; //public const int CID_WAVPACK = 10; //public const int CID_WAV = 11; //public const int CID_PSF = 12; //public const int CID_SPC = 13; //public const int CID_DTS = 14; //public const int CID_VQF = 15; //public const int NB_CODECS = 16; // ------------------------------------------------------------------------------------------ /// <summary> /// Gets the instance of this factory (Singleton pattern) /// </summary> /// <returns>Instance of the AudioReaderFactory of the application</returns> public static AudioReaderFactory GetInstance() { if (null == theFactory) { theFactory = new AudioReaderFactory(); } return(theFactory); }