Here is my problem, the bot start playing notes, and it randomly stop playing these. Sometime it works for 4 or 5 seconds, sometime for 90% of the song. But for the moment it never worked for the entire song.
If it can help.
Maybe is it cause it's using 100% cpu.
With the XLib you have a function that prevents 100% CPU usage.