Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Music stutters outside of window

This thread is locked; no one can reply to it. rss feed Print
Music stutters outside of window
Lox Chatterbox
Member #20,176
May 2021

(Allegro 4.4.3, using C)

When I load music in Allegro and play it using play_sample() the sound stutters when I click outside of the Allegro window. I'm looking to make an app using Allegro 4 and C that can be in the background (a pomodoro timer) and this prevents background noise from playing properly unless the window is active. Are there any work arounds?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/Allegro443.chm

See set_display_switch_mode, and use SWITCH_BACKGROUND. Then install a switch callback using set_display_switch_callback. Set one for input and one for output, and have it toggle a bool in main that tells it whether or not it can draw.
8-)

Lox Chatterbox
Member #20,176
May 2021

Got it. Thanks!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

GullRaDriel
Member #3,861
September 2003
avatar

I would love to have something like @person to tag a user in a post and send him a notification on his inscription mail, like "Someone mentioned you there".

If we were having notifications, we could spam @LoxChatterbox until he gives an answer X-D

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Lox Chatterbox
Member #20,176
May 2021

Didnt realize until today x) It worked, thanks a lot!

Go to: