FMOD as new sound engine?

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

FMOD as new sound engine?

#1 Post by Yoghurt »

Will FMOD be the new final sound engine for FO? Or will it only be a temporary solution?

I ask because FMOD is non-free and therefore there are some problems to deal with.

1. We depend on Firelight to fix bugs and re-compile for newer libraries (this might be no practical problem at all)
2. FMOD's (free) license is very restrictive and might lead to legal problems; for example, if I was going to package FO and sell it in gamestores, I would require a FMOD license while the LGPL (and the CC-by) both give me the right to do so.
3. (this is a personal one) FMOD is non-free, and I dislike non-free software

Aquitaine
Lead Designer Emeritus
Posts: 761
Joined: Thu Jun 26, 2003 1:54 pm
Location: Austin, TX

#2 Post by Aquitaine »

If you were going to package FO and sell it in game stores, FMOD would be the least of your problems.
Surprise and Terror! I am greeted by the smooth and hostile face of our old enemy, the Hootmans! No... the Huge-glands, no, I remember, the Hunams!

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#3 Post by Yoghurt »

Aquitaine wrote:If you were going to package FO and sell it in game stores, FMOD would be the least of your problems.
Not that I would want to do that, but why do you think so? Both the LGPL and the CC-by don't forbid selling the program for profit...

Aquitaine
Lead Designer Emeritus
Posts: 761
Joined: Thu Jun 26, 2003 1:54 pm
Location: Austin, TX

#4 Post by Aquitaine »

Regardless of the legality, I think it'd be a pretty surefire way to piss off the team, if you just boxed up something you took no part in and sold it.
Surprise and Terror! I am greeted by the smooth and hostile face of our old enemy, the Hootmans! No... the Huge-glands, no, I remember, the Hunams!

Tyreth
FreeOrion Lead Emeritus
Posts: 885
Joined: Thu Jun 26, 2003 6:23 am
Location: Australia

#5 Post by Tyreth »

Aquitaine wrote:Regardless of the legality, I think it'd be a pretty surefire way to piss off the team, if you just boxed up something you took no part in and sold it.
This is something that is part of the freedom of opensource. Linus's kernel is sold and distributed for free by many companies.

It may also include magazines containing a collection of open source games - will they still have the freedom to distribute FreeOrion alongside other games they might include like FreeCiv, Battle for Wesnoth, etc?

guiguibaah
Creative Contributor
Posts: 441
Joined: Tue Oct 07, 2003 1:00 am

FMOD sound engine

#6 Post by guiguibaah »

Sorry to interrupt, but I couldn't help but notice that when FMOD uses .oggs it plays them monorually, despite them being coded in stereo. Just thought I'd mention. I'll see what happens with the .wav department.

(That is, I'm assuming FMOd is the sound engine in FO right now. )
thanks!
There are three kinds of people in this world - those who can count, and those who can't.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

Re: FMOD sound engine

#7 Post by tzlaine »

guiguibaah wrote:Sorry to interrupt, but I couldn't help but notice that when FMOD uses .oggs it plays them monorually, despite them being coded in stereo. Just thought I'd mention. I'll see what happens with the .wav department.

(That is, I'm assuming FMOd is the sound engine in FO right now. )
thanks!
SDL_Mixer was doingthe same thing with the .oggs. I think they may hve been encoded improperly or something.

MareviQ
Space Kraken
Posts: 100
Joined: Tue Aug 09, 2005 6:47 pm
Location: Somewhere in Poland

#8 Post by MareviQ »

There is currently one problem with FMOD - version 3.x is not aviable for 64-bit Linux (AMD64) ...

how about switching to SDL or OpenAL?
both are multiplatform (MacOS 8/9; MacOS X; Linux; BSD; Solaris; IRIX; WIndows; and both Xboxes in case of OpenAL), and FreeOrion depends on SDL already...

but in wy opinion OpenAL may be a better choice in the long run, as it is using a very similar type of naming to OpenGL, and that would greatly simplify the introduction of eviromental audio in battle engine in 0.4 (as i assume it will be using OpenGL)

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#9 Post by Geoff the Medio »

MareviQ wrote:how about switching to SDL or OpenAL?
SDL_mixer used to be the sound library... it was changed to fmod a year ago, to the day. I'm not sure why... but presumably there was a reason... which tzlaine or Yoghurt will perhaps explain.

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#10 Post by tzlaine »

Geoff the Medio wrote:
MareviQ wrote:how about switching to SDL or OpenAL?
SDL_mixer used to be the sound library... it was changed to fmod a year ago, to the day. I'm not sure why... but presumably there was a reason... which tzlaine or Yoghurt will perhaps explain.
SDL_mixer is, in a word, crap. But moreover, SDL_sound is not a viable alternative since it does not support 3D sound, and FMOD and OpenAL do. Of those two, FMOD was dramatically easier to set up and use. If you'd like to add OpenAL support, be my guest. I haven't found a decent distribution of OpenAL that I can even get to work on both Linux and Win32. Perhaps you could help with this. If not, FMOD it is.

MareviQ
Space Kraken
Posts: 100
Joined: Tue Aug 09, 2005 6:47 pm
Location: Somewhere in Poland

#11 Post by MareviQ »

I'm working on this :)

So far (that's since like, 6 hours ago) i removed all things that had anything to do with FMOD and started replacing them with OpenAL. Right now I got it to initialize, and i'm downloading data files to check if i got the wav-playing part right or not (bear with me, I've never used OpenAL yet...) once I get a clean, working (bug-free and error-catching) code I'll come back here :) (if ther's anyone with any OpenAL experience already working on this, do tell me, I'd hate to have all my work go down the drain...)

noelte
Juggernaut
Posts: 872
Joined: Fri Dec 26, 2003 12:42 pm
Location: Germany, Berlin

#12 Post by noelte »

I don't know, where you were successful. But concider, it has to work at linux AND Windows!!!
Press any key to continue or any other key to cancel.
Can COWs fly?

MareviQ
Space Kraken
Posts: 100
Joined: Tue Aug 09, 2005 6:47 pm
Location: Somewhere in Poland

#13 Post by MareviQ »

AND MacOS X,
AND *BSD,
AND Solaris,
AND XboX 360,
AND ... wait that's going a little too far :)

still, OpenAL is supposed to support all those systems (yes, Windows and Linux too.) - http://www.openal.org/platforms.html

MareviQ
Space Kraken
Posts: 100
Joined: Tue Aug 09, 2005 6:47 pm
Location: Somewhere in Poland

#14 Post by MareviQ »

I've returned sooner than i expected. And although the code i have is far from being perfect, it works (just barely, but i'll change that in the future. Now it's a proof-of-concept: one source, multiple buffers, and no music. Don't whine about those weird and random errors it spawns, i'll deal with them later as they are not critical.). Now I need some victi^H^H^H^H^H voulenteers to check if it compiles in windows (be warned: you will have to change the SConscript file on your own...). Just give me a day or two to make a CVS checkout and make patch files for the newest version...
(note: it requires a recent version of OpenAL - one in which ALUT is a separate library, not part of OpenAL)

(note: OpenAL was reported to work on Linux-amd64 but game crashes anyway... will talk to the guy who tried it (my friend, i mostly did the conversion so he could play FO) and check if he (or i) can figure out why. If he doesn't then it means all those programming classes we were attending were for nothing...)

tzlaine: would it be possible to put all things related to sound handling in a different file? and most probably as an abstract class? that would simplify adding different sound backends, and FMOD wouldn't have to be dropped then - one could decide whether he compiles it with OpenAL or FMOD? (vital: it must be possible to disable the dependancy on one of those altogether (i was thinking of #ifdef .... #endif blocks) - so for example is someone is using Linux-amd64 and ther's no version of the old FMOD for that, then he should be able to compile an OpenAL-only binary, or one with no sound altogether)

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#15 Post by tzlaine »

MareviQ wrote:tzlaine: would it be possible to put all things related to sound handling in a different file? and most probably as an abstract class? that would simplify adding different sound backends, and FMOD wouldn't have to be dropped then - one could decide whether he compiles it with OpenAL or FMOD? (vital: it must be possible to disable the dependancy on one of those altogether (i was thinking of #ifdef .... #endif blocks) - so for example is someone is using Linux-amd64 and ther's no version of the old FMOD for that, then he should be able to compile an OpenAL-only binary, or one with no sound altogether)
While this is possible, I'm not willing to do it. Instead of doulbeing our sound code, we should just get OpenAL to work properly, and leave it at that.

Post Reply