I am pretty new to XNA, and I have been trying to figure this problem out for a while now.. Needless to say, I couldn't (hence the question!!)
I've been trying to use XNA to mess around with audio, and it seems to work well. However, there are a few songs that dont get played, although all the music files that I am trying to play are in MP3 format.
The results of the simple testing I've done were as follows (assuming "SongB" is the song that doesn't plays)
- MediaPlayer.Play(SongA) --> Works
- MediaPlayer.Play(SongB) --> No sound
- MediaPlayer.Play(SongC) --> Works
if I had a list which had the songs listed, and a program that plays the next song when "next()" is called:
int playingIdx = 0;
SongList[0] = SongA;
SongList[1] = SongB;
SongList[2] = SongC;
void next()
{
PlayingIdx++;
MediaPlayer.Play(SongList[PlayingIdx]);
}
Then when PlayingIdx = 1, SongB is skipped, and the program plays SongC. Did anyone encounter something similar? Or is there a certain type of MP3 that XNA can play?
MediaPlayer.Play(SongsList[1])
and the code segmentMediaPlayer.Play(SongsList[2])
both result in playing SongC – Osama Ennasr