Sample-precise audio control
My goal is to take a TV-turning-on sound I found, which includes a pulsing "hum" section that I've seemlessly looped in Audacity, and in my game play the "turn on" sound and then immediately start playing the "hum" sound with looping the moment the turn-on sound ends, for a seamless transition.
Is there any provision in Allegro to do this, besides having to write my own sound mixing code?
I know of the concept of loop points - don't know how to set them in Audacity yet (if possible) or if Allegro even supports them, but I would still like to know how to go about timing sounds (or doing anything) at the sample level of time resolution.
So you basically just want to loop the an audio sample, or am I misunderstanding you?
You can loop audio using ALLEGRO_SAMPLE_INSTANCE and ALLEGRO_PLAYMODE_LOOP. But as for "loop points", I don't think Allegro has any built-in functionality for that.
Thread #616816. Printed from Allegro.cc
You can set loop points, but only on audio streams currently. They are passed as seconds with double precision.