Click here to Skip to main content
16,007,443 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding Dialog to mdi mfc app Pin
Wes Aday29-Apr-05 9:38
professionalWes Aday29-Apr-05 9:38 
GeneralRe: Adding Dialog to mdi mfc app Pin
Gary R. Wheeler30-Apr-05 3:11
Gary R. Wheeler30-Apr-05 3:11 
GeneralMake a sound with CSoundManager & CSound Pin
ilFrate29-Apr-05 4:56
ilFrate29-Apr-05 4:56 
GeneralRe: Make a sound with CSoundManager & CSound Pin
Franken29-Apr-05 11:16
Franken29-Apr-05 11:16 
GeneralRe: Make a sound with CSoundManager & CSound Pin
ilFrate29-Apr-05 20:44
ilFrate29-Apr-05 20:44 
GeneralRe: Make a sound with CSoundManager & CSound Pin
Franken30-Apr-05 5:55
Franken30-Apr-05 5:55 
GeneralRe: Make a sound with CSoundManager & CSound Pin
ilFrate1-May-05 23:07
ilFrate1-May-05 23:07 
GeneralRe: Make a sound with CSoundManager & CSound Pin
Franken1-May-05 23:45
Franken1-May-05 23:45 
One problem is that the CSound Class sets the Volume inside the play() member function. It is correct to generate the sound with the max volume (max dynamic range of bit resolution). You can send it to the buffer and play it but when you call the play() function you should set the volume to max attenuation. This will only change the attenuation on the buffer. If you set the volume to zero attenuation your sound is of maximal loudness again. After you have used play() in your code, you should immediately call SetVolume in a loop to decrease attenuation. This is not implemented in CSound. You should add a methode where you can independently set the Volume. Eg.:

void CSound::Attenuation(long lVolume)
{
pDSB->SetVolume( lVolume );
}

Then you can adjust Volume from your application.

CSound myCSound;

myCSound-play();
for(int i(-10000); i<0; ++i)
myCSound->Attenuation(i)

I think it should work
GeneralVisual C++ 2005 Express &amp; PSDK Pin
Anonymous29-Apr-05 4:31
Anonymous29-Apr-05 4:31 
GeneralRe: Visual C++ 2005 Express &amp; PSDK Pin
Chris Meech29-Apr-05 9:40
Chris Meech29-Apr-05 9:40 
GeneralRe: Visual C++ 2005 Express &amp; PSDK Pin
Anonymous29-Apr-05 18:03
Anonymous29-Apr-05 18:03 
QuestionWhat's window form application? Will it replace MFC application? Pin
xufeisjtu29-Apr-05 2:50
xufeisjtu29-Apr-05 2:50 
AnswerRe: What's window form application? Will it replace MFC application? Pin
toxcct29-Apr-05 5:05
toxcct29-Apr-05 5:05 
GeneralVxD Pin
Neha.marwaha29-Apr-05 1:25
Neha.marwaha29-Apr-05 1:25 
QuestionGet system menu by API ? Pin
microsoftcertificate29-Apr-05 1:08
sussmicrosoftcertificate29-Apr-05 1:08 
GeneralPORT BLOCKING FOR WINDOWS 98 Pin
URagavSouth29-Apr-05 1:08
URagavSouth29-Apr-05 1:08 
GeneralRe: PORT BLOCKING FOR WINDOWS 98 Pin
Alexander M.,29-Apr-05 9:19
Alexander M.,29-Apr-05 9:19 
GeneralRe: PORT BLOCKING FOR WINDOWS 98 Pin
URagavSouth2-May-05 18:10
URagavSouth2-May-05 18:10 
GeneralGetting last write time of a FTP file Pin
ashtwin29-Apr-05 0:49
ashtwin29-Apr-05 0:49 
Generalpassword Echo Pin
29-Apr-05 0:40
suss29-Apr-05 0:40 
GeneralRe: password Echo Pin
22491729-Apr-05 0:48
22491729-Apr-05 0:48 
GeneralRe: password Echo Pin
ThatsAlok29-Apr-05 0:54
ThatsAlok29-Apr-05 0:54 
GeneralRe: password Echo Pin
toxcct29-Apr-05 1:01
toxcct29-Apr-05 1:01 
GeneralRe: password Echo Pin
ThatsAlok29-Apr-05 1:19
ThatsAlok29-Apr-05 1:19 
GeneralRe: password Echo Pin
toxcct29-Apr-05 1:25
toxcct29-Apr-05 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.