Galcon 2 launched on Desktop and Steam and the iOS App Store! 560 players online!
:: Community ::
ForumsMessagesGroupsChat (1)Friends
 

Forums :: Galcon Fusion :: Support :: no sound - ubuntu 9.10

You must sign in to post.

Page 1 / 1 1 

no sound - ubuntu 9.10 :: Feb 12, 2010 @ 7:28pm

Cabin Boy muszek

Joined: Feb 12, 2010
Posts: 5

any clue?

muszek@bobek:/tmp/gfusion$ ls
bin  data  README.txt  run_me
muszek@bobek:/tmp/gfusion$ ./run_me 
SDL Runtime Version: 1.2.13
SDL Compile Version: 1.2.12
SDL_image Runtime Version: 1.2.7
SDL_image Compile Version: 1.2.6
SDL_BYTEORDER == SDL_LIL_ENDIAN
irrKlang 3D Sound Engine version 1.1.3
Could not load libasound.so
init_video: 0 0 0 0 1
_try_init_video(0,0,1)
Loadbmp: ../data/icon32.bmp
res: 1
res: 1920 x 1080
vinfo: 1920 x 1080
loading: ../data/hit.wav
loading: ../data/explode.wav
loading: ../data/join.wav
loading: ../data/leave.wav
loading: ../data/start.wav
loading: ../data/stop.wav
loading: ../data/ping.wav
loading: ../data/new_hit.wav
loading: ../data/new_launch.wav
loading: ../data/new_explode.wav
loading: ../data/click.wav
loading: ../data/kazoo.ogg
stream_load in ticks: 6
stream_load in ticks: 5
stream_load in ticks: 5
stream_load in ticks: 76
stream_load in ticks: 180
loading texture 16: loader.png
loading ../data/loader.png as 1, fast: 0
stream_load in ticks: 314
stream_load in ticks: 507
stream_load in ticks: 404
stream_load in ticks: 172
stream_load in ticks: 218
stream_load in ticks: 341
loading texture 9: fade.png
loading ../data/fade.png as 2, fast: 1
ticks:2.878000 len:111.272003 pos:2.878000
stream_play: 0:2.878000
setvol: 0
setplayposition: 1
setispaused: 0
Pos: set: 2878 get: 2877
loading texture 3: background05.jpg
loading ../data/background05.jpg as 3, fast: 1
loading texture 18: star.png
loading ../data/star.png as 4, fast: 0
loading texture 0: navmenus.png
loading ../data/navmenus.png as 5, fast: 0
loading texture 1: navmenus2.png
loading ../data/navmenus2.png as 6, fast: 0
loading texture 2: navmenus3.png
loading ../data/navmenus3.png as 7, fast: 0
loading texture 38: font3.png
loading ../data/font3.png as 8, fast: 0
loading texture 46: contentIcon_unfocused.png
loading ../data/contentIcon_unfocused.png as 9, fast: 0
loading texture 45: contentIcon_focused.png
loading ../data/contentIcon_focused.png as 10, fast: 0
loading texture 32: font1.png
loading ../data/font1.png as 11, fast: 0
Re: no sound - ubuntu 9.10 :: Feb 12, 2010 @ 7:46pm

Cabin Boy philhassey

Clan: Galconicorn
Joined: Nov 30, 2006
Posts: 3139
Location: Zarcon

The Developer
Looks like you need to install libasound :)

-Phil
Re: no sound - ubuntu 9.10 :: Feb 12, 2010 @ 9:33pm

Cabin Boy muszek

Joined: Feb 12, 2010
Posts: 5

there's only libasound2 in the repositories and it's already installed.
Re: no sound - ubuntu 9.10 :: Feb 13, 2010 @ 7:11am

Cabin Boy muszek

Joined: Feb 12, 2010
Posts: 5

maybe it's been looked for in the wrong location and I should just create a symlink?  where should it be?

muszek@bobek:~$ whereis libasound
libasound: /usr/lib/libasound.a /usr/lib/libasound.la /usr/lib/libasound.so /usr/lib64/libasound.a /usr/lib64/libasound.la /usr/lib64/libasound.so
Re: no sound - ubuntu 9.10 :: Feb 13, 2010 @ 10:24am

Cabin Boy philhassey

Clan: Galconicorn
Joined: Nov 30, 2006
Posts: 3139
Location: Zarcon

The Developer
Hmmn, I'm not sure.  I'll have to check this out .. it might take me a few days to get this figured out.

-Phil
Re: no sound - ubuntu 9.10 :: Feb 15, 2010 @ 11:57am

Cabin Boy maximb

Joined: Feb 13, 2010
Posts: 12

I also have the very same problem.

I run Ubuntu 9.10 64-bit and I get no sound, the error output is the same as above.

I've tried to link the sound libs but it still cannot find them (even after ldconfig) :

cd /usr/lib32; sudo ln -s libasound.so.2 libasound.so; sudo ldconfig;

Maybe it needs an older lib because the sound does work on my ancient RHEL5.1 .
 

P.S
When seeking help from the Linux Gurus one of them checked the issue and said :

"the game tries to load /usr/lib/libasound.so which is a 64bit library, instead of /usr/lib32/libasound.so "

Now it's up to the developers.
post updated on Feb 15, 2010 @ 1:30pm
Re: no sound - ubuntu 9.10 :: Feb 15, 2010 @ 12:58pm

Cabin Boy philhassey

Clan: Galconicorn
Joined: Nov 30, 2006
Posts: 3139
Location: Zarcon

The Developer
I've contacted the sound library vendor that I use.  Hopefully they'll be able to get a solution to me shortly! 

Thanks for the detailed info (64bit/32bit issues)

-Phil
Re: no sound - ubuntu 9.10 :: Feb 15, 2010 @ 1:26pm

Cabin Boy philhassey

Clan: Galconicorn
Joined: Nov 30, 2006
Posts: 3139
Location: Zarcon

The Developer
I've received word back from the irrklang sound people:

"This is a known problem (for a few days only), the problem is that irrklang
searches the alsa lib in /usr/lib/libasound.so, but on 64 bit systems it is
loacated in /usr/lib32/libasound.so. You can simply patch the irrKlang.so
file with a hex editor to replace that string with a simple 'libasound.so'
(add a zero to terminate the string there), and it should work then (on both
systems). I'm planning a bug fix release soon to remove this issue
permanently."

I'm not brave enough to hexedit .so files myself .. but if you want to give it ago, the author indicates this will resolve the problem.  Once an updated version of irrklang is released I'll include that with a new build.

Thanks!
-Phil
Re: no sound - ubuntu 9.10 :: Feb 15, 2010 @ 6:12pm

Cabin Boy muszek

Joined: Feb 12, 2010
Posts: 5

I'm using 64-bit version as well.  This might be helpful:

muszek@bobek:/usr$ ls lib | grep libasound
libasound.a
libasound.la
libasound.so
libasound.so.2
libasound.so.2.0.0
muszek@bobek:/usr$ ls lib32 | grep libasound
libasound.so.2
libasound.so.2.0.0
muszek@bobek:/usr$ ls lib64 | grep libasound
libasound.a
libasound.la
libasound.so
libasound.so.2
libasound.so.2.0.0
Re: no sound - ubuntu 9.10 :: Feb 16, 2010 @ 8:37am

Cabin Boy maximb

Joined: Feb 13, 2010
Posts: 12

Maybe until the official update someone can provide a 64-bit "adopted" irrKlang.so file ?

I know it shouldn't be that hard, and there isn't a real risk in experimenting because you can always backup the file in other location before messing with it...

Thanks in Advance.
Re: no sound - ubuntu 9.10 :: Feb 17, 2010 @ 5:26am

Cabin Boy samus_aran

Joined: Feb 17, 2010
Posts: 23

Hello, I am the so-called Linux Guru. :p

I tried out the game for muszek to determine what the sound problem was, and determined from an strace that the issue is the hard-coded loading of "/usr/lib/libasound.so" instead of letting the operating system choose the correct library location.

*Most* 32bit distros have the libasound.so library in that location, though there's nothing stopping the distro from placing it anywhere at all.  Using any hard-coded library paths is very bad coding practise.  Pretty much all 64bit distros do not have their 32bit libraries in /usr/lib, hence the problem.

As for patching the .so binary file, the instructions provided were incorrect and caused only a "Segmentation fault" when loading, because most binary files can't function if the length of the file changes (removing the 9 characters "/usr/lib/" in two locations changes the file length by 18 bytes).  I tried padding with NUL bytes instead of removing them, and it works fine.

This one-liner in PHP (requires PHP 5 or newer) will patch the .so file.  Run it once from inside the "bin" folder with the .so in it, and the game should have working sound on 64bit systems:

------------- copy and paste -------------

php -r 'file_put_contents("libIrrKlang.so", str_replace("/usr/lib/", "\0\0\0\0\0\0\0\0\0", file_get_contents("libIrrKlang.so")));'

------------- copy and paste -------------

Hope that helps!
post updated on Feb 17, 2010 @ 10:46am
Re: no sound - ubuntu 9.10 :: Feb 17, 2010 @ 6:04am

Cabin Boy samus_aran

Joined: Feb 17, 2010
Posts: 23

Thought I would also add that I tried out the game and really like it.  I would buy it, except the sound doesn't work for me, which is a turn-off.

The sound issue in my case is that Galcon Fusion requires ALSA for audio on Linux.  I use the OSS v4 sound system, as ALSA is buggy and unusable with my soundcard (it is so quiet I can barely hear it even when the speakers and mixer are turned up to maximum, whereas OSS is loud and clear at 1/4 volume).

Yours is actually the first ever commercial app I've seen that relies on ALSA exclusively.  The majority of commercial apps use OSS output, and the rest support either.  It should be noted that ALSA supports an emulated OSS output, so it serves both those with ALSA and OSS.

I am curious why you chose to use a proprietary sound library rather than just using Simple DirectMedia Layer's audio output?  You're already using SDL for the cross-platform graphics, so I don't understand the need for a third-party, closed-source, commercial sound library.  SDL can use numerous sound backends, including both OSS and ALSA on the Linux side.

I did a search on the libIrrKlang web site for OSS support, but Google didn't find any matches for "OSS".  Do you know if there is some alternate version of libIrrKlang that supports OSS output?
Re: no sound - ubuntu 9.10 :: Feb 17, 2010 @ 10:08am

Cabin Boy muszek

Joined: Feb 12, 2010
Posts: 5

Thanks samus_aran, the php code snipped did the trick.
Re: no sound - ubuntu 9.10 :: Feb 17, 2010 @ 11:05am

Cabin Boy philhassey

Clan: Galconicorn
Joined: Nov 30, 2006
Posts: 3139
Location: Zarcon

The Developer
irrklang just released an update fixing this issue, so that will be in my update coming out this week.

The reason I don't use SDL_mixer is because it doesn't work very well on any platform for doing anything beyond very simple stuff.

- Under OS/X it crashes when playing MP3s
- Under windows, it fails to play wavs sometimes
- Under linux, it clicks when playing oggs
- It can't play multiple music streams at a single time
- It can't accurately jump to positions in music

Cheers!
-Phil
Re: no sound - ubuntu 9.10 :: Feb 17, 2010 @ 12:04pm

Cabin Boy maximb

Joined: Feb 13, 2010
Posts: 12

Thanks samus_aran, your patch really did the trick.
I've also tried the developers way but failed.

Great game nonetheless - bought it.
Re: no sound - ubuntu 9.10 :: Feb 17, 2010 @ 4:24pm

Cabin Boy samus_aran

Joined: Feb 17, 2010
Posts: 23

irrklang just released an update fixing this issue, so that will be in my update coming out this week.

The reason I don't use SDL_mixer is because it doesn't work very well on any platform for doing anything beyond very simple stuff.

- Under OS/X it crashes when playing MP3s
- Under windows, it fails to play wavs sometimes
- Under linux, it clicks when playing oggs
- It can't play multiple music streams at a single time
- It can't accurately jump to positions in music

Cheers!
-Phil


None of those issues you listed seems like they would affect your game.  If MP3s crash OS X, use Vorbis. If Windows has issues with playing WAVs (hard to imagine), use Vorbis. If Linux clicks when playing Vorbis, submit a bug report -- that's completely messed up. I've also never experienced that myself, and I've used many SDL apps that have Vorbis audio.  It seems to just be a background track from the start on a loop, do you actually jump to positions in the music?  I haven't heard the game playing multiple music tracks, do you ever use this feature?
post updated on Feb 17, 2010 @ 4:25pm
Re: no sound - ubuntu 9.10 :: Feb 21, 2010 @ 11:00am

Cabin Boy maximb

Joined: Feb 13, 2010
Posts: 12

For those people who don't want to install php5 to execute samus_aran command, here is the file with the changes.
Just download it and overwrite the original.
The file should be placed at the gfusion/bin directory.

Thank samus_aran for making it work.

<a href="http://www.mediafire.com/?jwd2nmmywmn">http://www.mediafire.com/?jwd2nmmywmn</a>
post updated on Feb 21, 2010 @ 11:04am
Re: no sound - ubuntu 9.10 :: May 21, 2010 @ 8:01am

Cabin Boy kiddykoff

Joined: May 21, 2010
Posts: 1

the file has been deleted, does anyone have it?
Re: no sound - ubuntu 9.10 :: Sep 5, 2010 @ 7:06pm

Cabin Boy nhaines

Joined: Sep 4, 2010
Posts: 2

I patched it and tested it.  Works great in 64-bit Ubuntu 10.04.1 LTS.

http://ubuntuone.com/p/F2l/

Page 1 / 1 1 

You must sign in to post.