Advertisement Jump to content
Sign in to follow this  

DSound problem with loading a file

This topic is 4916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've some problems loading a sound through a function :
VOID LoadSound( IDirectMusicSegment8 *S_Segment, WCHAR* Filename )

	if( FAILED( g_pLoader->LoadObjectFromFile( CLSID_DirectMusicSegment, // identificateur de classe
								   IID_IDirectMusicSegment8, // ID de l'interface.
								   Filename, // nom du fichier
								   (LPVOID*) S_Segment ) ) ) // Pt. vers l'interface
		MessageBox( NULL, "Fichier non trouvé !", 
                          "DirectX Audio: Erreur", MB_OK );

	S_Segment->Download( g_pPerformance ); 
I'm doing this before calling the render function : IDirectMusicSegment8 *S_Raquette = NULL; IDirectMusicSegment8 *S_Brique = NULL; ... LoadSound( S_Raquette, L"raquette.wav" ); LoadSound( S_Brique, L"brique.wav" ); Where's the problem ?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!