I want to create the background audio _playlist from a local database table (LINQ). Here's the code in AudioPlayer.cs in the PlaybackAudio project:
private static List<AudioTrack> _playList = new List<AudioTrack> { new AudioTrack( new Uri("Ring01.mp3", UriKind.Relative), "Some song", // can be an empty string if no song title "Some artist", // can be an empty string if no artist name null, // album null // album art ) };
and i want to tansform it in:
private static List<AudioTrack> _playList = from SongsItem song in songsDB.Items select new AudioTrack( new Uri(SongsItem.url, UriKind.Relative), "SongsItem.title", // can be an empty string if no song title "SongsItem.artist", // can be an empty string if no artist name null, // album null // album art );
For that I need to connect the playback audio to a local database. If it isn't possible, can I create the playlist from the main project?