Music Module throwing exceptions

I have a basic app, 2 audio files. I click 1 button file play, click the other one and I get an exception.

Locating source for ‘C:\Gadgeteer SVN\Main\Modules\GHIElectronics\Music\Software\Music\Music_42\Music_42.cs’. Checksum: MD5 {f3 2c b4 ff d2 24 a8 b1 93 3 c6 91 6a 84 16 b4}
The file ‘C:\Gadgeteer SVN\Main\Modules\GHIElectronics\Music\Software\Music\Music_42\Music_42.cs’ does not exist.
Looking in script documents for ‘C:\Gadgeteer SVN\Main\Modules\GHIElectronics\Music\Software\Music\Music_42\Music_42.cs’…
Looking in the projects for ‘C:\Gadgeteer SVN\Main\Modules\GHIElectronics\Music\Software\Music\Music_42\Music_42.cs’.
The file was not found in a project.
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src’…
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc’…
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl’…
Looking in directory ‘C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include’…
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Gadgeteer SVN\Main\Modules\GHIElectronics\Music\Software\Music\Music_42\Music_42.cs.
The debugger could not locate the source file ‘C:\Gadgeteer SVN\Main\Modules\GHIElectronics\Music\Software\Music\Music_42\Music_42.cs’.

private byte[] song = null;
private byte[] testWav = null;


// This method is run when the mainboard is powered up or reset.   
void ProgramStarted()
{
	Debug.Print("Program Started");

	button.ButtonPressed += button_ButtonPressed;
	button1.ButtonPressed += button1_ButtonPressed;

	music.musicFinished += music_musicFinished;

	music.SetVolume(255);
	song = Resources.GetBytes(Resources.BinaryResources.trombone);

	testWav = Resources.GetBytes(Resources.BinaryResources.CarDestroy_01);			
}

void button1_ButtonPressed(Button sender, Button.ButtonState state)
{
	Debug.Print("2 " + DateTime.Now);
	music.StopPlaying();
	music.Play(testWav);
}

void button_ButtonPressed(Button sender, Button.ButtonState state)
{
	Debug.Print("1 " + DateTime.Now);
	music.StopPlaying();
			
	music.Play(song);
}

void music_musicFinished(GTM.GHIElectronics.Music sender)
{
	Debug.Print("Ending" + DateTime.Now);
}

Looks like you have resolved the issue on your own. I would like to suggest to change this thread as not a question one.

How is this issue resolved? Playing 2 files at the same time causes an unhandled exception.

Sorry, I have misunderstood the problem. What does the exception say?

You want to play them both simultaneously? You can’t. This is not Windows :slight_smile:

All the driver does is forward the MP3 stream to the decoder chip, where this chip is capable of decoding a single MP3 stream (or other formats like WMA)

Thanks Gus for the response!