2D Game Dev – Part 10.1: Playing a Sample

This post is a portion of Part 10 in my on going series about 2D Game Development using the Allegro 5 library. These posts are in course order. You can see all of the posts in this course by clicking the “2D Game Development” button at the top of this site.

The first video of Part 10. In this video we look at the ALLEGRO_SAMPLE variable type. We also see how to load audio samples and play them using audio addon function in Allegro 5.

Full source can be found here.

Posted in 2D Game Dev, Allegro, C++, Code, Game Dev, Tutorial
1 Comment » for 2D Game Dev – Part 10.1: Playing a Sample
  1. Ferol says:

    I get this error:

    al_play_sample: Assertion `spl’ failed

    Also a warning that doesn’t occur in other source files:
    ./PlaySample.cpp:18:7: warning: variable ‘keys’ set but not used [-Wunused-but-set-variable]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Skrilles better watch out. New dubstep group laying it down: http://t.co/tMzmjs0F 1 hour ago
  • Everyday I'm kerfuffle-ing. 23 hours ago
  • Who's got two thumbs and finished his research paper? This guy! #ayyyyyyy #fonz 1 day ago
  • App Idea- tag cloud favorite book and allow user to assemble sentences. Algorithmically assign tones. User can hear favorite lines from book 1 day ago
  • I just wrote 2 sentences of this research paper and I feel exhausted. 1 day ago