This topic contains 11 replies, has 0 voices, and was last updated by  Mephisto 12 years, 5 months ago.

  • Author
    Posts
  • #3406

    Crispy Critter
    Participant

    Hardware: Gigabyte 7N400 Pro2 mobo (nForce 2 chipset)
    Athlon XP 2600+
    Generic GeForce MX 4000 video board

    First thing I found out: don’t bother with RPMs or SRPMs. I tried building the SDL_mixer and SDL_net SRPMs from the SDL site, and building an RPM for Scorched3D. The result was a game that would crash when trying to use sound. Glibc would complain about a corrupted linked list.

    Second try: building S3D using the configure script. You must use the –disable-freetypetest option for configure, because the FreeType test will choke on the version 9.7.3 FreeType installation. End result: S3D was playable, but there would be a runaway process after ending a game, which had to be killed by hand. Glibc complained about a double free.

    Third try: chucking the SDL_mixer and SDL_net RPMs that I had built, and just putting everything into /usr/local. Success! The game plays well, no runaway processes, no crashing.

    However, there’s one last little problem which happened on both the second and third tries: the sound was nasty, with a scratchiness worse than a dirt-caked vinyl LP. This seems to be a problem with the nForce 2 audio; IIRC, it only works at 48 kHz under Linux. I put in my old Creative/Ensoniq AudioPCI, disabled the nForce audio, and got much better results.

    Sometimes, the sound can get out of sync with the video, though – usually after heavy DH action (or some of the crazier weapons in Apoc). I might try going to 1024×768 instead of 1280×1024 and see how that holds up.

    #18151

    imported_gcamp
    Participant

    I’ve just changed all the audio to use openal which is an opensource 3d sound library. I’ve not tried this under linux yet (only made the change today) but I am hoping will give much better results.

    #18152

    cbx550f
    Participant

    Just curious, Gavin – what made you pick OpenAL? I got toying around with sound recently, and I ended up with FMod (as I recall, mostly because of some features it has, like being able to modulate the frequency of a sample etc). I only played with OpenAL a bit – seemed pretty good, but wanted certain features, went to FMod, and it too was nice to use.

    #18153

    Mephisto
    Participant

    @Crispy Critter wrote:

    the sound was nasty, with a scratchiness worse than a dirt-caked vinyl LP.

    i had a problem with sdl audio + my onboard audio chip before, kinda like what you describe. the chip only works at 48khz internally, so some games had terrible sound (including s3d), some even played the sound too fast (like unreal tournament).
    however, since either a kernel or sdl update, the problems disappeared completely. my first guess, based on the time the problem disappeared, is the kernel update (used 2.6.11 before, using 2.6.12-rcX + -mm patch now), but the sdl update (1.2.7 -> 1.2.8 ) sounds likely too.
    if you still have the problems, try updating the kernel and sdl and see if the problem goes away.

    #18154

    imported_gcamp
    Participant

    @cbx550f wrote:

    Just curious, Gavin – what made you pick OpenAL? I got toying around with sound recently, and I ended up with FMod (as I recall, mostly because of some features it has, like being able to modulate the frequency of a sample etc). I only played with OpenAL a bit – seemed pretty good, but wanted certain features, went to FMod, and it too was nice to use.

    Yeah it was a tough choice, I mainly went for OpenAL because of the big name support it has. It seems to be the choide API for apple, nvidia and creative. Of course it also had to be free and openal reminds me of opengl which I like 🙂 Its all hiden behind an interface though so it would be easy to change if we wanted.

    Funnily enough I was trying to change the frequency of sounds the other night, (I thought it may be cool when the game was speedup/slowed down) and you are right I could not find a way to do it!

    #18155

    cbx550f
    Participant

    Does this mean that we will be able to use OGG for sounds? I know there’s an OpenAL extension for it – I don’t recall if it works in Windows at all or wel, but if we could it would be a significant size savings over WAVs – no biggie for small samples, but might be good for bigger ones.

    Also, does this mean you are planning to have “spacial” sound? I alsways thought it would be nice to hear the BOOM on the right or left, and with OpenAL it should be fairly easy (I think?). Hmmm…. 4 channel sound even? 😀

    #18156

    Deathstryker
    Participant

    Speaking of size savings, it’d be nice to use jpg’s over bmp’s. Considering the size of Scorched grows ever moreso with every version.

    #18157

    imported_gcamp
    Participant

    @cbx550f wrote:

    Does this mean that we will be able to use OGG for sounds? I know there’s an OpenAL extension for it – I don’t recall if it works in Windows at all or wel, but if we could it would be a significant size savings over WAVs – no biggie for small samples, but might be good for bigger ones.

    Also, does this mean you are planning to have “spacial” sound? I alsways thought it would be nice to hear the BOOM on the right or left, and with OpenAL it should be fairly easy (I think?). Hmmm…. 4 channel sound even? 😀

    Currently I have not tried any other format, so I am not sure.

    Yes sound is now in surround, that was the main reason for the move. Sounds from left, right, back foward etc… also it does the full doplar effect thingy when shots go past the listener.

    #18158

    imported_gcamp
    Participant

    @deathstryker wrote:

    Speaking of size savings, it’d be nice to use jpg’s over bmp’s. Considering the size of Scorched grows ever moreso with every version.

    I guess so, although since the package is compressed is wouldn’t make much difference to the package size only the installed size.

    #18159

    Deathstryker
    Participant

    Oh yeah…. Why didn’t I think about that?

    #18160

    Mephisto
    Participant

    @deathstryker wrote:

    Speaking of size savings, it’d be nice to use jpg’s over bmp’s. Considering the size of Scorched grows ever moreso with every version.

    i would choose png over jpeg myself, since jpeg got compression artifacts if not compressed right, and got more patent issues. although the patents are not a problem for the game itself, i prefer free formats over proprietary ones.

    @cbx550f wrote:

    Does this mean that we will be able to use OGG for sounds? I know there’s an OpenAL extension for it

    although i like ogg a lot, i dont know if its a good idea to force people to install extensions (which will usually not be on the system already). the wav’s arent really that big (the data/wav/ folder is 1.1Mb here).

    #18161

    Deathstryker
    Participant

    You aren’t gonna need to install any “extensions”. Everything necessary would be built into the game meaning you wouldn’t have install codecs.

    Unless you are talking about something specific to linux which I have no idea about.

    #18162

    Mephisto
    Participant

    @deathstryker wrote:

    You aren’t gonna need to install any “extensions”. Everything necessary would be built into the game meaning you wouldn’t have install codecs.

    Unless you are talking about something specific to linux which I have no idea about.

    i dont think its specific to linux (although you dont really ‘install codecs’ here, codecs come as libraries), but an extension sounds like the openal system would need to know about it. unless you compile openal statically into the binary of course, but i’m usually not really fond of all this double libs on my system.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.