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

Commented 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.
Comments: May I delete this issue? I found solution for this problem, I should set PadWithZeroes = false; ref: http://stackoverflow.com/questions/11272872/naudio-how-to-tell-playback-is-completed

Viewing all articles
Browse latest Browse all 738

Trending Articles