how do I get to a certain point of a song

BlitzMax Forums/BlitzMax Programming/how do I get to a certain point of a song

Najdorf(Posted 2005) [#1]
Hi, if I load a song and want to jump to say 1 minute, is it possible?


Najdorf(Posted 2005) [#2]
Is there a way to do this? I didn't seem to find any control that does it.


maverick(Posted 2005) [#3]
Dunno about MAX i just got the demo , but i know you can do it with the BASS library


Najdorf(Posted 2005) [#4]
bah, I think it would be a pretty unavoidable feauture...

Anway, nice sig, but would be better as

"there are 10 kinds of people: those that know binary, and those that don't"


Perturbatio(Posted 2005) [#5]
there currently doesn't appear to be an easy way to do this, but a kludge could be something like:
'play a sound 7 seconds into it
sound:TSound=LoadSound("creeper.ogg",True)

channel = AllocChannel()
SetChannelRate(channel, 70)
SetChannelVolume(channel, 0)
sound.play(channel)'PlaySound sound, channel

count = MilliSecs()

While MilliSecs()-count < 100
Wend

PauseChannel(channel)
SetChannelRate(channel,1)
SetChannelVolume(channel, 1)
ResumeChannel(channel)
Input "Press any key to continue"
StopChannel(channel)



Regular K(Posted 2005) [#6]
A module for BlitzMax will eventually come out extending its sound capabilities, thats whats so great about Bmax and why I want it so bad :D


Perturbatio(Posted 2005) [#7]
Taking a quick look at the freeaudio.cpp file, it looks like it might be possible to create a setpos function by changing the Pos64 value of the sound in question. (then again, I could be totally wrong, it *is* 4:30am).