GLFW .wav playback only?

Monkey Forums/Monkey Programming/GLFW .wav playback only?

Amon(Posted 2011) [#1]
Just did some tests but also don't recall if I did or didn't read it somewhere but output to GLFW can only take .wav for sounds/music?

If that is the case, .wav is an uncompressed format; only the quality in the playback reduces the filesize, then what do I do for my game that has 4 music tracks, each when converted to wav rakes in at around 38-47 megabytes?


JIM(Posted 2011) [#2]
Since the GLFW implementation uses OpenAL, I'm pretty sure it would be easy to support OGG playback. (not MP3, to avoid licencing problems)

I'm looking forward to compressed format support as well. Our game only has around 5MB of data plus the additional 80-100MB of sound. It's pretty ridiculous.


Rex Rhino(Posted 2012) [#3]
Has anyone found a solution to this? Are .wav files the only thing that works with GLFW?


Jimbo(Posted 2012) [#4]
See: http://content.gpwiki.org/index.php/Libraries

If you look at the table you'll see that OpenAL supports wav and ogg, and requires an extension module to play mp3.

Ogg is much better quality than mp3, so I'd be inclined to go that way.


Rex Rhino(Posted 2012) [#5]
I haven't been able to get ogg working with GLFW.


therevills(Posted 2012) [#6]
From the Monkey docs: http://blitz-wiki.appspot.com/The_mojo_module


Also, not all audio formats are supported by all targets:

wav : glfw, android, ios, xna (sounds)

mp3 : flash, android, ios, xna (music)

m4a : flash, android (music), ios

wma : xna (music)

ogg : android



Samah(Posted 2012) [#7]
If you're looking for a desktop solution you could always try MonkeyMax (if you have BlitzMax). I can't remember which formats that supports, but it's more than just wav. :-)


Rex Rhino(Posted 2012) [#8]
Samah:

I plan to look into MonkeyMax as soon as I get a chance to play with it. How well does it work?


Neuro(Posted 2012) [#9]
wav : glfw, android, ios, xna (sounds)

o_O .... yeah gonna have to go the MonkeyMax route with this one.


Rex Rhino(Posted 2012) [#10]
PlayMusic is not working in MonkeyMax... I checked the code, and this is the function for PlayMusic:

Method PlayMusic:Int( path:String, flags:Int )
		Return 0
	EndMethod


I take it that PlayMusic is a work in progress?


therevills(Posted 2012) [#11]
MonkeyMax is all W.I.P ;)

I plan on going back to it after my current game is finished (couple of weeks).


Rex Rhino(Posted 2012) [#12]
therevills:

If I fix the BlitzMax sound code, can I send it to you to include in the next version?


therevills(Posted 2012) [#13]
Feel free :)

Normal sounds should work okay, it "should" just be the music stuff - I was thinking of just assigning a set channel to be the music channel and reuse that.