Jump to content
Eternal Lands Official Forums
Erdie

I found a servere client sound bug

Recommended Posts

While playing with sound update and bug fixes (in some situations wrong files were configured in the xml files e. g. when a cavern wall falls down waves on the beach are configured but THERE IS a dedicated sound file for cavern walls falling) I found a general client bug:

 

Either in the vanilla client or in the bleeding edge git version no eviromental sound were played at all. I inspected the xml files and I came finally to the result that this seems to be a bug in the client sources. This is sad and I would like to fix this but it exceeds my knowledge figuring out what the reason is. Is there someone who can help me with that?

 

thanks a lot

Erdie

 

P. S. to be more precise: Everything with is tagged as <backgrund> in mapsfx_c1.xml is not played. Thunder and weather is still there. I did not check the c2 configuraton yet ..

Edited by Erdie

Share this post


Link to post
Share on other sites

I spend some time with "extra sound debug" and piped the stout to my Deskop. While doing

"tail -f ~/Desktop/el_log.txt | grep Trying"

I get the following output when harvesting coal in Desert Pines and walking between the mine and the storage:

 

Trying to add sound: 41 (Teleporter) at 109, 55. Position: 0, 0, Gain: 1.000000
Trying to add sound: 41 (Teleporter) at 367, 16. Position: 0, 0, Gain: 1.000000
Trying to add sound: 41 (Teleporter) at 114, 165. Position: 0, 0, Gain: 1.000000
Trying to add sound: 41 (Teleporter) at 15, 331. Position: 0, 0, Gain: 1.000000
Trying to add sound: 41 (Teleporter) at 358, 196. Position: 0, 0, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 362, 92. Position: 362, 92, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 202, 101. Position: 202, 101, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 166, 99. Position: 187, 101, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 169, 101. Position: 178, 101, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 146, 86. Position: 165, 101, Gain: 0.400000
Trying to add sound: 41 (Teleporter) at 173, 75. Position: 0, 0, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 99, 36. Position: 98, 20, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 98, 20. Position: 98, 20, Gain: 1.000000
Trying to add sound: 138 (Icon Click) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 140 (Button Click) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 136 (Drag Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 137 (Drop Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 136 (Drag Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 137 (Drop Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 140 (Button Click) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 136 (Drag Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 137 (Drop Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 140 (Button Click) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 136 (Drag Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 137 (Drop Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 137 (Drop Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 136 (Drag Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 137 (Drop Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 136 (Drag Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 137 (Drop Item) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 139 (Window Close) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 139 (Window Close) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 139 (Window Close) at 0, 0. Position: 100, 40, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 100, 40. Position: 100, 40, Gain: 1.000000
Trying to add sound: 118 (Stone 2Foot) at 103, 42. Position: 103, 42, Gain: 1.000000
Trying to add sound: 122 (Dirt 2Foot) at 102, 41. Position: 102, 41, Gain: 1.000000
Trying to add sound: 41 (Teleporter) at 109, 55. Position: 0, 0, Gain: 1.000000

 

As of the code in line 1149 of the function "check_for_new_streams" in sound.c  I would expect a message like:

check_for_new_streams - Background found:

But this never happens. Background sound are definately configured for Desert Pines

 

Actually I could not find out why this is not happening because I roughly understand the code up to now.

Edited by Erdie

Share this post


Link to post
Share on other sites
On 1/5/2021 at 1:53 PM, Erdie said:

While playing with sound update and bug fixes (in some situations wrong files were configured in the xml files e. g. when a cavern wall falls down waves on the beach are configured but THERE IS a dedicated sound file for cavern walls falling) I found a general client bug:

 

Either in the vanilla client or in the bleeding edge git version no eviromental sound were played at all. I inspected the xml files and I came finally to the result that this seems to be a bug in the client sources. This is sad and I would like to fix this but it exceeds my knowledge figuring out what the reason is. Is there someone who can help me with that?

 

thanks a lot

Erdie

 

P. S. to be more precise: Everything with is tagged as <backgrund> in mapsfx_c1.xml is not played. Thunder and weather is still there. I did not check the c2 configuraton yet ..

 

From what i see, the environment backgroud sounds are played but I think they're played in the wrong places.

For example, in Desert Pines I could get no environment background sounds to play.

When I go to Melinis sewers, i get enviro-winter01.ogg playing which corresponds to Winter Wind background sound.

Looking at mapsfx_c2.xml, Winter Wind is not a sound for the Melinis Caves map but it is for some of the snowy maps.

 

Share this post


Link to post
Share on other sites

But e. g. Desert Pines has serveral background sound configured for night & day and they are existing on my disk. BTW: If just the path would be wrong, the EXTRA_SOUND_DEBUG function would log that a sound files is failed to open. There seems to be something wrong.

Lood at VOTD as well, do you hear a background there?

 

And .. be aware, there are some sound listenable which do not belong to the categorie <background> e. g. rain, thunderstorm, crowds and single artefacts on the maps. This works.

Edited by Erdie

Share this post


Link to post
Share on other sites
8 hours ago, Erdie said:

But e. g. Desert Pines has serveral background sound configured for night & day and they are existing on my disk. BTW: If just the path would be wrong, the EXTRA_SOUND_DEBUG function would log that a sound files is failed to open. There seems to be something wrong.

Lood at VOTD as well, do you hear a background there?

 

And .. be aware, there are some sound listenable which do not belong to the categorie <background> e. g. rain, thunderstorm, crowds and single artefacts on the maps. This works.

 

The client is finding the ogg files for background sounds. The problem is elsewhere.  I don't hear background sounds in DP or VOTD but that's a symptom of the overall issue that background sounds DO play but they don't play in the expected locations according to the locations given in the mapsfx_c[n].xml files.

 

Here the examples I've found so far:

 

In Melinis sewer. Winter Wind plays but that should only be for SRM Mountains, Trassian, Hulda, IOTF, II, Irinveron, Glacmor, Iscalrith.

In White Stone at the Isla Prima ship. Here the Wind01 sound is played but I only see Wind01 defined in mapsfx files for North Redmoon mountains.

In Tarsengaard Insides. Here Desert01 plays but the only place on C1 that should play that is Tahraji Desert.

 

I also turned on sound debug and when I hear background sounds I get output like this.

add_stream: Started stream. Type: Background, Sound: 10, Cookie: 4, Source: 2, F
...
Doing stream fade - stream: Background, sound: 10, fade: 1, gain: 0.050000

 

Edited by Nogrod
precision

Share this post


Link to post
Share on other sites
1 hour ago, Nogrod said:

 I don't hear background sounds in DP or VOTD but that's a symptom of the overall issue that background sounds DO play but they don't play in the expected locations according to the locations given in the mapsfx_c[n].xml files.

 

Exactly that´s the point!

 

I consider the background sounds as very imortant. More important that certain objective sounds. They make athmosphere and feeling. The question ist how to find the root cause. Do you think this is a C-code issue or a configuraton issue?

Share this post


Link to post
Share on other sites
1 hour ago, Erdie said:

 

Exactly that´s the point!

 

I consider the background sounds as very imortant. More important that certain objective sounds. They make athmosphere and feeling. The question ist how to find the root cause. Do you think this is a C-code issue or a configuraton issue?

 

I think it's an XML file issue.

 

In sound.c there is a function setup_map_sounds (int map_num) that expects that map_num equals the the id value in the mapsfx xml file.

This is not happening because map.c calls setup_map_sounds like this:

map.c:
	setup_map_sounds(get_cur_map(mapname));

The function get_cur_map is provided the filename of the map file and returns an integer with the value of the index of map in the continent_maps array.

map.c:

int get_cur_map (const char * file_name)
{
	int i;

	for (i=0; continent_maps[i].name != NULL; i++)
	{
		if (strcmp (continent_maps[i].name, file_name) == 0)
		{
			return i;
		}
	}

	return -1;
}

 

The order of the maps in the continent_maps array is determined by order of the map entry in mapinfo.lst.

 

Therefore to fix this issue, the id of the map in the mapsfx files need to match the positional order of that map in the mapinfo.lst file.

 

I tested this change in both my mapsfx xml files and it works!

 

 

Share this post


Link to post
Share on other sites

I will check if I understand the logic you described and will come back soon - thanks you!

 

EDIT:

Lets try to fix VOTD - the mapinfo.lst contains the line:

Seridia 230 405 281 451 ./maps/map5nf.elm                # VotD

 

This is line 23 (or Position 23) but we have 12 comment lines at the beginning so does it mean the map ID  of VOTD must be 11?

 

 

Edited by Erdie

Share this post


Link to post
Share on other sites
Just now, Erdie said:

I cannot download them, when trying that, I get a php file.:huh:

 

Hmm, works for me but I'll PM you another link.

Share this post


Link to post
Share on other sites
14 minutes ago, Erdie said:

Thank you very much, I will test it now!

 

EDIT: It works :)

 

Awesome!!!

 

Now the question is: is this the "correct" fix and how does it get into game distribution?

 

Share this post


Link to post
Share on other sites

It is part of the sound pack so it will be easier to distribute because it is a separate package. I need to ask how this can become official. Maybe together with my current sound additions I am currently working on.

Share this post


Link to post
Share on other sites
15 hours ago, Nogrod said:

Attached here are the fixed files. Overwrite yours and the sounds should work.

This was all manually edited so some testing is probably in order.

mapsfx_c1.xml

mapsfx_c2.xml

Looks like a permission problem on those files, if I just left-click on them I get that "this file is not available on your account" (yes, I'm logged in :P)

Share this post


Link to post
Share on other sites

I'm late to the party but sounds like you have it sorted, nicely done.  There's actually no published place I'm aware of that the sound files are maintained other than as a downloadable pack.  We can sort that out longer term, but as a stop gap, we can add the XML files to the client source code on git; I'll do that now.  When you have finalised the fixes, you could do a pull request there or I'll just update the files.  I've been adding the latest sound pack as an asset on the git project in addition to Radu's download.  We can put an updated pack there and I'll use that for updated client packages, Radu will have to update his download.

Share this post


Link to post
Share on other sites

 

2 hours ago, bluap said:

I'm late to the party but sounds like you have it sorted, nicely done.  There's actually no published place I'm aware of that the sound files are maintained other than as a downloadable pack.  We can sort that out longer term, but as a stop gap, we can add the XML files to the client source code on git; I'll do that now.  When you have finalised the fixes, you could do a pull request there or I'll just update the files.  I've been adding the latest sound pack as an asset on the git project in addition to Radu's download.  We can put an updated pack there and I'll use that for updated client packages, Radu will have to update his download.

 

Pull request made.

https://github.com/raduprv/Eternal-Lands/pull/111

 

5 hours ago, revi said:

Looks like a permission problem on those files, if I just left-click on them I get that "this file is not available on your account" (yes, I'm logged in :P)

 

I don't know how to fix this revi. You can get the updated xml files from github one the pull request merge is made.

https://github.com/raduprv/Eternal-Lands/tree/master/dev-data-files/sound-xml

 

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.

×