Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <allegro5/allegro.h>
- #include <allegro5/allegro_audio.h>
- #include <allegro5/allegro_acodec.h>
- int main(int argc, const char** argv)
- {
- al_init();
- al_install_audio();
- al_init_acodec_addon();
- al_reserve_samples(1);
- //char *stream_file = "/usr/share/example-content/Ubuntu_Free_Culture_Showcase/Jenyfa Duncan - Australia.ogg"; // this works fine
- char *stream_file = "/home/josh/Radix - Bright eyes.xm"; // this doesn't work and causes a segfault using the upstream code
- ALLEGRO_AUDIO_STREAM* stream = al_load_audio_stream(stream_file, 4, 2048);
- al_attach_audio_stream_to_mixer(stream, al_get_default_mixer());
- while(al_get_audio_stream_playing(stream)) {
- al_rest(0.5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement