March 10, 200521 yr After downloading an excellent tutorial pack from http://jcboliveira.flysplash.org/' target="_blank">Jos
March 10, 200521 yr In the Initialization and Buffer Creation functions in the sound source file, you need to make sure the DSBCAPS_CTRLVOLUME flag is set.You need a line that will look something like:dsbd.dwFlags |= DSBCAPS_CTRLVOLUME | DSBCAPS_LOCSOFTWARE;Doug
May 22, 200620 yr Sorry to drag up an Oooold thread, but I have exactly the same problem.I'll freely admit to being pretty inept at "C" programming, but I can make sounds loop, etc... but I just can't get the "ChangeVolume" command to work. I assume that the solution mentioned above is about adding the line to the Sound.cpp file? And my understanding is that if you're using makefile, nmake etc, to generate a "C" file as opposed to C++, that file isn't involved? Or have I got my wires crossed?Thanks in advance for any replies!
May 22, 200620 yr Commercial Member Ed Walters - PD,Within the CreateStaticBuffer function in the Sound.cpp file, add the line in bold: ----------------------- // Set up the direct sound buffer, and only request the flags needed // since each requires some overhead and limits if the buffer can // be hardware accelerated DSBUFFERDESC dsbd; ZeroMemory( &dsbd, sizeof(DSBUFFERDESC) ); dsbd.dwSize = sizeof(DSBUFFERDESC); dsbd.dwFlags = DSBCAPS_STATIC; dsbd.dwBufferBytes = g_pWaveSoundRead[bufferN]->m_ckIn.cksize; dsbd.lpwfxFormat = g_pWaveSoundRead[bufferN]->m_pwfx; dsbd.dwFlags |= DSBCAPS_CTRLVOLUME | DSBCAPS_LOCSOFTWARE;-----------------------Hope this helps. Andrew Wilson
May 22, 200620 yr Thank you _very_ much, MachTwo! That solved the problem entirely - it now does exactly what I wanted.Ed
May 25, 200620 yr >After downloading an excellent tutorial pack from>http://jcboliveira.flysplash.org/' target="_blank">Jos
May 25, 200620 yr And the link above takes you to a spamware site... not nice... drive by malware anybody?
May 26, 200620 yr Commercial Member >And the link above takes you to a spamware site... not>nice... drive by malware anybody? Which link... I see two. LOL ;) Ed Wilson Mindstar AviationMy Playland - I69
Create an account or sign in to comment