Play OGG file how?

BlitzMax Forums/BlitzMax Programming/Play OGG file how?

Robby(Posted 2012) [#1]
Hi guys! Just a quick question. I know how to load and play wav files sounds in blitz, but can't seem to find any info on loading and playing an ogg music file, which I heard it supports.

Any thoughts on where I can learn about playing music in blitz?

Thanks as always! -Robert


PowerPC603(Posted 2012) [#2]
It should work the same as you would be loading a wav file.
Just use the LoadSound and PlaySound commands to load/play a wav or ogg.


GfK(Posted 2012) [#3]
You will probably want streaming audio, so possibly MaxMod2 is your best option for the moment, though I'm dumbfounded that Blitzmax still doesn't handle streaming audio by itself.

Basically MaxMod2 lets you load an OGG file into a bank, so it still only takes up 3mb or whatever the filesize is, then stream it from the bank using minimal resources.


Derron(Posted 2012) [#4]
Remember to use the MinGW and the libs Redi used in the maxmod link - else you run into problems when compiling (as some modules are compiled with SJLJ-exception handler, others with DW2 - and they hmm "don't like each other").

For Linux you will need to insert PulseAudio-Support and a newer RtAudio-Source. The ladder one will not compile that easily on windows - so use 2 modules (one for windows and one for linux).

Ahh and you will surely have to modify the rtaudiomodule to try pulseaudio first as it will else end up using ALSA which eg. failed on my system if other audio sources were playing.


bye
Ron


B(Posted 2012) [#5]
BlitzMax will let you play .ogg and .wav files with the LoadSound and PlaySound commands.
If you're using Framework remember to import BRL.OggLoader, BRL.Audio, and BRL.DirectSoundAudio.

Atleast that is what I import and I have yet to have a problem. No live streaming and such like MaxMod2, although I'm not sure what you would need that for. BlitzMax's native sound functions have done what I needed them to do.