liballeg / allegro5

The official Allegro 5 git repository. Pull requests welcome!
https://liballeg.org
Other
1.88k stars 283 forks source link

read_sound_input returns incorrect data #138

Open allebot opened 16 years ago

allebot commented 16 years ago

Originally reported by: c4z

Original Ticket: "alleg/bugs/117":https://sourceforge.net/p/alleg/bugs/117

Hi,

With version 4.2.2, the read_sound_input function does not fill the buffer given as a parameter correctly on Windows when using DirectSound.

I think the problem comes from the call to IDirectSoundCaptureBuffer_GetCurrentPosition() used in the digi_directsound_rec_read() function of the wsdinput.c source file. The position to retrieve should be the position of the read cursor, not the capture cursor.

Hope it will help this great project !

email : caz666 [at] free [dot] fr

allebot commented 16 years ago

Original comment by: trentg

Logged In: YES user_id=1657045 Originator: NO

Could you post a small example that fails?