简体   繁体   中英

PlaylistLoader() not found in NAudio c#

    private void LoadPlaylist(object p)
    {
        var ofd = new OpenFileDialog();
        ofd.Filter = "PLAYLIST files (*.playlist) | *.playlist";
        string abc = ofd.ShowDialog().ToString();
        if (abc == "OK")
        {
            Playlist = new PlaylistLoader().Load(ofd.FileName).ToObservableCollection(); // load the playlist 
        }
    }

I try to implement an Audio Player using NAudio. I use the reference https://www.pluralsight.com/guides/microsoft-net/building-a-wpf-media-player-using-naudio But "PlaylistLoader" class was not found. "Playlist" is an ObservableCollection of type "Track". I try to add audio file to Track object as hadcoded, but failed. Anyone familiar with NAudio please help.

PlaylistLoader is not part of NAudio. It is a helper class created by the author of that article, so you should download the source if available or ask the author to provide code

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM