The MediaLibrary class is a api to access MediaFiles on the phone (Pictures, Music, ...) you can access the song-collection with the following snippet:
using(MediaLibrary library = new MediaLibrary())
{
foreach(var song in library.Songs)
{
Debug.WriteLine("Name: " + song.Name);
Debug.WriteLine("Artist: " + song.Artist.Name);
Debug.WriteLine("Album: " + song.Album.Name);
}
}
You can also play a song:
MediaPlayer.Play(song);
Reference the Microsoft.Xna.Framework.Media in your Project and make sure you dispose the MediaLibrary after your access.