Jump to content
  • Advertisement

Archived

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

johnnyBravo

How to be able to set volume of current sound?

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

Ive got my directsound8 wrapper... and im trying to add a volume control for my play function eg play(long volume){}; But when i change the value between 0 to -10000 nothing happens to the sound. Ive got the directsound class that initialises with primary buffer etc, with this code
DSBUFFERDESC dsbd;
ZeroMemory( &dsbd, sizeof(DSBUFFERDESC) );
dsbd.dwSize        = sizeof(DSBUFFERDESC);
dsbd.dwFlags       = DSBCAPS_CTRLVOLUME|DSBCAPS_PRIMARYBUFFER;
dsbd.dwBufferBytes = 0;
dsbd.lpwfxFormat   = NULL;
m_pDS->CreateSoundBuffer( &dsbd, &pDSBPrimary, NULL ) ;
and ive got my wave class which loads and plays sound,---heres the code im trying to set volume
m_apDSBuffer->SetVolume( -10000);
nothing happens tho What to do ?

Share this post


Link to post
Share on other sites
Advertisement

  • 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!