I am trying to get started with XNA and C#. Unfortunately, however, I am having a huge problem making any progress with a small task: accessing and playing music files on my computer.
Currently, I am using XNA with a Windows Forms Application, and in the my main form's Load
event I implemented the following:
private void frmMain_Load(object sender, EventArgs e)
{
using (MediaLibrary library = new MediaLibrary())
{
SongCollection songs = library.Songs;
MessageBox.Show("Songs Count: " + songs.Count.ToString());
}
}
The messagebox shows: Songs Count: 0 no matter what. My understanding is that on windows, my media player has to find the media files in the system before XNA can find them, so I checked with my media player, and all the music files, playlists, and video files were there. Any suggestions?