Page 1 of 2

Strange OpenAL error

Posted: Tue Mar 27, 2012 11:44 am
by STEVE555
Hi all,
I've noticed something odd about how Vegastrike detects OpenAL. I run the ./configure script with these options:

./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib --includedir=/usr/include --enable-permissive --enable-wall --with-python=2.7 --with-boost=system --enable-stencil-buffer --enable-nvidia-cg --with-openal-libs=/usr/local/lib --with-al-inc=/usr/local/include --with-boost=system

I've just recently downloaded the git version of OpenAL,and installed the libraries into the /usr/local folder.

When I run ./configure, I get this error during configuration:

Code: Select all

checking for jpeglib.h... yes
checking for openal library... yes
checking for AL/al.h... yes
checking for al.h... yes
checking AL/alext.h usability... no
checking AL/alext.h presence... yes
configure: WARNING: AL/alext.h: present but cannot be compiled
configure: WARNING: AL/alext.h:     check for missing prerequisite headers?
configure: WARNING: AL/alext.h: see the Autoconf documentation
configure: WARNING: AL/alext.h:     section "Present But Cannot Be Compiled"
configure: WARNING: AL/alext.h: proceeding with the compiler's result
checking for AL/alext.h... no
Configuring with OpenAL support!
checking for vorbis library... yes
checking for vorbis header... yes
found VORBIS header: Enabling ingame ogg support::  -DHAVE_SDL=1 -DSDL_WINDOWING=1      -DHAVE_AL=1 -I/usr/local/include  -DHAVE_OGG 
No Crypto++ support
I guess I could ignore the error,as Vegastrike does build fine,but recently after my last compile, I wasn't getting any incedental music playing. I was only getting the sounds from Jump Gates,pilot communication,and my weapons.

Regards,
Steve555

Re: Strange OpenAL error

Posted: Tue Mar 27, 2012 1:35 pm
by CLoneWolf
What is your sound option set to in vssetup?
Try "All Linux Sound" if it's not already selected, and see if anything changes.

Re: Strange OpenAL error

Posted: Tue Mar 27, 2012 3:01 pm
by TBeholder
CLoneWolf wrote:What is your sound option set to in vssetup?
What vssetup? it's about compiling.

Re: Strange OpenAL error

Posted: Tue Mar 27, 2012 4:19 pm
by klauss
TBeholder wrote:
CLoneWolf wrote:What is your sound option set to in vssetup?
What vssetup? it's about compiling.
If you have sounds you should have music too, except if you disabled it in vssetup. That's why he's asking.

In any case, we would need the config.log to find exactly why the compilation test failed with alext.h

In another note, cg is completely deprecated, it's been replaced by glsl.

Re: Strange OpenAL error

Posted: Tue Mar 27, 2012 6:47 pm
by STEVE555
Hi there Klauss,
I've tried "All Linux Sound" in ./vssetup. Sadly that didn't solve the problem I still can't hear the music.
My config.log is uploaded to this post.

Regards,
Steve555

Re: Strange OpenAL error

Posted: Tue Mar 27, 2012 7:18 pm
by klauss
I think the problem is it's not including AL/al.h before alext.h

Re: Strange OpenAL error

Posted: Sat Apr 07, 2012 11:47 pm
by stephane
Hi,

The good news is that one can fix this alext.h compilation error (when running configure) by manually editing the file and adding these 2 lines:
#include</usr/local/include/AL/al.h>
#include</usr/local/include/AL/alc.h>
just before the "#include <stddef.h>" line.

The bad news is that I still get no music in game ("All Sounds" selected, Vorbis/ogg files support detected, ogg files present).

Cheers,
- Stéphane

Re: Strange OpenAL error

Posted: Sun Apr 08, 2012 1:43 am
by loki1950
Hi right back stephane:
Could you post your config log and the output from the compile you may have missed something,an other set of eyes should pick it out of the noise :shock: And BTW how do you like all the new eye candy we have been adding lately.

Enjoy the Choice :)

Re: Strange OpenAL error

Posted: Sun Apr 08, 2012 4:48 am
by pheonixstorm
Has there been any bugs filed lately that match this with openal?

Re: Strange OpenAL error

Posted: Sun Apr 08, 2012 4:08 pm
by normal_user_uli
Hello all,

vegastrike SVN (compiled under opensuse 12.1 and 11.4) and both versions i downloaded from repositories (OpenSUSE 12.1 and 11.4 (http://download.opensuse.org/repositori ... nSUSE_12.1 // 11.4 ) start without music, only sound.
for testing i installed a old version vegastrike 0.5.0 (rar-archive), the game plays all music...; privateer plays all music too.
also i tested the repository version of vegastrike on my laptop (openSUSE_12.1): no music.

regards
Uli

Re: Strange OpenAL error

Posted: Sun Apr 08, 2012 8:38 pm
by stephane
Hi,

I've attached my configure log.

I'm on Mandriva 2011, and I've been compiling Vegastrike from the svn repository as well as the latest stable release downloaded from the website.
I've been trying to get music for a few days now, but I only get sounds.

When running the old Vegastrike 0.5.0 binary (installed from the Mandriva repository) and using the svn 0.5.1 data directory (-D option), I get music, so the data directory looks good. I'm not sure if the issue is openal actually. Now that I solved the configure error for alext.h, I still have no music.

Cheers,
- Stéphane

Re: Strange OpenAL error

Posted: Sun Apr 08, 2012 10:51 pm
by pheonixstorm
You might want to try a source pull from an earlier revision and see if it works or not. Start at 13332 for source and see if its the same. It's possible that this may not be related to the VS source code but best place to start is going back a few revisions in trunk first (source only). Also check and post versions for OpenAL, libogg, libvorbis, and ffmpeg (does ffmpeg handle any sounds or just video?). We should find a bug somewhere.

STEVE can you run back a few versions of libogg
stephane can you run back libvorbis
normal_user_uli can you do the same for openAL

I hope by working having each of you work seperatly we can find and fix the error faster.

klauss, have you reproduced this bug?

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 12:52 am
by loki1950
Bit of a reminder pheonixstorm that klauss mentioned of Friday that he would out of contact till maybe Tuesday so we are on our own till then. And re ffmpeg IIRC klauss did mention way back that he was using some of it's functions as helpers for streaming so it may well be involved in this issue.

Enjoy the Choice :)

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 3:04 am
by pheonixstorm
didn't see that.. so thats why I haven't seen him around :lol:

Actually I don't think ffmpeg has much to do with audio as the windows build does not require it and has no music issues.

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 2:32 pm
by normal_user_uli
hello all,

tried out to compile the earlier revisions started by 13332. This is the last version with music and sound playing for me. 13333 and others don´t play music. problem during compiling was the boost directory and the patch boost_gcc44.patch. i copied them from the latest cvn into the vegastrike directory. i copied the lastest svn data directory too. For compiling i used the ./bootstrap-sh ./configure and make. No parameters.

versions:
OpenAL: openal-soft 1.13-9.2 (OpenSUSE 12.1) libogg: 1.2.2-8.1.2 libvorbis: 1.3.2-12.3.1 ffmpeg: 0.10.2-2.1

regards
Uli

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 7:45 pm
by klauss
normal_user_uli wrote:Hello all,

vegastrike SVN (compiled under opensuse 12.1 and 11.4) and both versions i downloaded from repositories (OpenSUSE 12.1 and 11.4 (http://download.opensuse.org/repositori ... nSUSE_12.1 // 11.4 ) start without music, only sound.
for testing i installed a old version vegastrike 0.5.0 (rar-archive), the game plays all music...; privateer plays all music too.
also i tested the repository version of vegastrike on my laptop (openSUSE_12.1): no music.

regards
Uli
I develop and test in 11.4 and it runs with music. It's weird, I bet there must be something missing in the BuildRequires that fails to properly install OpenAL during the build in OBS.

I will test when I get back home, but please do file a bug report with all the details or we'll forget - forum posts get swallowed into oblivion after a while.

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 7:50 pm
by klauss
pheonixstorm wrote:didn't see that.. so thats why I haven't seen him around :lol:

Actually I don't think ffmpeg has much to do with audio as the windows build does not require it and has no music issues.
ffmpeg is used to parse all formats except ogg, for which we use libvorbis. Since all assets are ogg, ffmpeg should not be required except if you try to embed a video (we have no built-in support for any video format without ffmpeg).

I've been pondering, because openSUSE doesn't allow ffmpeg in its distribution, to add libtheora as a video decoding module and thus be able to support, ffmpeg-less, at least one complete movie format (theora+vorbis with ogg container).

In any case, music could get hit if somehow we build without libvorbis, but that doesn't seem to be the case if the OP still has sounds. Some sounds are uncompressed WAV, though, so it's still a possibility. I'll check OBS logs to see if it's detecting the libraries correctly.

PS: Can we get the console output for a run with --debug=3 ? That should shed some light into the issue.

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 8:20 pm
by stephane
Hi,

The problem seems to be related to a missing line in music.cpp.
In revision 13332, the music files were loaded if not already found in cache.

Code: Select all

            if (foundcache) {
                *me->music_load_info = wherecache->second;
                me->freeWav = false;
            } else if ( !AUDLoadSoundFile( songname, me->music_load_info, true ) ) {
                //fprintf(stderr, "Failed to load song %s\n", songname);
            }
In revision 13333 and newer, the music files aren't loaded anymore when not found in cache:

Code: Select all

            if (foundcache) {
                *me->music_load_info = wherecache->second;
                me->freeWav = false;
            }
I've checked out the latest svn version, and just added the missing line "} else if ( !AUDLoadSoundFile...", and I've got music again.
Maybe this AUDLoadSoundFile statement was removed because the music files were supposed to be loaded somewhere else and were expected to be found in cache?

Cheers,
- Stéphane

----------

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 8:29 pm
by pheonixstorm
No, my fault. I took that out due to the commented out section. I tested the compile and game after and it didn't *appear* to have any impact (still plays music in windows) but seems to go wonky in linux.

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 8:43 pm
by stephane
Isn't Windows using the soundserver component? I'm just asking that because I can see in the code that if it would be using soundserver, the line that you removed wouldn't be used at all. It could explain why Linux is affected while Windows is not.

Anyway, what's the next step to get this fixed?
Should I file a bug report? Or would I need to upload the fixed music.cpp with svn somehow?

- Stéphane

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 8:52 pm
by loki1950
Windows no longer needs soundsever stephane hasn't for about two years :wink: After a mighty DOH! pheonixstorm will likely put the offending lines back into the repo :D

Enjoy the Choice :)

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 8:59 pm
by pheonixstorm
soumdserver is no longer used for linux or windows. I can put the fix up in svn, not sure about the build systems. klauss will need to make the changes there.

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 9:11 pm
by stephane
Ok, ok, I admit it. Dinosaurs weren't quite extinct when I started playing Vegastrike on my abacus-powered clay tablet and soundserver was still a required component running as a monothreaded posix process on a dedicated didgeridoo.

Anyway, thx for looking into this issue :-)

Re: Strange OpenAL error

Posted: Mon Apr 09, 2012 11:23 pm
by klauss
pheonixstorm wrote:soumdserver is no longer used for linux or windows. I can put the fix up in svn, not sure about the build systems. klauss will need to make the changes there.
Yeah, as soon as you commit the fix, I'll patch the build system and everyone will be able to update quite easily. I'll have to update the tarball in SF too, though, but I'd like to wait a bit until we gather a few more fixes for that (ie: perhaps we get to fix those segfaults fglrx was getting).

Re: Strange OpenAL error

Posted: Tue Apr 10, 2012 7:08 am
by pheonixstorm
uploaded the corrected file. Makes me wonder if there are any other platform specific bugs that didn't show up in windows but have shown up in linux.