i've stored sound in a soundbuffer sound from a wave file, a low E note from an electric bass (size: 2.01 MB, bit rate 1411 kbps, audio sample size: 16 bit, 2 channels, sample rate of 44 khz, audio format PCM).
IDirectSoundBuffer *buffer;
//code//
here is how I play it:
buffer->SetCurrentPosition(64);
buffer->Play(0,0,0);
//code//
here is how I stop it:
buffer->Stop();
but when i stop the buffer, i hear an unpleasant and short sound, like a "poock" or a "teeck"... even if i try to play the same wave file with windows media player and then stop it imediately i hear the same sound.
and even if i change the volume to low before i stop the buffer, things are not better.
buffer->SetVolume(-5000);
buffer->Stop();
bun when I play another kind of sounds, like, for example, drumkit sounds, i don't have any problem.
please help...
thank you in advance!
andrei
|
|