Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add an example for Magnum Audio #14
Hi @mosra !
Just to let you know I am currently working on this, here's an early PR for the magnum-audio example possibly coming in near future (in case it's good enough to pass review ;P ).
This is the first steps for getting the following line added to magnums description: "Audio is not an ugly stepchild either: [...]", we'll see if I can make this happen. I am hoping to implement OpenAL extension support in the future, but I don't know if I'll do more than the HRTF extension.
I hope you're as exited about this as I am ;)
Wow, didn't expect this :)
Yeah, audio currently is an ugly stepchild, the original implementation was done in a hurry for some game jam and I hadn't touched it since. I actually have some work-in-progress example in my local copy, but never managed to finish it, mainly because I discovered that the
What I planned but didn't have a time to do:
That's not to say that you should implement these things, just a brain dump in case you are trying to invent something similar :)
@mosra I am currently trying to use
That doesn't sound too good. I will see what I can do if I discover that aswell.
Yes, and something which manages the listener position.
That is a very good idea. Obviously "hearing" if the sound is coming from the right direction wont help too much when debugging :D
After blowing up the example with image loading and such, I understand what you mean. Since this depends on the future changes/additions to the Audio module, I will implement this as originally planned first, and adapt it to debug renderers once the job in Magnum it self has been done. Is this okay with you?
WavAudioImporter is not able to parse real-world files becuase I incorrectly assumed that there aren't any additional RIFF chunks -- the code should just skip the unknown ones and read the data. I don't remember the particulars, sorry, long time since I last looked at it, but can certainly help you if you have any questions.
Oh, there's also stb_vorbis which might be easy enough to convert into a plugin for opening OGG files (as compared to MP3/Lame) ... or just used directly in the example if you want to have something quickly up and running :)
EDIT: ugh, GitHub was DDoSed, I wrote this two hours ago and it failed to send, so here is it again :)
@mosra That was alot of fun! I just need to update the readme and then this is ready to merge!
You may want to listen into the wav (which is loaded perfectly fine btw). I got it from freesound.org: http://freesound.org/people/dkmedic/sounds/104457/