This topic is now archived and is closed to further replies.


more DAudio problems

Recommended Posts

I got rid of all the other problems by re-typing everything in (weird?) but now when i try to load a midi, i get an unhandled exception return code 0x000005 or something. Anyway the problem is in this line:
m_pSegment->SetParam(GUID_StandardMIDIFile, 0xFFFFFFFF,0,0,NULL); 
Is it normal to have this failed? Am i forgetting to do something silly? let me post the loading code..
// In my program in WINMAIN I have a pointer to a CMidiMusic

// object called "pDirectDraw"...


// Now here is the function

int CMidiMusic::LoadMidiFromFile(LPCSTR szMidi,BOOL bMidiFile)
	WCHAR wstrMidi[256];

	// If exists a segment before, then release it

	if (m_pSegment) 
    // Converts ANSI (8-bits) to the UNICODE (16-bit) string

	// Then load it into the segment

							 (LPVOID*) &m_pSegment);

    // In case it is a midi file mark it is a standard midi file

	if (bMidiFile)
		m_pSegment->SetParam(GUID_StandardMIDIFile, 0xFFFFFFFF,0,0,NULL);          
	// Finally, download band data to the performance  


	return (TRUE);
sorry it is long but I''m stuck, and it wont let me put directmusic in debug mode for some reason..

Share this post

Link to post
Share on other sites