Exception when readin MP3 from microSD

Yes, I trued multiple files.
The exception generaly occurs on the firts files and some times after a few files

Sounds like a race condition in the driver?


 static void playFile()
        {
            int blockSize = 512;
            int offset = 0;
            byte[] data = new byte[blockSize];
            FileStream fs = new FileStream("\\SD\\test.mp3", FileMode.Open, FileAccess.Read);
            fs.Seek(offset, SeekOrigin.Begin);
 
            int bytesRead = 0;
            while((bytesRead = fs.Read(data, 0, blockSize)) != 0)
            {
 
                FEZ_Shields.MP3.SendData(data);
            }
            fs.Close();
            fs.Dispose();
            fs = null;
 
        }

try this… it works…

[url]http://www.tinyclr.com/forum/2/3280/[/url] or refer this thread…