Hello!
I'm making a little game using Tk, and now I'm trying to add music to it. It's surprisingly difficult.
I would like to be able to start, stop, and change tracks at any point in the program. Ideally also play two sounds at the same time (music and sound effects), but let's take it one step at a time.
I've tried using a somewhat complicated set of forks, which exec() a system tool for playing sounds (afplay, on the Mac). But that's quite clumsy, system-dependent, and doesn't stop playing when the main program quits, which would be pretty annoying.
I've also tried using Audio::Play::MPG123, which sounded promising, but the very first line
$player = Audio::Play::MPG123->new;
gives an error I don't understand:
open3: exec of mpg123 -R --aggressive failed
Now I'm starting to consider calling an external Applescript, which is basically the highest level of desperation. Any other ideas?
In reply to Playing sounds by Chuma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |