Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Using WaveOutEvent to playback in a cycle

$
0
0

I also experience the problem with the next Play command resulting in PlaybackState == Playing but the audio file is not actually playing.  I am using an event timer to track the progress of the audio file.  If CurrentTime.Ticks is not incrementing, try again.  This happens occasionally and stops my player.  For now I just issue a command to try the track again.

                if (_ticks == AudioRoutines.FileWaveStream.CurrentTime.Ticks && AudioRoutines.Waveplayer.PlaybackState==PlaybackState.Playing)
                {
                    if (_ticks == AudioRoutines.FileWaveStream.TotalTime.Ticks) return;
                    PlayOrderListIndex = PlayOrderListIndex - 1;
                    if (PlayOrderListIndex < 0) PlayOrderListIndex = 0;
                    TrackTimer.Stop();
                    PlayNexttrack();
                    return;
                }
                _ticks = AudioRoutines.FileWaveStream.CurrentTime.Ticks;


Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>