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); }
// ------------------------------------------------------------------------------------------ /// <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); }