Jump to content
  • Advertisement
Sign in to follow this  
Zack08

DSound problem with loading a file

This topic is 4845 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!