Sounds/music

BlitzMax Forums/BlitzMax Programming/Sounds/music

KamaShin(Posted 2005) [#1]
I made a small test about sounds:
loaded a .wav file: 8 bits Mono 44100 Hz, file is 4.4 Mo, 1 min and 46 secs... and it take BMax some 4 to 5 seconds to load...
loaded a .ogg file: ? bits, Stereo, 44100 Hz, file is 3.7 Mo, 5 min and 39 secs to load...
Isn't that a bit too much time to load a sound??? Quicktime open both the .wav and the .ogg in less than 1 sec...


Robert(Posted 2005) [#2]
I believe that QuickTime doesn't read the whole file in one go, just the headers and then streams the sound off the disc. Perhaps this is the problem.

Are you sure about those times though - 5 minutes and 39 seconds!

Can you post one of the sound files?


Dreamora(Posted 2005) [#3]
perhaps it is decoded to wav before playing?! (this would take about this time especially with slower cpu) But don't ask me why ... ;)


GfK(Posted 2005) [#4]
perhaps it is decoded to wav before playing?! (this would take about this time especially with slower cpu)
What 'slower cpu'? A 386??

5m39s is a stupidly long time to load an OGG file. Should be a few seconds at most - that's certainly how it was with FMOD in Blitz3D. Don't know with the BRL audio module.


Dreamora(Posted 2005) [#5]
Load != decode

other idea: supports ogg VBR format? supports the sound system ogg vbr?

especially: is the file vbr and not constant rate?

my last theory is that it converts vbr into constant rate if vbr aren't supported for straight playback and decode and reencode takes 5-7 mins on a 2 Ghz cpu

but haven't used ogg nor the bm sound system so I should stop find stupid theories and let some of the sound Pros here ask.


Robert(Posted 2005) [#6]
I just did a quick test on my 1.7Ghz laptop, loading a 115kbps ogg sound (4.3MB) took 3.3 seconds.

I used the first sound available from this page:

http://www.vorbis.com/music.psp


KamaShin(Posted 2005) [#7]
ooooops... I m SOOO sorry... it's not 5 minutes and 39 secs... it's 5 seconds and 390 millisecs... so sorry about that... however I still find that 5 secs is a lot for such a small wav... I also tested a .ogg that is slightly bigger: a 5 minutes ogg that is about 4.4 M on HD -> about 48 seconds to load...
this is kinda long for just one music... Add to that that I have graphics and some ambiant sounds to load each time a "map" is loaded and it gives some damn annoying loading time... Especially for an RPG where map changing occurs quite often...
just for info here is my config:
iMac G3 500 Mhz with 512 M ram
if BMax actually loads the whole file, well I wish it would let you choose if you want to completely load the file or play it as stream like quicktime or iTunes do...