XNA Creators Club Online
Page 1 of 1 (1 items)
Sort Posts: Previous Next

problems with SoundBuffer->Stop();

Last post 04/04/2009 17:34 by andreibanc. 0 replies.
  • 04/04/2009 17:34

    problems with SoundBuffer->Stop();

    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

Page 1 of 1 (1 items) Previous Next