PureBasic Help for PlaySound() wrote:0: Play the sound only once (Default value when 'Mode' is ommitted)
1: Play the sound continuously (loop). Not available under Linux!
Is there no way to implement continuous playback to PlaySound() for Linux? It is not nice to have the background music of my games stop and not play again ~_~
I made some research and by using the SDL_mixer library it should be possible to play music continuously using Mix_LoadMUS() and Mix_PlayMusic(), but with the Import and OpenLibrary() possibilities to use the SDL_mixer functions I always got a "Fatal arithmetic error" or "LINKER: Error" message from the PBCompiler T_T
dontmailme wrote:I'm not sure about linux but in Windows you can use the movie commands to play sounds.....
playmovie and moviestatus to see when it's finished......
Hope I'm not too far off base here :D
Sure, but as far as I know in Linux the Movie commands use the XINE library which is very inefficient and unpractical to use for music playback. And the fact that most people who use Linux simply don't use XINE but something else like MPlayer instead makes me think PureBasic should base on MPlayer than XINE (look, I know there are many who do use XINE but I'm not in that group and that's why I want to avoid using it). I might just as well use a RunProgram() to call MPlayer to play the music, but that would be even more inefficient ~_~