[AD] Digitest patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Javier has just added support for backward playing to the DirectSound
driver. While testing it with digitest, I found a little glitch in the
program: when you choose a backward playing mode (looped or not), the cursor
automatically returns to the end of the sample. So you cannot for example
start playing forward, stop, and then start playing backward from the
position you stopped at.

It is caused by the two following lines in src/sound.c:1445, function
voice_set_playmode():

if (playmode & PLAYMODE_BACKWARD)
  digi_driver->set_position(_voice[voice].num, _voice[voice].sample->len-1);

These lines obviously aim at making it easier to start playing a sample
backward, therefore I don't want to remove them.

I've attached a patch against digitest.c that works around this limitation
and lets the user play with the forward/backward feature without the
previously described inconvenience.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx

Attachment: digitest.diff
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/