Menu

#366 Stream looping doesn't work correctly with mod files

5.1
open
nobody
Addons (20)
5
2012-10-09
2012-07-16
SiegeLord
No

This code:

ALLEGRO_AUDIO_STREAM* stream = al_load_audio_stream("song.xm", 4, 2048);
al_attach_audio_stream_to_mixer(stream, al_get_default_mixer());
al_set_audio_stream_playmode(stream, ALLEGRO_PLAYMODE_LOOP);

Does not result in a looping stream. This works with other file formats. Adding this line after this code works around the issue, but shouldn't be necessary:

al_set_audio_stream_loop_secs(stream, 0.0, al_get_audio_stream_length_secs(stream));

Discussion


Log in to post a comment.

MongoDB Logo MongoDB