Thread: [Super-tux-devel] --disable-sound and NOSOUND
Brought to you by:
wkendrick
From: Duong-Khang N. <neo...@us...> - 2003-12-18 14:03:58
|
Hi there, I think that the use of "#define NOSOUND" is justified by the fact that som= e=20 advanced users don't want the sound support compiled in as Bill said. So if= =20 we do not provide that compile time define anymore, we get the sound suppor= t=20 compiled in all the time.=20 In this case we will get rid of the NOSOUND #define but the sound support i= s=20 compiled in anyway. And the user can still disable the sound with=20 =2D-disable-sound. The problem is that we can not provide the compile time #define NOSOUND and= =20 then ignore it in the codes. It's just not logical :-D. You guys, have to=20 decide either we let the user the ability to choose to compile the sound=20 support or they have the sound support compiled in "forever :-)" >Tobias Gl=C3=A4=C3=9Fer (who comes from C++ and sees #define as his enemy = ;) ) Hmm, I think "#define" fits some programming needs just like the "goto"=20 command. That's why they're still around. You, Tobias, must have had a dark= =20 time with "#define"s :-D PS: PLEASE guys give a correct subject to your posts. I'm lost beetween all= =20 the "RE: something" messages |
From: Tobias <tob...@gm...> - 2003-12-18 14:27:01
|
Am Do, den 18.12.2003 schrieb Duong-Khang NGUYEN um 09:05: > Hi there, > > I think that the use of "#define NOSOUND" is justified by the fact that some > advanced users don't want the sound support compiled in as Bill said. So if > we do not provide that compile time define anymore, we get the sound support > compiled in all the time. The only argument for #define NOSOUND until now is, that some users maybe don't want to install SDL_mixer and its dependencies. We have following options. -Switching from SDL_mixer to sth. that has less dependencies -Creating fake functions, which do nothing, if someone don't wants to link against SDL_mixer. (Just a idea, I dunno if that is 100% possible ;) ) -And more that I don't know of. > In this case we will get rid of the NOSOUND #define but the sound support is > compiled in anyway. And the user can still disable the sound with > --disable-sound. Yepp, this is a common way in a lot of games. The most users will install a RPM or DEB and packagers will enable sound in RPMs and DEBs, of course. > > The problem is that we can not provide the compile time #define NOSOUND and > then ignore it in the codes. It's just not logical :-D. You guys, have to > decide either we let the user the ability to choose to compile the sound > support or they have the sound support compiled in "forever :-)" Yes, you got the point. There are two ways crossing each other. Compiling with or without sound support or giving a run time option for this. If we don't choose one way and drop the other one, all users will be confused. And in my point of view a runtime option is much better here, since the most people will install a RPM or something like that. > >Tobias GlÀÃer (who comes from C++ and sees #define as his enemy ;) ) > > Hmm, I think "#define" fits some programming needs just like the "goto" > command. That's why they're still around. You, Tobias, must have had a dark > time with "#define"s :-D '#define's are OK for some special needs and have their deserved place esspecially in C. But '#define's should definitivly not be placed, where runtime decicions/options would fit better. And last but not least I red a few advanced C++ books, which told me again and again how satanic '#define's are. :) Greetz... (I'm going to view 'Lord of the Rings' today!) Tobias Gläßer |
From: Bill K. <nb...@so...> - 2003-12-18 14:34:56
|
On Thu, Dec 18, 2003 at 03:29:04PM -0500, Tobias Gl=E4=DFer wrote: > We have following options. > -Switching from SDL_mixer to sth. that has less dependencies I'm not familiar with 'sth'. I'm really opposed to switching from SDL_mi= xer, though, since it's why I fell in love with SDL in the first place. It's also VERY popular, well-known, and comes with pretty much all distro= s. > -Creating fake functions, which do nothing, if someone don't wants to > link against SDL_mixer. (Just a idea, I dunno if that is 100% possible > ;) ) Defined with #define? ;) Heheheheheh <snip> > And in my point of view a runtime option is much better here, since the > most people will install a RPM or something like that. Assumign we find someone who will build RPMs for us at each release ;) But yeah. I am kind of thinking as though it were still 1998-1999 :) <snip>=20 > Greetz... (I'm going to view 'Lord of the Rings' today!) Cool! I hear they throw the ring into the lava. Heheheh ;) (It's hard to spoil a movie based on such an old book ;) -bill! |
From: Tobias <tob...@gm...> - 2003-12-18 22:24:14
|
Am Do, den 18.12.2003 schrieb Bill Kendrick um 09:34: > On Thu, Dec 18, 2003 at 03:29:04PM -0500, Tobias Gläßer wrote: > > We have following options. > > -Switching from SDL_mixer to sth. that has less dependencies > > I'm not familiar with 'sth'. sth. = something :) > I'm really opposed to switching from SDL_mixer, > though, since it's why I fell in love with SDL in the first place. > It's also VERY popular, well-known, and comes with pretty much all distros. The sound effects in supertux don't sound like they should. When I play them with something like xmms they sound different, so I conclude, that SDL_mixer is at least bad in playing .wav files. You are right. There are SDL_mixer packages for nearly every major distro. > > -Creating fake functions, which do nothing, if someone don't wants to > > link against SDL_mixer. (Just a idea, I dunno if that is 100% possible > > ;) ) > > Defined with #define? ;) Heheheheheh There would be only one remaining #ifndef, which would lead to much cleaner code. > > <snip> > > And in my point of view a runtime option is much better here, since the > > most people will install a RPM or something like that. > > Assumign we find someone who will build RPMs for us at each release ;) > But yeah. I am kind of thinking as though it were still 1998-1999 :) > > > <snip> > > Greetz... (I'm going to view 'Lord of the Rings' today!) > > Cool! I hear they throw the ring into the lava. Heheheh ;) > (It's hard to spoil a movie based on such an old book ;) Heh. Yepp, they actually melt the ring. :) Greetz... Tobias Gläßer |
From: Bill K. <nb...@so...> - 2003-12-19 03:28:15
|
On Thu, Dec 18, 2003 at 11:26:16PM -0500, Tobias Gl=E4=DFer wrote: >=20 > The sound effects in supertux don't sound like they should. When I play > them with something like xmms they sound different, so I conclude, that > SDL_mixer is at least bad in playing .wav files. Which version do of SDL_mixer do you have? I started Super Tux long ago, so I may have initialized SDL_mixer wrong, or you could have a buggy vers= ion (it's had some bugs in the past, but is pretty good now, I think) > You are right. There are SDL_mixer packages for nearly every major > distro. >=20 > > > -Creating fake functions, which do nothing, if someone don't wants = to > > > link against SDL_mixer. (Just a idea, I dunno if that is 100% possi= ble > > > ;) ) > >=20 > > Defined with #define? ;) Heheheheheh >=20 > There would be only one remaining #ifndef, which would lead to much > cleaner code. True. :) I guess the way _I_ think of it is, once I write, say, the system initialization and "play_sound()" functions, I'll probably nev= er look at them again. Out of sight, out of mind. ;^) Of course, 99% of the time, I'm the only coder on a project. So, sorry ;) -bill! |
From: Bill K. <nb...@so...> - 2003-12-18 14:25:09
|
On Thu, Dec 18, 2003 at 03:05:18PM +0100, Duong-Khang NGUYEN wrote: > The problem is that we can not provide the compile time #define NOSOUND= and=20 > then ignore it in the codes. It's just not logical :-D. You guys, have = to=20 > decide either we let the user the ability to choose to compile the soun= d=20 > support or they have the sound support compiled in "forever :-)" I see no reason to take it out! It doesn't impact anything, and simply provides an additional useful option to people at compile time. What if this gets ported to some bizarre handheld game system that doesn'= t have good sound? Or SDL_mixer just didn't get ported to it yet, because of some other dependecies. No reason to make other people's work harder! > >Tobias Gl=C3?=C3=9Fer (who comes from C++ and sees #define as his enem= y ;) ) Hehe - #defines got Vectoroids running on two PDAs and the Sega Dreamcast= , BTW. ;^) -bill! |