Advertisement Jump to content
Sign in to follow this  
Petar Titelski

CSound: Reset, Play, Repeat.

This topic is 4671 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

When I play sound in game many times, it mutes after a while. (for example, program plays sound repeatedly while enter is pressed) Anyone has any ideas?
CSoundManager*	g_pSoundManager1 = NULL;
CSound*		g_Sound1 = NULL;

g_pSoundManager1 = new CSoundManager();
g_pSoundManager1->Initialize( DXUTGetHWND(), DSSCL_PRIORITY );
g_pSoundManager1->SetPrimaryBufferFormat( 2, 22050, 16 );
LPWSTR soundFileName = L"Media\\Sounds\\gun1.wav";
g_pSoundManager1->Create( &g_Sound1, soundFileName, 0, GUID_NULL );

// Game Loop

(if FAILED(hr) initialization checks are removed for simplicity) [Edited by - Petar Titelski on March 29, 2006 5:03:09 AM]

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!