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));