Page 1 of 1

[Implemented] PlaySound()

Posted: Thu Oct 11, 2007 6:19 pm
by Irene
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

Posted: Thu Oct 11, 2007 8:40 pm
by dontmailme
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

Posted: Thu Oct 11, 2007 8:53 pm
by Irene
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 ~_~

Posted: Thu Oct 11, 2007 9:46 pm
by Kaeru Gaman
I second the request.

I'm not working on Linux atm, but if I ever would, I would need this for my game-music, too.

Posted: Thu Oct 11, 2007 10:38 pm
by Psychophanta
[Joke]Bill gates solution: don't use linux :P[/Joke]

Posted: Thu Oct 11, 2007 11:16 pm
by dracflamloc
I need this for my mmorpg pls

Posted: Fri Oct 12, 2007 8:25 am
by Irene
Psychophanta wrote:[Joke]Bill gates solution: don't use linux :P[/Joke]
He already wrote a guide for the solution! http://support.microsoft.com/kb/247804 ^o^ ^_^

Posted: Fri Oct 12, 2007 10:42 am
by Psychophanta
Irene wrote:He already wrote a guide for the solution! http://support.microsoft.com/kb/247804 ^o^ ^_^
Nice one! LOL! :lol:

Posted: Fri Oct 12, 2007 1:11 pm
by dontmailme
Irene wrote:
Psychophanta wrote:[Joke]Bill gates solution: don't use linux :P[/Joke]
He already wrote a guide for the solution! http://support.microsoft.com/kb/247804 ^o^ ^_^
I guess you've already seen the reverse ?!

http://www.hinterlands.org/removewin.html

Posted: Tue Oct 16, 2007 6:40 pm
by Fred
The loop flag should work on the current linux beta (it has been implemented).

Posted: Tue Oct 16, 2007 6:45 pm
by Irene
Fred wrote:The loop flag should work on the current linux beta (it has been implemented).
Really nice! Thank you Frederic! ^o^