Jump to content
Eternal Lands Official Forums
Torg

Major NEW_SOUND update - EL gets a (complete?) sound system

Recommended Posts

Ok, I have another fairly large update ready for testing. I'm just waiting for Berlios to let me diff/commit. :-S

 

I have now seperated the loading of sounds into buffers and sources.

 

Instead of loading up all the map based sounds and using up half (or more) of the available simultanious sound slots (sources) and then pausing them until you walk within range, they are now loaded into memory (buffers), and loaded into a source when you walk within range.

 

This means that we should have enough sounds on most sound cards to play all the sounds required, except maybe in some large invasions. It also means that Portland insides work now (it doesn't crash your system), but they are a crazy mess (8 fireplaces and 1 teleport in PL storage!!). There is also a huge fire in the middle of Portland (near the fruit stand). Eh???

 

So I need to work out another way to hook in the particle sounds. Joy.

 

Hopefully this will also fix some of the mutex issues, but I expect it to create more in the short-term. It is also paving the way to dynamically allocate sources between normal sounds and streams, which will be very handy for playing multiple background streams when crossing boundaries etc (fading from one to another).

 

Other than this, there are some simple bug fixes around, and I added a new sound "Get Item" for bags, and the Get/Drop All buttons etc.

 

/edit: Craxy? noooo... craxy isn't a work. Damn typos.

Edited by Torg

Share this post


Link to post
Share on other sites

I just added a couple more sounds. Some server/connection events - "Connected", "Disconnected" and "Error".

No big deal. :-)

Share this post


Link to post
Share on other sites

Ok, I just realised that I really screwed up some logic so there will be heaps of bugs in the commits of today (and I mean heaps).

 

Sorry about that guys. Feel free to stay at the version you are at until I get the chance to fix it (probably 2 days time).

 

Florian, don't worry about the backtraces, I know all about them! (got about 20 in the last 10 minutes)

Edited by Torg

Share this post


Link to post
Share on other sites

Ok, I coded a hack which should stablise the code again, but it breaks all walking sounds (and possibly some other stuff). I'll deal with it when I get the chance.

 

At least it should be stable enough to use again... I hope.

Share this post


Link to post
Share on other sites

(gdb) bt full

#0 0x900248c7 in semaphore_wait_signal_trap ()

No symbol table info available.

#1 0x90001582 in pthread_mutex_lock ()

No symbol table info available.

#2 0x3005014a in SDL_mutexP (mutex=0x13c13030) at /usr/src/SDL-1.2.12/Xcode/SDL/../../src/thread/pthread/SDL_sysmutex.c:108

retval = 0

#3 0x000c6e48 in play_sound (loaded_sound_num=2, x=125, y=139) at sound.c:2777

loops = 61824356

error = 92274744

buffer = 0

stage = 42

sourcePos = {125, 139, 0}

sourceVel = {0, 0, 0}

pSource = (source_data *) 0x0

pNewType = (sound_type *) 0x3af7970

#4 0x000c6d4d in add_sound_object (type=42, x=125, y=139, me=0) at sound.c:2759

i = 3

tx = 127

ty = 137

distanceSq = 8

loaded_sound_num = 2

cookie = 144

pNewType = (sound_type *) 0x3af7970

maxDistanceSq = 1225

#5 0x000fd742 in parse_special_effect (sfx=SPECIAL_EFFECT_RESTORATION, data=0x1d0556f4) at special_effects.c:680

offset = 0

need_target = 0

sfx_sound = 42

var_a = 203

var_b = 0

caster = (actor *) 0x17444800

target = (actor *) 0x0

x = 0

y = 0

 

I sat around at the beam for 30mins, nothing. Then I went to SKF to watch somebody kick fluffy butt, and got the freeze after 30secs ...

Share this post


Link to post
Share on other sites

Sorry this has been so inactive... I've been inundated with work from different directions for the last couple of weeks so haven't had the chance to hack the client at all. It looks like things will be quieter next week, fingers crossed.

 

I have noticed a few bugs people have mentioned floating around but I can't remember all of them. When I have more time I'll trawl back through things and see what I can find. If there is something you've noticed mentioned elsewhere that isn't mentioned already in this thread (first post) then please post it because I may have missed it.

 

- There is an issue if debug is enabled (which doesn't surprise me that much. I've updated the arrays quite a bit and forgot the debugging sections).

- Normal mutex issues. When I have 2 days to hack at the client non-stop, I'll tackle this one. Currently I'm hoping for Wed-Thurs next week.

- Possible bugs in music (extending into new streams code??) on Nvidia Soundstorm based hardware

 

I've also just got a new computer. Yay. So hopefully that will make my life a little easier, and I will have my backup machine rebuilt as a Windows box for additional testing. Depending on time etc I'll also have another go at getting OSX running on this new machine, although it is a very low priority.

Share this post


Link to post
Share on other sites

Suggestion: can you somehow discover when you're in a tavern and add matching background/crowd noise?

 

Background: I attended Scorpius's and Bernie's wedding today and there was absolute silence in a very crowded tavern.

Share this post


Link to post
Share on other sites

Suggestion: can you somehow discover when you're in a tavern and add matching background/crowd noise?

 

Background: I attended Scorpius's and Bernie's wedding today and there was absolute silence in a very crowded tavern.

Well, you can determine how many actors are in the vicinity, and then just check to see if you are in a tavern I suppose.

Share this post


Link to post
Share on other sites

ATM the client checks for the actors around, and plays crowd noise. But not on inside maps it seems. Or the crowd noise is broken, I'll check at the beam where it worked some days ago.

 

/EDIT crowd at beam works, but apparently not on inside maps.

Edited by Florian

Share this post


Link to post
Share on other sites
Suggestion: can you somehow discover when you're in a tavern and add matching background/crowd noise?

 

Background: I attended Scorpius's and Bernie's wedding today and there was absolute silence in a very crowded tavern.

The idea is that you are able to define different types of crowd sounds for different areas of different maps, and there is an overall default. Therefore you can have some glasses clanging with crowd sounds of a roudy pub defined by area for each of the taverns, and clicks of axes with crowd murmuring for each of the mines etc. I'm basically just waiting for someone to make the sounds, and the config. :-P

 

Well, you can determine how many actors are in the vicinity, and then just check to see if you are in a tavern I suppose.
This is all manually configured, it is impossible (or very very difficult) with the current map definition system to establish automatically exactly what type each location should be.

 

ATM the client checks for the actors around, and plays crowd noise. But not on inside maps it seems. Or the crowd noise is broken, I'll check at the beam where it worked some days ago.

 

/EDIT crowd at beam works, but apparently not on inside maps.

Hmmmm... they should. Last time I checked they were working inside NC storage, but I could have broken something since then (or it isn't an insides map).

Share this post


Link to post
Share on other sites

Seems the system hogs the sound device even when set to no sound and music and sound gain set to 0.0 (checked ~/.elc/el.ini for that as well). What did I do: I tried to start amaroK while EL was running without success (it started up but wouldn't play music), upon exiting EL, amaroK started playing, restarting EL client with sound set off while amaroK was running brought: "Error initializing sound: ALC_INVALID_DEVICE"...

Share this post


Link to post
Share on other sites
Seems the system hogs the sound device even when set to no sound and music and sound gain set to 0.0 (checked ~/.elc/el.ini for that as well). What did I do: I tried to start amaroK while EL was running without success (it started up but wouldn't play music), upon exiting EL, amaroK started playing, restarting EL client with sound set off while amaroK was running brought: "Error initializing sound: ALC_INVALID_DEVICE"...

Hmmmm, I had thought I fixed that when I rebuilt the init stages. Apparently not.

 

If you are running ALSA then you just need to configure it with a virtual device to allow multiple device connections.

If you are running OSS then upgrade to ALSA. :-P

 

Seriously, I'll have a look and see what is wrong. Thanks for the bug report.

Share this post


Link to post
Share on other sites
Seems the system hogs the sound device even when set to no sound and music and sound gain set to 0.0 (checked ~/.elc/el.ini for that as well).

If you are running ALSA then you just need to configure it with a virtual device to allow multiple device connections.

Ahhhhh yes. I just had the same issue and realised what I needed to do last time. You need to configure OpenAL.

 

Assuming you are using ALSA for your sound system then you need to edit /etc/openalrc (on Debian) and add this:

		(define devices '(alsa))
	(define alsa-device "dmix")

Dmix is the plugin to handle multiple virtual devices. Depending on your config you might want something else (I'm trying to get a surround device using dmix).

Share this post


Link to post
Share on other sites

You need to configure OpenAL.

 

Assuming you are using ALSA for your sound system then you need to edit /etc/openalrc (on Debian) and add this:

		(define devices '(alsa))
	(define alsa-device "dmix")

Dmix is the plugin to handle multiple virtual devices. Depending on your config you might want something else (I'm trying to get a surround device using dmix).

Ok, thanks. Checked with gentoo-wiki ("HOWTO ALSA and dmix" and OpenAL) and did the following to make it work for me:

 

# ~/.asoundrc
pcm.dsp0 {
type plug
slave.pcm "dmix"
}

# /etc/openalrc
(define devices '(alsa))
(define devices '(alsa esd arts sdl null))
(define alsa-out-device default)
(define alsa-in-device default)

and, not sure this is necessary but since I was at it, I figured what the heck:

# /etc/env.d/99sdl
SDL_AUDIODRIVER=alsa
AUDIODEV=default

Share this post


Link to post
Share on other sites
Ok, thanks. Checked with gentoo-wiki ("HOWTO ALSA and dmix" and OpenAL) and did the following to make it work for me:

Yep. I really love ALSA now. It's a pain when it isn't automatically configured, but its sooo powerful. There are a million different methods I've found.

 

I'm still trying to build a custom one to expand stereo out to 2.1 channels (copy and merge left + right and filter as a sub channel), then expand that to 5.1 and run it through dmix so it doesn't block my sound card. :-P

I'm also working on splitting a sub channel off 5.0 or 4.0 through dmix so I can still get correct surround sound from EL.

 

and, not sure this is necessary but since I was at it, I figured what the heck:

Hehehe, yeah, it can't hurt. Technically we aren't using any SDL audio functions. It's Alut, pure OpenAL and Ogg Vorbis.

Share this post


Link to post
Share on other sites
PS: I get sheep sounds as an restoration effect .. and for remote heal too. :devlish:

Yeah... ummmm... that was... ummmm....

 

I didn't have any other sounds and it was random enough that people would notice and hopefully they'll think of something better! :-P

 

(pssst... we need more sounds! Please check out this thread.)

Share this post


Link to post
Share on other sites

Have the footsteps been disabled or is there a bug? In the newest client I'm not getting any footstep sounds.

I do have + walking turned on. I tried restarting/turning it on/off..also tried using different footstep sound files in case that was it-nothing worked.

Share this post


Link to post
Share on other sites

Hmm, no footsteps here either, also if I am near a waterfall when leaving a cave, the moment I move the sound stops.

 

I am also not hearing ambient sounds like birds.

 

S.

Share this post


Link to post
Share on other sites
Have the footsteps been disabled or is there a bug? In the newest client I'm not getting any footstep sounds.
I also do not get foot steps with the cvs linux client.
Hmm, no footsteps here either

Yeah... I forgot to post it here, but in the first post of the thread where I'm keeping track of the bugs, this one is noted. I basically broke the footstep sounds to fix some stability issues. I actually created a 5th type of sounds, but didn't edit the config window because it was just a hack to get it working.

 

also if I am near a waterfall when leaving a cave, the moment I move the sound stops.

Hmmm, that's a new one. I have been meaning too, but haven't tested the waterfalls yet. They appear to have a similar bug to that of the fountains... which I don't get have. Damn.

 

I am also not hearing ambient sounds like birds.

What Roja said. :-)

(although if you have a default set in your config then you should have some background in outside maps, I just don't remember which sound it was)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×