Menu
  • HOME
  • TAGS

Playing sound file in C with Allegro5

c,audio,allegro,allegro5

ALLEGRO_SAMPLE *sample = al_load_sample("bomb.ogg"); //convert to ogg file your link It is working for me....

Allegro framerate issue

c++,allegro,allegro5

I found the problem. From the Allegro 5 documentation: Unless you set the ALLEGRO_MEMORY_BITMAP flag, the bitmap is created for the current display. Blitting to another display may be slow. I was attempting to create the bitmaps before i created the display, thus resulting in poor performance. Setting the ALLEGRO_MEMORY_BITMAP...

How do I get “Allegro Error”?

c++,allegro,allegro5

Is the variable player at file scope; in other words, is it initialised before your main runs and has a chance to initialise the allegro library? Assuming this is the case, try changing the line to ALLEGRO_BITMAP *player = nullptr; and initialise it in a function that you call at...

Allegro5 showing text doesnt work

allegro5

There are a few problems here that are preventing you from seeing the text. You've set up a 'wait-for-event then draw' loop that is normally associated with the use of a timer, but you have no timer. This means that unless you trigger some sort of event (e.g. by pressing...

Allegro 5 on Raspberry pi

bitmap,debian,raspberry-pi,allegro5

You should add -e bmp to raspistill call line....

Non-numerical Random Errors [closed]

c++,allegro,allegro5

From your comment, allocating a variable, and then failing to [assign a value to] it is one correct example of many possible UB situations. Here is a larger (but still incomplete) list. The most important thing to understand about Undefined Behavior is that you can not make any assumptions about...

error creating buffer to load data

c++,allegro5

The output of malloc has type void* which you should try explicitly casting to char* . char* buffer = static_cast<char *>(al_malloc(size)) ...

Is it possible to use system font in Allegro5?

c++,allegro5

Remember that Allegro is a cross-platform library, and there is no cross-platform way to access system fonts. An option you can use is to #include the allegro windows (maybe its winalleg.h) header and then access that functionality (Windows API calls) to provide system fonts to the program. But that would...

How to press multiple keys at the same time using events in real-time? (Allegro 5)

c++,events,allegro,allegro5

The Basic Keyboard Example on the allegro wiki may be of more help than that old post. There is no need to manage multiple event queues here. Every key press and release should get pushed into the queue -- you just need to make sure you process every event in...

Drunk Mandelbrot implementation [closed]

c++,fractals,allegro,allegro5,mandelbrot

Your calculation of the complex modulus is incorrect. float Complex::getAbsoluteValue() const { return sqrt(real * real + imaginary + imaginary); } You've since removed this section of your post, but it should say float Complex::getAbsoluteValue() const { return sqrt(real * real + imaginary * imaginary); } ...