Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / fmod4 support
- - By Sven2 [de] Date 2012-10-04 21:29 Edited 2012-10-04 21:31
Since fmod3 is no longer officially available and I'd love to have sound, I updated the engine calls to fmod4.

Here is a patch. I didn't want to commit it yet because I think it would break the build because of missing dependencies.

Code licensed under ISC.
Attachment: oc_fmodex_4.patch (22k)
Parent - - By Sven2 [de] Date 2012-10-05 17:06
I also fixed the OpenAL build for MSVC and pushed the changes. However, only .ogg sound files are loaded; .wav files are not. I don't see any code in the OpenAL implementation to load these files either. Is this feature still missing or does it just not work under Windows?
Parent - - By PeterW [gb] Date 2012-10-05 17:23
Hm, I feel kind of stupid for just throwing Google results for "OpenAL wav" around, but the web seems to suggest to either use alutCreateBufferFromFile or decomposing the WAV yourself, then use alBufferData (here and here - the latter actually streams the WAV from mplayer, which is cool but unrelated).

Have you tried either or both? Does it just not work?
Parent - - By Sven2 [de] Date 2012-10-05 17:29
I haven't tried to implement it yet. I just thought that whoever did the OpenAL port would have implemented .wav support first.

Edit: But since it's so simple, I guess I could just implement it myself.
Parent - - By PeterW [gb] Date 2012-10-05 17:44
Ah, okay, I misunderstood. I suppose OpenAL has only been used on Mac so far, so nobody has really looked into getting that to work.
Parent - By Newton [de] Date 2012-10-06 19:12
What is used on linux?
Parent - By Mortimer [de] Date 2012-10-05 19:08
As far as I remember, I implemented wav loading via some apple API (ugh). So.. No, generally not implemented.
Reply
Parent - - By Newton [de] Date 2012-11-25 14:27
So what is the status on this actually? If we do support OpenAL, couldn't we use this for all platforms and drop fmod support alltogether? Or has this been done already?
Parent - - By Sven2 [de] Date 2012-11-25 14:36
I have already done a patch that allows us to use fmod4. It's just not in the main branch because we couldn't use fmod4 on the 64 bit non-MSVC Windows builds.

If the autobuilds switch to OpenAL, I could merge the patch into default and we could have working fmod4 support.
Parent - - By Newton [de] Date 2012-11-25 21:23
If the autobuilds switch to OpenAL, why not drop fmod completely? Doesn't work OpenAL as fine?
Parent - - By Sven2 [de] Date 2012-11-25 23:01
OpenAL caused lots of trouble on my last laptop. If we do switch, we should wait some time and check if there are complaints coming in.
Parent - - By Newton [de] Date 2012-11-26 00:21
So can OpenAL just be turned on in CMake? Is it working with fmod3 currently? Last time I tried to turn on OpenAL there were some problems to activate OpenAL in the configuration.
Parent - By Sven2 [de] Date 2012-11-26 12:13
I am compiling with OpenAL activated in CMake at the moment. You do need some additional dependencies (al, alut, ogg and vorbis I think) though.
Up Topic Development / Developer's Corner / fmod4 support

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill