Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Edited Issue: PlaybackStopped is not triggered when playback completed [16358]

$
0
0
Here is the code for using PlaybackStopped event, in a buttonPlayClicked event:

wfr = new NAudio.Wave.WaveFileReader(this.outputFilename);
audioOutput = new DirectSoundOut();
WaveChannel32 wc = new NAudio.Wave.WaveChannel32(wfr);
audioOutput.Init(wc);
audioOutput.PlaybackStopped += new EventHandler<StoppedEventArgs>(audioOutput_PlaybackStopped);
audioOutput.Play();

I noticed that PlaybackStopped event is not triggered when playback completed, unless I calling audioOutput.Stop() method.

This issue apply to DirectSoundOut/WaveOut.

I am using windows 7 64bits, VS2010, tested on standard wave file, please check out attachments for details.

Thanks.

Viewing all articles
Browse latest Browse all 738

Trending Articles