Page 1 of 1
Usable Linux version?
Posted: Wed Apr 05, 2006 4:13 pm
by ppera
Is there available somewhere some usable Linix version of CSB-DM.
I mean here version which has working sound. V 0.98 for Linux adapted by Eric Svanberg has problems with sound - no sound in game, and I even can't compile it myself to maybe get workable Linux executable - confugure and automake is made very bad. I tried it on 4 Linux distro and it failed every times.
Posted: Mon Apr 24, 2006 5:16 am
by ajwans
I was able to build CSB Linux under Centos 4.3 (RHEL4)
I did have to modify the code a little bit, changing the number of audio channels to
1 from 16 because that code prevented the sound working properly.
Changed the line
static const unsigned int AUDIOCOUNT = 16;
to
static const unsigned int AUDIOCOUNT = 1;
in LinCSBUI.cpp
Also had to change
#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2
to
#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 && 0
in /usr/include/glib-1.2/glib.h while I was compiling and then change it back afterward.
Posted: Tue Apr 25, 2006 2:13 am
by Erik
I'm sorry about the status of the linux version. The configure scripts have been corrected, but not yet released.
Sound has been an issue with linux from day one. We went for esd, back in the time when Rebecka and I belived the Gnome project would bring userfriendly quality-code to Linux. Now it seems like esd is broken on many systems. SDL's own sound support is the crappiest I've ever seen. Alsa doesn't work, at least with none of the machines I've had. Jack doesn't work without Alsa. Arts is clumpsy and bloated. OSS is the only thing that seems to work on all intel platforms, but I've heard that other architectures doesn't support OSS. Besides, raw OSS marked as being 'obsolete' in the new kernels.
We have also decided to remove GTK, using only SDL and Hermes (compile option) for the graphic output.
So... does anybody have any suggestions about what sound system CSB should support in Linux? We'd prefer a sound server, because then CSB won't interfere with other programs and the code will be independent of what kind of sound driver linux is using.
Posted: Tue Apr 25, 2006 3:08 am
by Rebecka
ajwans wrote:I was able to build CSB Linux under Centos 4.3 (RHEL4)
I did have to modify the code a little bit, changing the number of audio channels to
1 from 16 because that code prevented the sound working properly.
In what way did the sound not work correctly with 16 channels? Did it hang, or just sound funny?
The 16 channels was added because ESD was too slow to handle many subsequent sounds. At the ST, old sounds were simply cutoff when a new sound was played. ESD does not provide a way to kill a sound stream once it has been sent to the server, unless the sound can be uploaded to the server in advance (but that's not an option with CSB, at least not until Paul figures out how to enumerate the in-memory ST samples). Because of this, you could overload ESD by creating many sounds in rapid succession... hanging everything that was using ESD (including CSB).
Posted: Tue Apr 25, 2006 1:35 pm
by ppera
@Rebecka:
Problem with sound is that there is no sound at all while game runs - when close game, all sound 'flushes' out in moment. In some cases ESD is not accessible, then it freezes whole system, and is hard to even close game.
I tried some settings of esd, what eric svanberg suggested, but nothing changed.
It stays for Mandriva, Fedora Core, Slackware, Debian - newer versions, but I had same error some 3 years ago.
Beside sound, there is many irritating problem in source files. I tried to compile it several times, on mentioned platforms, and every time it failed.
First problem is bad detection of installed packages - gtk and glibc. It can be overrided with simple corrections. Then worse things coming: creation of Makefile.in failes often (on Slackware always). Finally I generated somehow Makefile, but there was lot of error by compiling.
I have installed lot of games on Linux, compiled many myself. Usually it goes without any editing. Just get required libraries, and it goes.
There are really complex projects like Flight Gear, made by large number of people, and it compiles like charm - executable os over 6 MB after srtripping. It compiles fine, despite some problems with supporting libraries like FreeGlut. It uses
Openal sound system - maybe it's worth to try with that.
Btw. I never observed sound problems with SDL, except ocassional delay.
In any case, I would like to try modified CSB, with AUDIOCOUNT=1.
ajwans, can you send me executable to mail -
pkpera@sezampro.yu
Thanks in advance

Posted: Wed Apr 26, 2006 11:46 pm
by Rebecka
If you are running debain, try downgrading libesd and esd to these packages:
http://ftp.se.debian.org/debian/pool/ma ... 3_i386.deb
http://ftp.se.debian.org/debian/pool/ma ... 3_i386.deb
Download them with wget, then install them with dpkg -i --force-dependencies *deb
Tell me if there is any difference with the sound.
Afterwards, run deselect and restore your system.
Solution is here...
Posted: Thu Apr 27, 2006 3:42 pm
by ppera
Eric Svanberg sent me new, test version. It configures and compiles good - with some minor glitches: files README and NEWS missing, therefore automake produces not Makefile.in, so I copied them from another package.
I saw biggest count ever of warnings while compiling, but it finally produced usable executable.
Unfortunatelly, sound problem remained. So, I started with experimenting with AUDIOCOUNT. I tried 1 there, but it just freezed game while it should output sound. Then I tried 2 - finally I got sound in game. Not good, dostorted and buffer with shorter sounds not played immediately, but by next sound out. Then I tried 4, 8 etc - same result. Desparatelly I put there odd value: 3. And it was that! I got clear, undelayed sound, without 'stucking'.
Same result I got with practically all odd number as 5, 7 etc. 1 is not OK.
So, I left 3 there and played about 1 hour with perfect sound.
Why is it so, have no idea...But works in newer distros as Mandriva and Slackware.
Posted: Sun Aug 20, 2006 6:43 pm
by mlvj
Hiya,
I've just got the Nokia 770 version of CSB going.
To get sound going, I manually stuck a #define SOUND__ESOUND in LinCSBUI.cpp and got nothing until the programme ended, when all the sound flushed, just as above. Setting the AUDIOCOUNT to 3 has given good sound. It's a tiny bit harsh sound, sortof sounds like it has white noise playing at the same time as any sound. Anybody know why that is?
Thanks!
Posted: Sun Aug 20, 2006 9:28 pm
by Paul Stevens
White noise? Probably quantize error. That is 4-bit
sound you are listening to!