LoadSound("blah.ogg")

BlitzMax Forums/BlitzMax Programming/LoadSound("blah.ogg")

tonyg(Posted 2006) [#1]
Put this in another post but might be worth adding to a new topic...
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.


Grey Alien(Posted 2006) [#2]
sounds great. let me know when it works ;-)


Tachyon(Posted 2006) [#3]
I would love to see the loading time of .OGGs improved. Takes way too long now.


Hotcakes(Posted 2006) [#4]
Interesting take tonyg. Let us know how you progress ;]


tonyg(Posted 2006) [#5]
Bit stuck on this. I have the OGG reading in 'chunks'.
However, the TAudioSample that is created is not what is used by playsound.
*IF* I can somehow the chunk of an ogg, pretend I've finished and create the TSound to pass to PlaySound it might be possible to read_ogg furher chunks into t.samples
(TAudioSample).
However, it's getting horribly complicated so any help would be appreciated.
Alternatively, it might not be necessary if the OpenAL mod is released soon.