Jump to content
Eternal Lands Official Forums
Torg

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

Recommended Posts

Out of interest, there are 2 existing pain animation slots which can have different sounds linked to them. I don't know if the server triggers the second however.

 

 

 

I think this is the problem, the server doesn't trigger it. As it is, there is a lot of animation fixing up work on the server needed.

I did just try it in the client, and it totally ignores pain2..only doing pain1. I believe that's why i just got rid of pain 2 for the actors.

Share this post


Link to post
Share on other sites

I found a bug :confused:

 

Not sure how this started, or if it's just with the most recent cvs build..

Anyway I turned the sound off and went afk for a long while. When I came back and turned the sound on I got another repeating sound(footsteps it was). I restarted the client and it was fine, except it seemed like the footstep sounds were quieter than usual. So I was logging in/out, trying to figure out what happened.

I disabled/enabled the sound again and that footstep repeating sound happened again. Now it happens everytime I disable/re-enable the music.

After it does happen, if i click to disable the sound, it won't. When I click to enable the sound again, the client crashes.

 

Error log:

[14:03:46] Error creating buffer - Error opening WAV file: sound/teleport_in.wav

Last message repeated 502 times

[14:03:56] Error creating buffer: Invalid Name

[14:04:58] stop_stream - Error stopping stream - error: Invalid Value

[14:05:26] Error creating buffer: Invalid Name

[14:05:28] Sorry, too slow to play music...

 

And I got this message in the client after i re-enabled the sound:

Skip! Speeding up...

Skip! Speeding up...

Skip! Speeding up...

Skip! Speeding up...

Sorry, too slow to play music...

 

(note i don't have music turned on)

Share this post


Link to post
Share on other sites

So far, things are running nicely on my MacBook Pro. I have a few comments. First, the rain sound increasing in volume as the storm gets stronger is great. However, the rain animation suddenly cuts out (leaving the sound running) instead of gradually fading out. I have seen this problem for a while, and I know it is not really related to your sound code.

 

Second, I think 5 people for a crowd is a bit too few. It would be better if there was an additional level of sound. For 5 people maybe a little chatter. For 15 people do the current crowd noise. Sorry, I know this is more work for you Torg. :happy:

Share this post


Link to post
Share on other sites

I think the crowd sounds are just fine as they are. We can't get too nit-picky..it'll never be perfect like rl.

 

That crash I described above now isn't happening anymore...I will let you know if it happens again.

I do still get a sound error in the log however:

 

[19:12:54] stop_stream - Error stopping stream - error: Invalid Value

Last message repeated 23 times

[19:38:01] Error creating buffer: Invalid Name

Share this post


Link to post
Share on other sites
Anyway I turned the sound off and went afk for a long while. When I came back and turned the sound on I got another repeating sound(footsteps it was).
Yeah, I haven't really been counting this as a bug. I know it happens and it will be fixed.

 

Basically the sounds are added even when disabled so that repeating sounds such as map sounds and rain etc will still be loaded so when you turn sound on it will work. However, there isn't any clean-up code to check for sounds that have timed out, therefore you will get a bunch of sounds play from a while back.

 

The clean-up code is another thing on my to-do list (which is growing again. :-P)

 

After it does happen, if i click to disable the sound, it won't. When I click to enable the sound again, the client crashes.
That crash I described above now isn't happening anymore...I will let you know if it happens again.
Hmmmm, I'm not sure what this is, but once I do the clean up code there will be less mess so hopefully it won't happen again.

 

[14:03:46] Error creating buffer - Error opening WAV file: sound/teleport_in.wav

Last message repeated 502 times

[14:03:56] Error creating buffer: Invalid Name

[14:04:58] stop_stream - Error stopping stream - error: Invalid Value

[14:05:26] Error creating buffer: Invalid Name

Ahhhh, I'm guessing this is after re-enabling sound after the AFKness? This would be an overload in the sound system (not able to allocate any more buffers) because of all the backed up sounds. It should be fixed with the clean-up code.

 

[14:05:28] Sorry, too slow to play music...

(note i don't have music turned on)

I'm assuming this is a follow-on from the buffer problem, but it could be something else. Once I implement the clean up code this will need more testing.

 

So far, things are running nicely on my MacBook Pro.

Woohoo!

 

First, the rain sound increasing in volume as the storm gets stronger is great. However, the rain animation suddenly cuts out (leaving the sound running) instead of gradually fading out. I have seen this problem for a while, and I know it is not really related to your sound code.
Yeah, I had thought I fixed that problem, but given I was testing by manually starting and stopping the rain its possible I missed something the server does.

 

Second, I think 5 people for a crowd is a bit too few. It would be better if there was an additional level of sound. For 5 people maybe a little chatter. For 15 people do the current crowd noise. Sorry, I know this is more work for you Torg. :icon13:
The problem I have with this is that you aren't going to get 15+ people that often. The idea is when you see a bunch of people on the screen at storage, or mining that you hear something subtle in the background to match your eyes.

 

In theory it should be quite soft when there are only 5 people (barely audible - its meant to be subtle) growing in volume to maximum volume around 40 people. It also should fade the volume relative to the average distance to everyone. Therefore in the middle of them it will be much louder than standing on the outside of a circle, or slightly away from everyone.

 

The maths for this is just horrendous as I took 2 seperate equations that looked ok and stuck them together and then printed off some numbers and tweaked them until I got something that I thought worked. It's really messy but I think it kinda works. It could probably do with a little tweaking if I get the chance though.

Share this post


Link to post
Share on other sites

Ok, been working on MINES code, but I fixed a minor issue with the tabs in tabbed chat not having click sounds attached. They now do. :-)

 

Hoping to get some more NEW_SOUND stuff done tomorrow. Busy, busy.

Share this post


Link to post
Share on other sites

Couple of small fixes... map areas should work correctly now and the base is down for more complex ones. I also changed the bag create sound to only trigger when its at your feet due to conflicting server messages.

Share this post


Link to post
Share on other sites

[15:17:52] Error creating buffer - Error opening WAV file: sound/teleport_in.wav

Last message repeated 5 times

[15:17:53] Error creating buffer: Invalid Name

 

I've been getting this error a lot and I don't know why...I gave you my sound config files, i have the teleport_in.wav file, it's not misspelled.

Share this post


Link to post
Share on other sites

[15:17:52] Error creating buffer - Error opening WAV file: sound/teleport_in.wav

Last message repeated 5 times

[15:17:53] Error creating buffer: Invalid Name

 

I've been getting this error a lot and I don't know why...I gave you my sound config files, i have the teleport_in.wav file, it's not misspelled.

Oh rats. That is because it isn't able to create a buffer, which is interesting. I was under the impression that basically all cards could support ~64 buffers (some more) and anything the card didn't handle the software driver would. I highly doubt you have 64 (- 4 * num of streams) sounds playing all at the same time... and thus it should be able to find a spare buffer.

 

Alternatively it could be a hard limit your card has and so I'll need to work out how to deal with that.

 

Can you give me some details of your sound card and I'll do some research?

Share this post


Link to post
Share on other sites

Hmmm, I've just discovered the same thing under my Windows box but for sound/alert.wav (old config).

 

I'm not sure what's causing it but I'm guessing a recent update broke something under Windows. Joy. Oh well, I'll get to it in the next couple of days.

Share this post


Link to post
Share on other sites

I also get crashes from time to time. Here is something else found in the error log after a crash:

 

[22:45:18] stop_stream - Error stopping stream - error: Invalid Value

Share this post


Link to post
Share on other sites
I also get crashes from time to time.

Ok, I think I've fixed it. Let me know if you get any more.

 

I've now added the code that will hopefully support internal points in the polygon sound areas. I haven't done extensive testing however so we'll see how it works.

 

I also increased the maximum number of defined sounds to 200 and the code to clear timed-out sounds.

Share this post


Link to post
Share on other sites

I just noticed that when you make a bag, drop something on the ground, no sound is played. I thought this was part of what Bag Create was? Is it a bug or there's just no sound for this action?

Share this post


Link to post
Share on other sites
I just noticed that when you make a bag, drop something on the ground, no sound is played. I thought this was part of what Bag Create was? Is it a bug or there's just no sound for this action?

Hmmm, that must be a bug. I had to put extra checks into that code so the sound wouldn't play every time a bag spawned etc. Oh well, I'll go back and check.

Share this post


Link to post
Share on other sites

Ok... another update.

 

Bag create sounds should now work again.

 

Tile based walking sounds will be broken! You need to update the actor defs to remove the sound from <walk scale="0.2"> for each player actor. This is because the default has been changed to the sound defined in the actor def.

 

Support has been added for walking areas to fix the issues with docks and bridges playing the sound based on the tile, not the 3d object you are on. These areas are configured in the same way as normal map boundaries except using <walk_boundary_def> and <sound> blocks.

 

The initial code to check for 2d and 3d objects has been added, but as I suspected it is highly inaccurate due to most objects being checked being larger than the single tile you are standing on.

Share this post


Link to post
Share on other sites

Ok, more stuff... (does anyone care??)

 

Fixed a couple of bugs and removed the option for dimming sounds when raining (its now default).

Added support for alerts triggered by user defined text messages to parse for. The optional config file is sound_warnings.txt in your config directory. This is my current test file:

# This file is configuring sounds based on text displayed in the console
#
# Format for this file:
# Sound = Text to match
#
# The default sounds available are:
# alert1, alert2, alert3, alert4
#
sheep = This is a test message

The default sounds aren't currently added, but will be eventually. Any sound defined in sound_config.xml can be used.

Share this post


Link to post
Share on other sites

Ok, more stuff... (does anyone care??)

Well, let's just say that we'd be highly upset if we didn't get our daily new features :D

Share this post


Link to post
Share on other sites
I just can't find any bugs to report :)

lol, that's a good thing remember! ;-)

 

You've been doing a fabulous job Torg :)

 

We're just too few people to test things. And with little time.

 

Álvaro

Share this post


Link to post
Share on other sites

Ok, more work done.

 

Notice! - This update has critical changes to the config and sounds will be broken!

At this stage there is no working config, although one is being developed.

 

New features:

- Support for multiple sounds linked to one sound type chosen randomly (which is why the config is broken).

- Support for battle-cry sounds with a 1 in 25 chance of being played. That's if all 4 are defined... so that might need to be reduced because it will be 1 in 100 if there is only one battle-cry defined

- Music is faded rather than stopped on map change

- Non-looping current sounds are not removed on map change so teleport_out should work now

- All actor sounds (defined in the actor defs) can have a "sound_scale" property to scale sounds based on size

- Boundary areas can be defined with either 2 or 4 points. 2 points defining a rectangle and 4 an almost arbitrary quadrilateral. Not all quadrilateral shapes have been tested.

 

Fixes:

- Ummm... I don't remember. Maybe?

 

If you wish to fix your config, you need to format each <sound> block as such:

<sound ..(assorted properties)..>
<variant>
	<main_sound>....</main_sound>
	<gain>...</gain>				<--- optional, but if defined for the sound must be moved here
</variant>
...
(other properties as existing)
</sound>

Up to 4 <variant> blocks can be defined within any <sound> blocks. Any beyond that will be ignored.

 

 

Note: Do not put the <variant> block on the same line as the <main_sound> block. Doing this will cause your client to segfault:

<variant><main_sound>....</main_sound></variant>

The blocks must be expanded onto seperate line as in the first example. I don't know if this is a bug or limitation in the XML parsing code or what is wrong, but it crashes big time.

 

 

 

Please post bugs once a config is available.

 

 

 

/edit: Added more info

Edited by Torg

Share this post


Link to post
Share on other sites

Hi Torg. Running valgrid, I noticed a couple of uninitialised read errors in sound.c. Thought you might be interested.

 

....
==26809== Conditional jump or move depends on uninitialised value(s)
...
==26809==	by 0x80EA1AC: parse_item_image_ids (sound.c:6091)
...
==26809==	by 0x80EA265: parse_item_image_ids (sound.c:6116)
...
==26809==	by 0x80EA443: parse_tile_types (sound.c:6178)
...
==26809==	by 0x80EA504: parse_tile_types (sound.c:6203)

I can supply the full output if you want. I guess you could just initialised your temp[] arrays at lines 6081 and 6168 but it's probably more complex than that :icon13:

 

edit: sorry, forgot to mention the uninitialised reads were in the atoi() call.

Edited by bluap

Share this post


Link to post
Share on other sites
Running valgrid, I noticed a couple of uninitialised read errors in sound.c. Thought you might be interested.

Nice, thanks mate. I've been wanting to valgrind it for a while now.

 

Technically you shouldn't actually get to that code unless you put 2 comma's but apparently you did. Oh well, I just initialised them to "" and it should be all good.

Share this post


Link to post
Share on other sites

Technically you shouldn't actually get to that code unless you put 2 comma's but apparently you did. Oh well, I just initialised them to "" and it should be all good.

I've not modified anything accept ~/.elc/sound_warnings.txt and that does not contain any double commas. A quick check though sound_config.xml doesn't reveal any either. Weird.....

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.

×