![]() |
|
[A5] al_play_sample isn't always playing sound |
wixy00
Member #17,122
September 2019
|
I've got problem with al_play_sample() not always playing sound. On Allegro.cc manual I've read something along those lines: "Playback may fail because all the reserved sample instances are currently used.". What can I do about that? |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
How many samples are you reserving? How many are you playing at a time? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
wixy00
Member #17,122
September 2019
|
I'm reserving two samples, playing one at a time. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Can you show a simple code example that demonstrates this? I've reserved only 1 or 2 samples, and yet it still works to play sound. What version of Allegro are you using? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
wixy00
Member #17,122
September 2019
|
It's faster to just upload my source code, everything should compile just fine. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
It's working for me. It plays a sound when I eat a fruit, and it plays a sound when I hit the wall. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
wixy00
Member #17,122
September 2019
|
I think in my case, sound isn't being played when I pick up fruit after fruit almost immediately + it's not always the case. It also happens in release build. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Well the first thing you can do is change the number of samples that you are reserving.
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
wixy00
Member #17,122
September 2019
|
Okay, it is working but I'm curious why it wasn't working properly just on my machine (I mean with two samples reserved). |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
How long are your samples? Are they padded with silence? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|