new to NAudio. having issues

if i run this function, skip to the next song and then run it again the song wont play unless the last one was paused or stopped.
i have absolutely no idea why this is happening but i believe i've narrowed it down to some issue with NAudio, specifically this section of my code:
            if (audioFile == null || audioFile.FileName != currentPath)
            {
                outputDevice?.Stop(); // Clean up any existing resources

                audioFile = new AudioFileReader(currentPath);
                audioFile.CurrentTime = playbackTime;

                outputDevice = new WaveOutEvent();
                outputDevice.Init(audioFile);
                outputDevice.PlaybackStopped += OnPlaybackStopped;
            }
Was this page helpful?