This project has moved. For the latest updates, please go here.

Sequentially playing problem

Apr 28, 2011 at 6:16 AM

Having used NAudioDemo, I have written NAudioPlayer class which plays back audio file by passing NAudioPlayer::Play(string filename). 

Then I have written another class where I use NAudioPlayer instance and timer for checking if playing stopped and start new playing. So, I have sequentially playing.

When I start application it playing good during some period of time and then hanging.

I have found that it goes to WaveOutBuffer::WriteToWaveOut, but does not go through lock(waveOutLock). 

Could you help me?

 

Apr 28, 2011 at 11:57 AM

I fixed this problem by putting instead of lock operator Monitor.TryEnter

Coordinator
Apr 29, 2011 at 8:36 AM

when it hangs, what is happening on other threads? Are you using the latest NAudio code?

May 12, 2011 at 1:20 PM

I used rev. 72238.

Other threads worked normally.

Coordinator
May 12, 2011 at 2:04 PM

what I mean is, in the Visual Studio debugger, you can look at the threads window. that will show you which other thread has taken the waveOutLock and you can see what waveOut API it is hanging on.

Mark