Jump to content
Eternal Lands Official Forums
Torg

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

Recommended Posts

Ok... one of the largest things you'll notice with the most recent update is that sounds are now correctly oriented to the direction your character is facing. As you turn around, the sounds pan around you. (So when walking south, passing a waterfall on the left you will hear it from the left speaker!!)

 

Secondly, I rebuilt more code to fix the limit of only ~50 configured sounds.

 

I also added the config to control volume for all the different types of sounds. It appears there might be a couple of bugs in the widget as sometimes you can adjust the volume its full range (0.0 -> 1.0) and sometimes you can't get below 0.1 or above 0.9. That isn't a bug in my code however as they are just a standard control. *shrug*

 

There are a couple of minor bug fixes in there as well.

Share this post


Link to post
Share on other sites

Last week or so I got annoying client crash on some (not all) map changes.

There is backtrace of such crash:

Program received signal SIGSEGV, Segmentation fault.

[switching to Thread 1082624320 (LWP 31168)]

0x00000000004a3b5f in play_sound (loaded_sound_num=0, x=-1, y=-1, initial_gain=1) at sound.c:2975

2975 buffer = sound_sample_data[pNewType->part[stage].sample_num].buffer;

(gdb) bt

#0 0x00000000004a3b5f in play_sound (loaded_sound_num=0, x=-1, y=-1, initial_gain=1) at sound.c:2975

#1 0x00000000004a4856 in update_sound (ms=20) at sound.c:3397

#2 0x00000000004b5d37 in my_timer (interval=20, data=0x0) at timers.c:44

#3 0x00002b82d95e41a8 in ?? () from /usr/lib/libSDL-1.2.so.0

#4 0x00002b82d9618068 in ?? () from /usr/lib/libSDL-1.2.so.0

#5 0x00002b82d95e3c49 in ?? () from /usr/lib/libSDL-1.2.so.0

#6 0x00002b82d9615d6c in ?? () from /usr/lib/libSDL-1.2.so.0

#7 0x00002b82d9737027 in start_thread () from /lib/libpthread.so.0

#8 0x00002b82dab2212d in clone () from /lib/libc.so.6

#9 0x0000000000000000 in ?? ()

Checked last today cvs update too.

Share this post


Link to post
Share on other sites
Last week or so I got annoying client crash on some (not all) map changes.

<snip>

2975 buffer = sound_sample_data[pNewType->part[stage].sample_num].buffer;

Hmmmm... that's a new one. It seems like the buffer hasn't been loaded, or is invalid or something.

A sound with x and y of -1 is invalid anyway so I'm guessing it must be coming back into range just in time for update_sound to process it and try to load it. I'll put some more checks in so it doesn't load stupid stuff.

Share this post


Link to post
Share on other sites

Just had a client crash on a map change. I can't really tell from gdb what's going on but thought it might be related to the other issues shown here. Using latest CVS with CLICKABLE_CONTINENT_MAP CLUSTER_INSIDES MINIMAP NEW_WEATHER NEW_SOUND NEW_ACTOR_SCALE enabled. Linux Debian etch.

Program terminated with signal 11, Segmentation fault.
#0  0xb7f0e16e in ?? ()
(gdb) where
#0  0xb7f0e16e in ?? ()
#1  0x00000000 in ?? ()
(gdb) bt full
#0  0xb7f0e16e in ?? ()
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.
(gdb) thread 1
[Switching to thread 1 (process 4863)]#0  0xb7f0e16e in ?? ()
(gdb) bt full
#0  0xb7f0e16e in ?? ()
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.
(gdb) thread 2
[Switching to thread 2 (process 4878)]#0  0xb7a3f787 in select ()
  from /lib/tls/libc.so.6
(gdb) bt full
#0  0xb7a3f787 in select () from /lib/tls/libc.so.6
No symbol table info available.
#1  0xb7d23034 in SDLNet_CheckSockets () from /usr/lib/libSDL_net-1.2.so.0
No symbol table info available.
#2  0x080c04bd in get_message_from_server (thread_args=0x83595d0)
at multiplayer.c:1856
	received = 42
	queue = (void *) 0xbdd6c08
	done = (int *) 0x83595d8
#3  0xb7e4f82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#4  0xb7e9cc8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#5  0xb76cc0bd in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#6  0xb7a46ace in clone () from /lib/tls/libc.so.6
No symbol table info available.
(gdb) thread 3
[Switching to thread 3 (process 4877)]#0  0xb7a0913c in nanosleep ()
  from /lib/tls/libc.so.6
(gdb) bt full
#0  0xb7a0913c in nanosleep () from /lib/tls/libc.so.6
No symbol table info available.
#1  0xb7e9f7b1 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#2  0x080de48c in update_streams (dummy=0x0) at sound.c:2316
	error = 0
	sleep = 500
	music_fade = 0
	sound_fade = 0
	crowd_fade = 0
	i = 2
	day_time = 0
	tx = 173
	ty = 110
	old_tx = 173
	old_ty = 110
	gain = 0
	cur_map = (map_sound_data *) 0xba233e8
#3  0xb7e4f82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#4  0xb7e9cc8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#5  0xb76cc0bd in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#6  0xb7a46ace in clone () from /lib/tls/libc.so.6
No symbol table info available.
(gdb) thread 4
[Switching to thread 4 (process 4876)]#0  0xb7a3f787 in select ()
  from /lib/tls/libc.so.6
(gdb) bt full
#0  0xb7a3f787 in select () from /lib/tls/libc.so.6
No symbol table info available.
#1  0xb7cd5e63 in alListeneriv () from /usr/lib/libopenal.so.0
No symbol table info available.
#2  0x00000000 in ?? ()
No symbol table info available.
(gdb) thread 5
[Switching to thread 5 (process 4874)]#0  0xb7a0913c in nanosleep ()
  from /lib/tls/libc.so.6
(gdb) bt full
#0  0xb7a0913c in nanosleep () from /lib/tls/libc.so.6
No symbol table info available.
#1  0xb7e9f7b1 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#2  0xb7e9f801 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#3  0xb7e4f82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#4  0xb7e9cc8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#5  0xb76cc0bd in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#6  0xb7a46ace in clone () from /lib/tls/libc.so.6
No symbol table info available.

Share this post


Link to post
Share on other sites

#0  0xb7f0e16e in ?? ()

 

Hmm, can you try a "info sharedlibrary" inside gdb ? I assume you extracted that from a core file.

 

That crash is inside a shlib, I could almost bet.

 

Álvaro

Share this post


Link to post
Share on other sites

Hmm, can you try a "info sharedlibrary" inside gdb ? I assume you extracted that from a core file.

Program terminated with signal 11, Segmentation fault.
#0  0xb7f0e16e in ?? ()
(gdb) info sharedlibrary
From		To		  Syms Read   Shared Object Library
0xb7e45c80  0xb7ea0004  Yes		 /usr/lib/libSDL-1.2.so.0
0xb7d405f0  0xb7e1a2b4  Yes		 /usr/lib/libxml2.so.2
0xb7d21f20  0xb7d23284  Yes		 /usr/lib/libSDL_net-1.2.so.0
0xb7d07af0  0xb7d0f434  Yes		 /usr/lib/libSDL_image-1.2.so.0
0xb7ccd230  0xb7cfba24  Yes		 /usr/lib/libopenal.so.0
0xb7c6f830  0xb7ca33a8  Yes		 /usr/lib/libGL.so.1
0xb7bd8790  0xb7c32ed4  Yes		 /usr/lib/libGLU.so.1
0xb7b67bf0  0xb7bb4d94  Yes		 /usr/lib/libcal3d.so.11
0xb7b29360  0xb7b44b84  Yes		 /lib/tls/libm.so.6
0xb7b206c0  0xb7b225e4  Yes		 /usr/lib/libalut.so.0
0xb7aff6a0  0xb7b1a484  Yes		 /usr/lib/libpng12.so.0
0xb7ad6a00  0xb7aec894  Yes		 /usr/lib/libvorbis.so.0
0xb7ace7b0  0xb7ad2cb4  Yes		 /usr/lib/libvorbisfile.so.3
0xb7aba6e0  0xb7ac7a84  Yes		 /usr/lib/libz.so.1
0xb7aae8a0  0xb7ab5bf4  Yes		 /lib/libgcc_s.so.1
0xb798fcb0  0xb7a85d7f  Yes		 /lib/tls/libc.so.6
0xb78a3c40  0xb7931524  Yes		 /usr/lib/libX11.so.6
0xb77e6860  0xb7860f14  Yes		 /usr/lib/libstdc++.so.6
0xb77a6c10  0xb77a7964  Yes		 /lib/tls/libdl.so.2
0xb7759510  0xb779cbd4  Yes		 /usr/lib/libdirectfb-0.9.so.25
0xb7749b80  0xb774c214  Yes		 /usr/lib/libfusion-0.9.so.25
0xb773bd80  0xb77447a4  Yes		 /usr/lib/libdirect-0.9.so.25
0xb76e17f0  0xb7720c64  Yes		 /usr/lib/libvga.so.1
0xb76cb310  0xb76d3214  Yes		 /lib/tls/libpthread.so.0
0xb6fb8f40  0xb75eb93c  Yes		 /usr/lib/libGLcore.so.1
0xb6f01450  0xb6f014a8  Yes		 /usr/lib/tls/libnvidia-tls.so.1
0xb6ef5660  0xb6eff174  Yes		 /usr/lib/libXext.so.6
0xb7f13790  0xb7f242cf  Yes		 /lib/ld-linux.so.2
0xb6eef220  0xb6ef15f4  Yes		 /usr/lib/libogg.so.0
0xb6eeba00  0xb6eec604  Yes		 /usr/lib/libXau.so.6
0xb6ee6f00  0xb6ee8ae4  Yes		 /usr/lib/libXdmcp.so.6
0xb7ef5480  0xb7ef5e54  Yes		 /usr/lib/gconv/ISO8859-1.so
0xb6e5c3e0  0xb6e61a54  Yes		 /usr/lib/libXrender.so.1
0xb7ef2bc0  0xb7ef3fc4  Yes		 /usr/lib/libXrandr.so.2
0xb6e542a0  0xb6e59404  Yes		 /usr/lib/libXcursor.so.1
0xb6e4df80  0xb6e50214  Yes		 /usr/lib/libXfixes.so.3
0xb575fb80  0xb57664f4  Yes		 /lib/tls/libnss_files.so.2
0xb5758de0  0xb575b864  Yes		 /lib/tls/libnss_dns.so.2
0xb57064b0  0xb5711c84  Yes		 /lib/tls/libresolv.so.2
0xb56fc970  0xb5701d74  Yes		 /usr/lib/libesd.so
0xb56d95e0  0xb56f28e0  Yes		 /usr/lib/libaudiofile.so.0
0xb5634900  0xb56bd3e4  Yes		 /usr/lib/libasound.so.2
(gdb)

Share this post


Link to post
Share on other sites

Ok, another large update.

 

There is a bunch of new config to support walking sounds for all creatures, as well as changing the volume based on the size set in the config. The walking sounds are also updated better now. I shall provide details later.

 

I've also added better support for volume so sounds like rain should start at the correct volume rather than full volume and then jump down (especially on map changes). This probably needs more testing.

 

I added an experimental feature to dim the other sounds proportional to the rain intensity. This has bugs, but if someone wants to have a look and see if you can find a pattern, that would be handy.

 

I've also noticed another case where sources are editing without being locked. Hopefully fixing that will make things more stable (Florian?).

Share this post


Link to post
Share on other sites

sound.c: In function 'set_sound_gain':
sound.c:3742: error: 'is_raining' undeclared (first use in this function)
sound.c:3742: error: (Each undeclared identifier is reported only once
sound.c:3742: error: for each function it appears in.)
sound.c:3742: error: 'rain_sound' undeclared (first use in this function)
sound.c:3745: error: 'rain_strength_bias' undeclared (first use in this function)

 

reason: NEW_WEATHER enabled

Edited by Florian

Share this post


Link to post
Share on other sites

I have been using the sound fx compiled and enabled for about 3 weeks, it is really the most expected development I wished to have in game. My system is Slackware Linux 12. with alsa, I compiled form CVS with a lot of new features, as SKY_VISION. I sometimes has crashes when I change some maps on IOTF way to hydro, but misteriously, only there. I was not able to identify if the sound has something to do with it, but probably it has not. Well, the goat cry when I heal sometimes scares me, but I understand that its just a test now. Please, if there is any test I can do to help, just pm me in game (Adranbach). You guys are doing a wonderfull job.

Share this post


Link to post
Share on other sites
I have been using the sound fx compiled and enabled for about 3 weeks, it is really the most expected development I wished to have in game.

<snip>

You guys are doing a wonderfull job.

Thanks. It has been a huge amount of work, but its almost done.

 

My system is Slackware Linux 12. with alsa, I compiled form CVS with a lot of new features, as SKY_VISION. I sometimes has crashes when I change some maps on IOTF way to hydro, but misteriously, only there. I was not able to identify if the sound has something to do with it, but probably it has not.
If you can run the client under a debugger (gdb) then it might tell you where it crashes, which will help us to fix it. Have a look at the pinned threads at the top of the forum for more info.

 

Well, the goat cry when I heal sometimes scares me, but I understand that its just a test now.
Hehehe, yeah, I find it funny. It will be a little sad to see it go once we get the "real" sound, but oh well.

 

Please, if there is any test I can do to help, just pm me in game (Adranbach).
Just playing with sounds on and posting if you notice any problems is all the testing we really need at this stage. If you do find the client is crashing regularly, if you can run it under the debugger (as mentioned above) then that can also be helpful, otherwise just report on any strange things that occur.

 

Thanks for your help in testing it. :-)

Share this post


Link to post
Share on other sites
reason: NEW_WEATHER enabled

Fixed.

 

There is a bunch of new config to support walking sounds for all creatures, as well as changing the volume based on the size set in the config. The walking sounds are also updated better now. I shall provide details later.

Ok, there are 3 new parts to the config. One was kinda already listed in the most recent config file, but it has been adjusted to be more flexible.

 

"Tile type" sections can be added to sound_config.xml to link tiles, sounds and creatures together. At this stage the check for a matching actor type is just done on the <actor_types> string, so the name must match the name in the actor defs file (not case sensitive).

<tile_type type="Grass">
<tiles>1,2,19,34,50</tiles>
<default>Grass 2Foot</default>
<actor_types sound="Grass 2Foot">human male,human female,troll,cyclops</actor_types>
<actor_types sound="Grass 4Foot">deer,boar,wolf,bear,horse</actor_types>
</tile_type>

 

The second part to this code is the ability to set a "sound_scale" property (between 0.0 and 1.0) to the walking animation for each actor. The default is currently 0.2.

This should be used as follows:

(note, the sound="Walk" is an optional actor default sound)

	<CAL_walk sound="Walk" sound_scale="0.2">./animations/player_walk.caf 0</CAL_walk>

My idea behind this is that dragons as the current largest creatures, will have a sound_scale of 1.0, and therefore be the loudest walkers, then everything should scale down from there. Ogres and other large creatures should be much louder than players for example, hence why I have suggested a sound_scale of 0.2 for players. I would also suggest that anything smaller than a wolf, or maybe a fox has a sound_scale of 0.0 and therefore doesn't play any sound.

 

 

The final part to this code is a new default in the <defaults> section.

<walking>Walk</walking>

This sets a global default for when no tile sound, or actor default sound can be found.

 

 

Finally, when testing this out, remember to change the <gain> of your walking sounds back to 1.0 in their definition or you will barely be able to hear them.

 

 

/edit: Added the global default.

Edited by Torg

Share this post


Link to post
Share on other sites
My system is Slackware Linux 12. with alsa, I compiled form CVS with a lot of new features, as SKY_VISION. I sometimes has crashes when I change some maps on IOTF way to hydro, but misteriously, only there. I was not able to identify if the sound has something to do with it, but probably it has not.
If you can run the client under a debugger (gdb) then it might tell you where it crashes, which will help us to fix it. Have a look at the pinned threads at the top of the forum for more info.

I reported that crash including a backtrace in the current CVS errors thread last week :happy:

Share this post


Link to post
Share on other sites
I reported that crash including a backtrace in the current CVS errors thread last week :happy:

Heh, well I did take a look (cos I always do)... but I couldn't see anything that stood out so given my current workload I've left it to someone else. That someone else at the moment is Grum. He's the guru. All hail Grum. Hopefully he can make more of it than I.

Share this post


Link to post
Share on other sites
I reported that crash including a backtrace in the current CVS errors thread last week :happy:

Would that be this post?

Heh, well I did take a look (cos I always do)... but I couldn't see anything that stood out so given my current workload I've left it to someone else. That someone else at the moment is Grum. He's the guru. All hail Grum. Hopefully he can make more of it than I.

ROFL.

 

Well, I did take a look (cos I always do :) ), but couldn't find anything obvious, then completely forgot about it. Sorry. Will take another stab at it tonight, though usual disclaimers apply (busy, busy, busy, ... if someone finds a fix I'll happily apply it without testing etc. )

 

EDIT: quoting fixed.

EDIT 2: hopefully fixed already.

Edited by Grum

Share this post


Link to post
Share on other sites

Another update...

 

Some fixes and things.

Particle sounds now have a check for other particle sounds already existing close to them (so only 1 sound per fireplace).

Enabling and disabling sounds and music should work properly.

Also extended the ability add sounds while sound is disabled (especially for rain and map sounds). This needs further work to play them when sound is later enabled however.

 

Probably some other stuff... meh. It's 2:20am, I'm going to bed. :-P

Share this post


Link to post
Share on other sites

Okay, I got some good news for OSX. Florian, please check out the new code. ALUT_WAV is not needed, but you will need to include the AudioToolbox.framework. I can hear the environmental sounds. This relies on OS X 10.4 OpenAL, so I do not know how well it will work for the 10.3.9 folks, but I have been dropping support for them anyhow (sorry).

Share this post


Link to post
Share on other sites

Not sure if this is the right place to post this but it only happens in the audio tab of elconfig so I'll start here.

I have no problem enabling/disabling "Enable Sound Effects" but I have a bit of trouble clicking the box to enable or disable music (takes a few or more attempts for the box to check or uncheck), and the "Dim Sounds when raining" box refuses to uncheck at all. I have tried relogging and that didn't help either.

In my el.ini file, it says:

#dim_sounds_on_rain= 2293172

 

Edit: upon further testing, changing the number to 0 or 1 will uncheck or check the box for me when i relog back on, but it does the same thing again if I check/uncheck it again.

Share this post


Link to post
Share on other sites
I have no problem enabling/disabling "Enable Sound Effects" but I have a bit of trouble clicking the box to enable or disable music (takes a few or more attempts for the box to check or uncheck), and the "Dim Sounds when raining" box refuses to uncheck at all. I have tried relogging and that didn't help either.

Hmmmm, not sure about the music one, but I was sure I fixed the Dim Sounds one yesterday. Have you got an updated CVS and reset the values to 0 for both?

Share this post


Link to post
Share on other sites
I have no problem enabling/disabling "Enable Sound Effects" but I have a bit of trouble clicking the box to enable or disable music (takes a few or more attempts for the box to check or uncheck), and the "Dim Sounds when raining" box refuses to uncheck at all. I have tried relogging and that didn't help either.

Hmmmm, not sure about the music one, but I was sure I fixed the Dim Sounds one yesterday. Have you got an updated CVS and reset the values to 0 for both?

Hmm I did update yesterday, can't remember when exactly though, very well could have been before you fixed it, I'll try again.

 

Edit: working now, thank you very much :omg: (sorry for the trouble) And btw, this is awesome work! :)

Share this post


Link to post
Share on other sites

Ok... some more bug fixen.

 

Actor sound_scale (for walking sounds) was slightly b0rked. This is now fixed.

Also hopefully fixed some bugs with rain sounds, but there are others in the NEW_WEATHER weather_sound_control() function.

 

I also have a new config ready. \o/

It's not quite how I wanted it, but it might suffice for wide range Beta testing.

Yes, that means I'm now officially declaring this code Beta quality and I will be building test clients for wider range testing over the next few days.

 

The new config files are available here: (right mouse click and choose "Save File As...")

http://ian.grug.redirectme.net/el/sound_config.xml

http://ian.grug.redirectme.net/el/mapsfx_c1.xml

 

Most of the sounds for this config can be found in Erdie's full sound archive file: http://www.erdie.de/el/fullpack.tar. More info on his sounds in this thread.

The additional temporary sounds can be found here: http://ian.grug.redirectme.net/el/new_sound4.zip

If you already have all of these sounds, you can get the only new sound here: http://ian.grug.redirectme.net/el/pageturn.wav

 

If there are any sounds missing, please let me know and I'll add them to the packages.

 

I will bundle and host my updated actor defs when I get the chance. If you want to try the changes, look at the first post, and add <CAL_walk sound_scale="(num)"> to the relevant parts of all the actor defs. Num is the volume for the walking sound. It is a number between 0.0 (no walking sound) and 1.0 (full volume). If nothing is added, 0.2 is the default. I am using 0.2 for player actors, around 0.7 for cyclops and 1.0 for dragons. Roja will adjust these scales for the final release.

 

/edit: Fixed the links.

Edited by Torg

Share this post


Link to post
Share on other sites

new error:

 

[20:12:23] Inserting new source at index 0/1
[20:12:23] Cookie 66. Playing this sound.
[20:12:23] Trying to add sound: 28 (Male pain) at 90, 146. Position: 105, 142, Gain: 1.000000
[20:12:23] Checking time of the day: Flags: 0xffff, Time: 45, Calc: 2, 0x2
[20:12:23] Got sample num: 5
[20:12:23] Attemping to load sound: File: sound/pain-male11.ogg
[20:12:23] Result: File: sound/pain-male11.ogg, Format: 4353, Size: 133120, Freq: 44100.000000
[20:12:23] Playing this sound: 28, Loaded sound num: 2
[20:12:23] Inserting new source at index 0/2
[20:12:23] Cookie 67. Playing this sound.
[20:12:24] Stopping cookie 66 with sound source index 1
[20:12:24] Stopping cookie 65 with sound source index 1
[20:12:24] Stopping cookie 67 with sound source index 0
[20:12:24] Trying to add sound: 32 (Stick attack) at 91, 142. Position: 105, 142, Gain: 1.000000
[20:12:24] Checking time of the day: Flags: 0xffff, Time: 45, Calc: 2, 0x2
[20:12:24] Playing this sound: 32, Loaded sound num: 0
[20:12:24] Creating a new source: 0/0
[20:12:24] Cookie 68. Playing this sound.
[20:12:24] update_streams - Not playing stream. Checking for crowd sound
[20:12:24] update_stream - Playing default crowd sound: 18
[20:12:24] stream_ogg error: Invalid Operation
Last message repeated 2 times
[20:12:24] Trying to add sound: 27 (Walk) at 90, 146. Position: 105, 142, Gain: 0.200000
[20:12:24] Checking time of the day: Flags: 0xffff, Time: 45, Calc: 2, 0x2
[20:12:24] Playing this sound: 27, Loaded sound num: 1
[20:12:24] Creating a new source: 1/1
[20:12:24] Cookie 69. Playing this sound.
[20:12:24] Stopping cookie 68 with sound source index 0
[20:12:24] Trying to add sound: 28 (Male pain) at 91, 142. Position: 105, 142, Gain: 1.000000
[20:12:24] Checking time of the day: Flags: 0xffff, Time: 45, Calc: 2, 0x2
[20:12:24] Playing this sound: 28, Loaded sound num: 0
[20:12:24] Inserting new source at index 0/1
[20:12:24] Cookie 70. Playing this sound.
[20:12:24] removing finished sound 28 (Male pain) at cookie 70, source index 0, loaded_sound: 0
[20:12:25] Stopping cookie 69 with sound source index 0
[20:12:25] stream_ogg error: Invalid Operation
[20:12:25] Trying to add sound: 32 (Stick attack) at 91, 142. Position: 105, 142, Gain: 1.000000
[20:12:25] Checking time of the day: Flags: 0xffff, Time: 45, Calc: 2, 0x2
[20:12:25] Playing this sound: 32, Loaded sound num: 0
[20:12:25] Creating a new source: 0/0
[20:12:25] Cookie 71. Playing this sound.
[20:12:25] stream_ogg error: Invalid Operation
Last message repeated 1 time 

 

The "update_streams - Not playing stream. Checking for crowd sound" seems to mess something up, after that I get the "stream_ogg error: Invalid Operation" almost for every sound.

Share this post


Link to post
Share on other sites
The "update_streams - Not playing stream. Checking for crowd sound" seems to mess something up, after that I get the "stream_ogg error: Invalid Operation" almost for every sound.

If you could uncomment or add some extra debugging and try to find the exact line causing the problem that would be handy.

 

I haven't changed any of the Ogg Vorbis code for a while (that I recall) so I don't understand why this is now occuring. All the recent changes have been to OpenAL code.

Share this post


Link to post
Share on other sites

Ok, next installment.

 

Fixed a few bugs, primarily streams (including music) now fade up and down when moving in and out of their defined areas.

I rebuild a bunch of the backend so hopefully sounds are added and removed more reliably now, especially when sound is disable (so they start correctly when its re-enabled).

I've added support for a dynamic number of sources based on the number reported by OpenAL

I also tidied up the init and config errors... more work to do, but its a start.

 

 

I'm not perfectly happy with the background sounds fading down and then the new one fading up. It leaves a blank spot in the middle which is odd. Eventually I want them to crossfade, but this requires a lot of work.

 

Basically, I need to add/extend code to dynamically manage different types and numbers of streams.

This includes starting and stopping streams, managing the data for them and dynamically allocating sources to them. Dynamic allocation of sources currently exists for individual sounds, but would need to be extended to support the 2 types of source usage. This impacts on the functions that current parse the sources list etc, etc, etc. It also requires the priority system be extended to streams. There needs to be a source allocated for the 3 base streams, with additional dynamic streams allocated according to source availability based on comparison of priorities between all the existing streams and sounds.

 

I did say it was a lot of work. :-P

Share this post


Link to post
Share on other sites

latest CVS:

 

[02:32:05] Warning: ALC_ENUMERATION_EXT not found. Unable to retrieve list of sound devices.

[02:32:05] Number of sources - mono: 12, stereo (probably undef): 0

[02:32:05] Error initializing sound: Error setting up listener - Invalid Value

[02:32:05] Starting streams thread

 

and I still get this:

 

[02:46:59] update_streams - Not playing stream. Checking for background sound. Pos: 103, 147, fade: -1

[02:47:03] update_streams - Not playing stream. Checking for crowd sound

[02:47:07] update_streams - Not playing stream. Checking for crowd sound

[02:47:08] update_streams - Not playing stream. Checking for crowd sound

[02:47:09] update_streams - Not playing stream. Checking for crowd sound

[02:47:10] update_streams - Not playing stream. Checking for crowd sound

...

[02:47:57] update_streams - Not playing stream. Checking for crowd sound

[02:47:58] update_streams - Not playing stream. Checking for crowd sound

[02:47:59] update_streams - Not playing stream. Checking for crowd sound

[02:48:00] update_streams - Not playing stream. Checking for crowd sound

[02:48:01] update_streams - Not playing stream. Checking for crowd sound

[02:48:02] update_streams - Not playing stream. Checking for crowd sound

[02:48:03] update_streams - Not playing stream. Checking for background sound. Pos: 105, 148, fade: 0

[02:48:03] stream_ogg error: Invalid Operation

[02:48:03] stream_ogg error: Invalid Operation

[02:48:03] update_streams - Not playing stream. Checking for crowd sound

[02:48:04] stream_ogg error: Invalid Operation

[02:48:04] stream_ogg error: Invalid Operation

Share this post


Link to post
Share on other sites

latest CVS:

[02:32:05] Warning: ALC_ENUMERATION_EXT not found. Unable to retrieve list of sound devices.

[02:32:05] Number of sources - mono: 12, stereo (probably undef): 0

[02:32:05] Error initializing sound: Error setting up listener - Invalid Value

[02:32:05] Starting streams thread

....

I get something similar and had a crash at start up (stupidly didn't get a core but I will if it happens again). I'm busy hacking hud.c so I though it was my doing and ran it through valgrind. I got the following snippet. The uninitialised read at sound.c:4263 is the hard coded attributes[3]. On my system attr_size is only 1. I have core files enabled now and will post again if I get another crash. Current CVS with hud.c modified for the statsbar scrolling I'm working on. Standard options plus CLICKABLE_CONTINENT_MAP, CLUSTER_INSIDES, MINIMAP, NEW_WEATHER, NOTEPAD, NEW_SOUND and NEW_ACTOR_SCALE on Linux, Debian Etch.

==13772==
==13772== Invalid read of size 4
==13772==	at 0x80E2D5C: init_sound (sound.c:4263)
==13772==	by 0x80DD670: turn_sound_on (sound.c:1592)
==13772==	by 0x80A4B41: init_stuff (init.c:930)
==13772==	by 0x80B907C: main (main.c:288)
==13772==  Address 0x6B4DC9C is 8 bytes after a block of size 4 alloc'd
==13772==	at 0x401D38B: malloc (vg_replace_malloc.c:149)
==13772==	by 0x80E2D31: init_sound (sound.c:4261)
==13772==	by 0x80DD670: turn_sound_on (sound.c:1592)
==13772==	by 0x80A4B41: init_stuff (init.c:930)
==13772==	by 0x80B907C: main (main.c:288)
==13772==
==13772== Process terminating with default action of signal 11 (SIGSEGV)
==13772==  Bad permissions for mapped region at address 0x81D8FF0
==13772==	at 0x80E096F: insert_sound_source_at_index (sound.c:3225)
==13772==	by 0x80E087C: get_available_source (sound.c:3199)
==13772==	by 0x80E048C: play_sound (sound.c:3052)
==13772==	by 0x80E03D5: add_sound_object_gain (sound.c:2998)
==13772==	by 0x80E00BD: add_sound_object (sound.c:2873)
==13772==	by 0x80BED44: connect_to_server (multiplayer.c:386)
==13772==	by 0x80A4B71: init_stuff (init.c:942)
==13772==	by 0x80B907C: main (main.c:288)
==13772==

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.

×