Hello!
I've got a very annoying error while playing sounds using DirectSound. My application uses some IDirectSoundBuffer-s, all filled with data from wave files. I actually don't mind if too much memory is used, therefore I copied the files into memory in their entire size.
test1.wav : 19 kb
test2.wav : 200 kb --------> here is the bug... is this to large? don't think so, because DSBSIZE_MAX is set to 0x0FFFFFFF...
I want the sound to be played immediately when a key is pressed, so I call
myBuffer->Stop();
myBuffer->SetCurrentPosition(0);
respectively myBuffer->Play(0,0,0);
at that moment. But, then, a very short (but loud enough) sound, like a "pok!" ... or a "beep" is played simultaneously.
I tried unsuccesufully to increase myBufferDescription.dwBufferBytes, dwBufferBytes being a member of DSBUFFERDESC structure. I think I should not use streaming buffers because, as I said before, I have enough memory to use. Which is the cause of that short "beep" then?
I would appreciate any help or advice! Thank you!