Request: Music Functions

BlitzMax Forums/BlitzMax Module Tweaks/Request: Music Functions

popcade(Posted 2006) [#1]
I'm not sure if this is a reasonable request, however I hope there're music related function being parts of official package like these.

1.OGG streaming that doesn't required to load into RAM first.
2.XM playing(as Papa is doing it, however not part of official BMax package)

So that to enable legacy usage like PlayMusic will be great, just hope it possible.


Grisu(Posted 2006) [#2]
+1


Fetze(Posted 2006) [#3]
Yep, that'd be nice.


Grey Alien(Posted 2006) [#4]
++


Hotcakes(Posted 2006) [#5]
Music playback is not morally feasible as it stands. You either need threading, or constant PlaySong() polling, which to get accurate needs a fair amount of calls per sec, which is quite ugly and more intensive than it needs to be.

Music is very important of course. So threading is the morally correct option. =] But we have to wait for BRL to make their code threadsafe, which might never happen.


tonyg(Posted 2006) [#6]
Hmmm, I've looked through the process from LoadSound and my guess is the decode_ogg and read_ogg functions are taking the time because the parm that is passed is 'size' calculated as the total size with the result being put in
memory pointed to by t.samples.
Once the decode_ogg has been run is it a case of issuing read_ogg in increments and appending to the memory area?
I know you'd have to kick-off the read manually but couldn't it be event driven?
Once the TSOUND is created (to whatever degree) Playsound should work and shouldn't overtake the loading.
Just an idea hatched in a very short amount of time so blaze away.


Grisu(Posted 2006) [#7]
I'm trying to move over to fmod for the time being.


tonyg(Posted 2006) [#8]
Thanks for letting me know :)
Anyway, opened a new topic.