Page 1 of 1

PlayModule with loop

Posted: Wed Oct 01, 2008 10:24 pm
by Lebostein
... :roll:

Posted: Wed Oct 01, 2008 10:26 pm
by Fred
:roll:

Posted: Thu Oct 02, 2008 8:03 am
by Lebostein
I hope your :roll: means a new constant #PB_Module_Loop for the changed command PlayModule(#Module [, Flags]) ... I hope ...

Posted: Thu Oct 02, 2008 9:38 am
by Foz
Two methods spring to mind - one cross platform and the other windows only.

Cross Platform:
Hold a database stating the length in milliseconds of each module. Use a timer and SetModulePosition(0) when the time is hit.

Windows Only (not tried it as I have linux), but in theory should work...):
Use the DirectX Sound dll to check if sound is still playing, if not, then SetModulePosition(0).
See here: http://www.purebasic.fr/english/viewtop ... 673#222673

Posted: Thu Oct 02, 2008 10:49 am
by Kaeru Gaman
Lebostein wrote:I hope your :roll: means a new constant #PB_Module_Loop for the changed command PlayModule(#Module [, Flags]) ... I hope ...
I think his " :roll: " means, you should be able to post at least one complete sentence if you wish something.
it is at least unpolite to put three words in a headline and only a "nerved" smily in the post.
so you see, Fred is friendly enough to give you a hint instead of just ignoring your affront....

Posted: Thu Oct 02, 2008 11:29 am
by Lebostein
Why I should repeat the headline in the thread? I don't need more words to describe my wish (I'am a man of few words, anyway).

PS: is this :roll: a nerved smily? I have choosed this cause the smily looks up to the title and then he smiles ... sorry for this disaccord

@Foz: yes, this is the solution, that I use at the moment (see the code). But my intention to post my ideas and wishes here is a better PB ... when I need a workaround, then I use the "Coding Questions" board... thank you anyhow (sorry for my english)

Code: Select all

If GetModulePosition(#mod) = 255 And GetModuleRow(#mod) = 0: SetModulePosition(#mod, 0): EndIf

Posted: Thu Oct 02, 2008 12:18 pm
by Fred
With the beta it should loop now, if you put a command in your module to do so. And yes 'rolling' is a nerved smiley.

Posted: Thu Oct 02, 2008 12:26 pm
by Lebostein
Thank You! Sorry for the nerved smiley. I will look for a manual for smilies ... :D

Posted: Thu Oct 02, 2008 3:13 pm
by Rook Zimbabwe
:roll:
Ahhh Fred... 100% accurate as always! :wink:

Posted: Fri Oct 03, 2008 3:06 pm
by Psychophanta
@Lebostein:
http://www.purebasic.fr/english/viewtopic.php?t=33769
and now it is very well fixed :D

Posted: Fri Oct 03, 2008 4:46 pm
by Foz
It is a method, I'll give you that. Not my preferred one, but hey, I'm not the developer of PB. :)

Now I'll have to hunt out all the different tracker programs so I can add this... I've got Modplug Tracker, so my MOD files should be sorted.

Can anyone suggest good IT, XM and S3M trackers?

*** EDIT:
I'll just shut up now. Modplug Tracker also handles all of my other formats as well. I didn't realise that...

Re: PlayModule with loop

Posted: Tue Feb 05, 2013 9:57 am
by Lebostein
Sorry for this 4.5 year old thread. But now, with the new ModPlug library, is there a possibility play a module in loop?

Re: PlayModule with loop

Posted: Tue Feb 05, 2013 10:24 am
by ts-soft
A module with loop would loop without any flag.
A module without loop can't loop.

So simple use a module with loop or edit the module and set to loop.
Looping is a feature of module!

Re: PlayModule with loop

Posted: Tue Feb 05, 2013 10:37 am
by Lebostein
ts-soft wrote:A module with loop would loop without any flag.
A module without loop can't loop.

So simple use a module with loop or edit the module and set to loop.
Looping is a feature of module!
OK. Would be nice if this would be a side note in the documentation...