In this post, I will discuss about DirectSoundOut, AudioFileReader, Mp3FileReader and WaveFileReader class(es) and its methods. Also, discuss about open, initilize, play, pause, stop and dispose the audio file. Of course! These are basic operations of audio file. The DirectSoundOut Class The DirectSoundOut class can initilize, play, pause, stop, dispose the audio files. It is alternate option of WaveOut and WaveOutEvent. See list of methods of DirectSoundOut class. Init() Play() Pause() Stop() Dispose() The AudioFileReader, Mp3FileReader and WaveFileReader Classes The AudioFileReader class can automatically decide if file is wave or mp4. When the WaveFileReader and Mp3FileReader can't. If you try to open wave file using Mp3FileReader then it will give you exception "System.FormatException: 'Not a WAVE file - no RIFF header'". And same, If you try to open mp3 file using WaveFileReader then it will give you exception "System.IO.InvalidDataEx...
Comments
Post a Comment