Main Site Documentation

Music Record


#1

Hi,

I’m using this exact code here to record:

https://www.ghielectronics.com/docs/85/music-module#829

I keep getting this error and wondered if anyone had a solution? It happens after the 60 seconds during which it is meant to be recording. On the SD card the file is created but it is empty.

Any ideas? Thanks.

#### Exception System.IO.IOException - CLR_E_FILE_IO (6) ####
#### Message: 
#### Microsoft.SPOT.IO.NativeFileStream::Write [IP: 0000] ####
#### System.IO.FileStream::Write [IP: 002a] ####
#### Gadgeteer.Modules.GHIElectronics.Music::RecordOggVorbisThreadFunction [IP: 00e3] ####

A first chance exception of type ‘System.IO.IOException’ occurred in Microsoft.SPOT.IO.dll
An unhandled exception of type ‘System.IO.IOException’ occurred in Microsoft.SPOT.IO.dll


#2

The first thing I would try is to format the SD card.


#3

Thanks that works now. Though does it normally take a minute or two before the music module is ready to record? There is atleast 2 minutes before music ready is true.