It sounds like a simple question, but I cant figure it out.
I am playing a wav file using Naudio (I am initiating the WaveOut object with the path of the file).
The Pause and Play works fine
The problem - when I try to stop (pause and return to the begining of the file) - it just pauses the file (like Pause).
Here is my code:
public class FilePlayer
{
private WaveFileReader waveFileReader;
protected static WaveFormat _waveFormat = new WaveFormat(8000, 16, 1);
protected IWavePlayer _waveout = new WaveOut(WaveCallbackInfo.FunctionCallback());
public FilePlayer(string path)
{
try
{
waveFileReader = new WaveFileReader(path);
_waveout.Init(waveFileReader);
}
catch (Exception)
{
}
}
public void PlayCall()
{
try
{
_waveout.Play();
}
catch
{ }
}
public void PauseCall()
{
_waveout.Pause();
}
public void StopCall()
{
_waveout.Stop();
}
}
Any help? thnaks!