[hatari-devel] Sample frame buffer is incorrectly restarted

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

I have a pretty simple test prg: https://pastebin.com/YgVzqwfc (attached). It takes "en.raw" as input by default or any other file if specified as argv[1]. It's a raw sample (preferably quite long) 24585 Hz / 16-bit / stereo.

It may look strange at the first sight but it's supposed to emulate one specific behaviour: direct-from-disk sample playback which occasionally (in my case always) doesn't make it, i.e. the playback repeat doesn't play a fresh part from the disk but the same one already present in the buffer.

The idea is to detect this behaviour and if so, disable playback so instead of the stuttering there will be only silence. And as soon as there's an opportunity, start the playback again.

This works on real hardware (Falcon030/060). However in Hatari, it behaves like this:
It's best audible with some real song as the sample so one can hear repeated sentences. If you are struggling with generating such a sample, just let me know, I'll upload it somewhere.

Also, if I'm doing something stupid and it works only by chance on Falcon, I'm also all ears.

--

Attachment: play.tos.zip
Description: Zip archive



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