Allegro.cc - Online Community
Post Reply

Allegro.cc Forums » Allegro Development » Allegro No audio Set Loop Points for Sample instances

rss feed Print
Allegro No audio Set Loop Points for Sample instances
CRAZY CONDITIONS
Member #16,385
June 2016
avatar

I don't find this feature. At the moment I end Up cutting my Sounds perfectly for looped playback.
Is there a way to Set Loop Points I don't See?
Or an alternative way to do this?

Also interesting Here: The Sample instance's length in Samples May differ from that of the sample... Why this?

MikiZX
Member #17,092
June 2019

I have never used this so please take this only as a suggestion of what to check, no guarantee it would work.
I am not sure if this can help you but ALLEGRO_AUDIO_STREAM apparently has functionality to loop an audio file (https://www.allegro.cc/manual/5/al_set_audio_stream_loop_secs). And it appears (looking at the source of Allegro5) that it is possible to attach multiple streams to the mixer using https://www.allegro.cc/manual/5/al_attach_audio_stream_to_mixer
This might be of interest when using streams: https://www.allegro.cc/forums/thread/614289

For the samples, looking at the source of Allegro5 (https://github.com/liballeg/allegro5/blob/master/addons/audio/allegro5/internal/aintern_audio.h) there seems to be 'loop_start' and 'loop_end' variables in definition of ALLEGRO_SAMPLE_INSTANCE structure though to a noob like me it appears these are internal and not exposed to the user - it would take someone who knows programming better to answer this correctly.

Anyways, I hope this was of some help.

Post Reply
Go to: