Strange sound problems (stuttering)

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
User avatar
Crushy
Trained
Trained
Posts: 58
Joined: 01 Aug 2009, 05:40
Location: Somewhere in Portugal, land of the Cod

Strange sound problems (stuttering)

Post by Crushy »

I get weird scratch noises with Warzone recently, I think it's related to multiple different weapons firing at roughly the same time. I didn't get this up until recently and when I use pulseaudio volume control to watch the "streams" accessing pulseaudio something really strange happens (the warzone stream keeps disappearing, I'm trying to figure out how to upload a video showing this). Here's the terminal output

Code: Select all

$ warzone2100 --debug sound
sound   |04:59:50: [PrintOpenALVersion] OpenAL Vendor: OpenAL Community
sound   |04:59:50: [PrintOpenALVersion] OpenAL Version: 1.1 ALSOFT 1.8.466
sound   |04:59:50: [PrintOpenALVersion] OpenAL Renderer: OpenAL Soft
sound   |04:59:50: [PrintOpenALVersion] OpenAL Extensions: AL_EXTX_buffer_sub_data AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_OFFSET AL_EXTX_source_distance_model AL_LOKI_quadriphonic
sound   |04:59:50: [PrintOpenALVersion] available openAL device(s) are: ALSA Software
sound   |04:59:50: [PrintOpenALVersion] available openAL device(s) are: OSS Software
sound   |04:59:50: [PrintOpenALVersion] available openAL device(s) are: Wave File Writer
sound   |04:59:50: [PlayList_Read] Added song track1.ogg to playlist
sound   |04:59:50: [PlayList_Read] Added song track2.ogg to playlist
sound   |04:59:50: [cdAudio_Open] called(music)
sound   |04:59:51: [cdAudio_PlayTrack] called(0)
sound   |04:59:51: [cdAudio_OpenTrack] called(music/menu.ogg)
sound   |04:59:51: [cdAudio_Stop] called, cdStream=(nil)
sound   |04:59:51: [cdAudio_OpenTrack] successful(music/menu.ogg)
sound   |04:59:55: [cdAudio_Resume] called
last message repeated 2 times
last message repeated 2 times (total 4 repeats)
last message repeated 4 times (total 8 repeats)
last message repeated 3 times (total 11 repeats)
sound   |05:01:11: [__sound_GetError] OpenAL raised an error: "AL_INVALID_OPERATION: Illegal call"; at openal_track.c:566
error   |05:01:18: [researchResult] researchResult - more than 32 weapons now available
last message repeated 2 times
last message repeated 2 times (total 4 repeats)
last message repeated 4 times (total 8 repeats)
last message repeated 8 times (total 16 repeats)
sound   |05:02:01: [__sound_GetError] OpenAL raised an error: "AL_INVALID_NAME: Invalid name parameter passed"; at openal_track.c:1186
sound   |05:02:11: [__sound_GetError] OpenAL raised an error: "AL_INVALID_NAME: Invalid name parameter passed"; at openal_track.c:406
last message repeated 2 times
sound   |05:02:17: [__sound_GetError] OpenAL raised an error: "AL_INVALID_NAME: Invalid name parameter passed"; at openal_track.c:1186
sound   |05:02:20: [cdAudio_Stop] called, cdStream=0xb21f9d8
sound   |05:02:21: [cdAudio_PlayTrack] called(0)
sound   |05:02:21: [cdAudio_OpenTrack] called(music/menu.ogg)
sound   |05:02:21: [cdAudio_Stop] called, cdStream=(nil)
sound   |05:02:21: [cdAudio_OpenTrack] successful(music/menu.ogg)
sound   |05:02:23: [cdAudio_Close] called
sound   |05:02:23: [cdAudio_Stop] called, cdStream=0xc04b6e8
sound   |05:02:23: [sound_ShutdownLibrary] starting shutdown
sound   |05:02:23: [sound_ShutdownLibrary] make default context NULL
sound   |05:02:23: [sound_ShutdownLibrary] destroy previous context
sound   |05:02:23: [sound_ShutdownLibrary] close device
AL lib: alBuffer.c:1079: exit(): deleting 1 Buffer(s)
All the other games using pulseaudio and OpenAL work fine.
Current status: Sick and Learning to model in blender. Failing at both.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Strange sound problems (stuttering)

Post by stiv »

sound |04:59:50: [PrintOpenALVersion] OpenAL Version: 1.1 ALSOFT 1.8.466
Note: OpenAL comes in two flavors: a reference implementation called OpenAL and the latest/greatest version called OpenAL-soft. The latter is what you find in most linux distros.

Someone did some research awhile back, and found that each successive release of OpenAL-soft consumed even more CPU than the previous one. I had brutal stuttering sound problems problems after an upgrade to openSUSE 11.2. Long story short: after removing Openal-soft and installing the old OpenAL reference implementation life was good again. ( I also uninstalled the evil pulseAudio, but that is a different story)

Buginator has written a patch the improves WZ's sound handling. It seems to help and probably will be in the next 2.2.2 release. The patch is available in the usual places.
User avatar
Crushy
Trained
Trained
Posts: 58
Joined: 01 Aug 2009, 05:40
Location: Somewhere in Portugal, land of the Cod

Re: Strange sound problems (stuttering)

Post by Crushy »

Curiously I thought of doing that a while ago, had some problems so I completely removed it and now I can't compile warzone because pDeviceNames isn't declared.
Current status: Sick and Learning to model in blender. Failing at both.
User avatar
Crushy
Trained
Trained
Posts: 58
Joined: 01 Aug 2009, 05:40
Location: Somewhere in Portugal, land of the Cod

Re: Strange sound problems (stuttering)

Post by Crushy »

Can someone do me a favor and try to find out where ALchar is defined? I can't bloody find it :|

EDIT: HOLY CRAP I DID IT, I had to manualy install the latest OpenAl soft unfortunately.

Do you happen to have a guide to try out the original OpenAL? I couldn't figure it out by myself...
Current status: Sick and Learning to model in blender. Failing at both.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Strange sound problems (stuttering)

Post by stiv »

On suse, I found both openal and openal-soft via the package manager.

You will need to install both the openal and the openal-dev (or -devel) package. The development part contains the headers you will need to compile WZ. For just running the game, you only need the openal package which contains the shared libs.
User avatar
Crushy
Trained
Trained
Posts: 58
Joined: 01 Aug 2009, 05:40
Location: Somewhere in Portugal, land of the Cod

Re: Strange sound problems (stuttering)

Post by Crushy »

stiv wrote:On suse, I found both openal and openal-soft via the package manager.

You will need to install both the openal and the openal-dev (or -devel) package. The development part contains the headers you will need to compile WZ. For just running the game, you only need the openal package which contains the shared libs.
Unfortunately we don't get to choose in Ubuntu... there's only libopenal and I think that's openal soft. I tried doing a manual compile and install from the official website but I have a feeling all that did was screw everything up in such a way that removing all traces and reinstalling the soft .debs didn't work. (I eventually had to install and compile everything by hand)
Current status: Sick and Learning to model in blender. Failing at both.
Post Reply