MaxMod. Starting Streaming from begining?

BlitzMax Forums/BlitzMax Programming/MaxMod. Starting Streaming from begining?

Amon(Posted 2007) [#1]
I'm using MaxMod to stream my ogg music. I've looked at the docs and the samples but can't seem to find how I would Resume a Stream from the begining after I stop it using StopStream.

Basically when I'm in the game and I go back to the title screen I want the music to start from the begining.

How do I do this with MaxMod?

Thanks :)


GfK(Posted 2007) [#2]
Have you tried freeing the stream and creating a new one?

I haven't used Maxmod for a while now but I *think* that's how you'd need to do it.


Amon(Posted 2007) [#3]
Thanks, but I can't seem to get it to work.

When I free the stream then re-init it by declaring it again "Stream:TAudioStream = StreamMusic(Music)", it still plays it from the same position.

If I use "If StreamIsPLaying", Stop it, free it, null it and then create it again ity makes no difference.

Doing this also - "If not Stream notify "blah" ", to test if the stream is alive seems to do nothing.

If someone has some example code on how I could achieve this it would be appreciated.

:)


tonyg(Posted 2007) [#4]
Does this butchered example which comes with Maxmod work?



Amon(Posted 2007) [#5]
Hi tonyg. I have this example file but this one you've posted is different.

I can see it loading the music again, something which I'm not doing. I'm just trying to create a new stream.

Will test it out.

Thanks. :)


tonyg(Posted 2007) [#6]
Amon, yep it's a highly customised version tailored to meet your specific needs :)


Amon(Posted 2007) [#7]
it's a highly customised version


Ahh Yeah. I can tell. Really good stuff. ;)