PlayModule with loop
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
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
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
I think his " :roll: " means, you should be able to post at least one complete sentence if you wish something.Lebostein wrote:I hope your :roll: means a new constant #PB_Module_Loop for the changed command PlayModule(#Module [, Flags]) ... I hope ...
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....
oh... and have a nice day.
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)
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
- Rook Zimbabwe
- Addict
- Posts: 4322
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
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...

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
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
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!
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!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: PlayModule with loop
OK. Would be nice if this would be a side note in the documentation...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!