Go Back   Champions of Regnum > English > Technical Support > Linux

Linux Technical issues under Linux platform

Reply
 
Thread Tools Display Modes
Old 02-27-2008, 02:58 AM   #1
DaggerSpell
Pledge
 
DaggerSpell's Avatar
 
Join Date: Jun 2007
Posts: 27
DaggerSpell is on a distinguished road
Default New update 0.9.28: RO and other programs using sound at the same time

Hi everyone

I have a soundcard that doesn't allow hardware mixing. This has been a major problem for a couple programs as some lock down the soundcard meaning that no other programs can play sound at the same time. RO is one of those.

So a while back I have played around with aoss (ALSA OSS compatibility library) and got a setup that worked allowing me to have sound in RO, mumble and have music running at the same time.

It has worked perfectly for 3-4 months now. Unfortunatly with this update 0.9.28, if I use this method, RO crashes right after clicking on "enter game world". Without aoss, the game runs fine, but then no chance of having other applications using my soundcard.

Here are the configuration files I have used to get it to work

/etc/asound.conf
Code:
pcm.card0 {
type hw
card 0
#mmap_emulation true (disabled as it didn't work with alsa-lib 1.0.14-4)
}
pcm.!playback {
type dmix # dmix plugin for mixing the output
ipc_key 1234 # an uniqe number
slave {
pcm "card0"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}
pcm.!capture {
type dsnoop # dsnoop plugin for input
ipc_key 5678 # another uniqe number
slave {
pcm "card0"
period_time 0
period_size 1024
rate 44100
}
}
#
# combined playback/capture device
#
pcm.!duplex {
type asym
playback.pcm "playback"
capture.pcm "capture"
}
#
# making the playback/capture device default
#
pcm.!default {
type plug
slave.pcm "duplex"
}
#
# for oss compatibility (maybe)
#
pcm.!dsp {
type plug
slave.pcm "duplex"
}
ctl.!mixer0 {
type hw
card 0
}
~/.asoundrc
Code:
# .asoundrc to use skype at the same time as other audio apps like xmms
#
# Successfully tested on an IBM x40 with i810_audio using Linux 2.6.15 and
# Debian unstable with skype 1.2.0.18-API. No sound daemons (asound, esd, etc.)
# running. However, YMMV.
#
# For background, see:
#
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1228
# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1224
#
# (C) 2006-06-03 Lorenzo Colitti - http://www.colitti.com/lorenzo/
# Licensed under the GPLv2 or later

pcm.skype {
   type asym
   playback.pcm "skypeout"
   capture.pcm "skypein"
}
                                    
pcm.skypein {
   # Convert from 8-bit unsigned mono (default format set by aoss when
   # /dev/dsp is opened) to 16-bit signed stereo (expected by dsnoop)
   #
   # We can't just use a "plug" plugin because although the open will
   # succeed, the buffer sizes will be wrong and we'll hear no sound at
   # all.
   type route
   slave {
      pcm "skypedsnoop"
      format S16_LE
   }
   ttable {
      0 {0 0.5}
      1 {0 0.5}
   }
}

pcm.skypeout {
   # Just pass this on to the system dmix
   type plug
   slave {
      pcm "dmix"
   }
}

pcm.skypedsnoop {
   type dsnoop
   ipc_key 1133
   slave {
      # "Magic" buffer values to get skype audio to work
      # If these are not set, opening /dev/dsp succeeds but no sound
      # will be heard. According to the alsa developers this is due
      # to skype abusing the OSS API.
      pcm "hw:0,0"
      period_size 256
      periods 16
      buffer_size 16384
   }
   bindings {
      0 0
   }
}
And a little startup script to startup RO
Code:
#!/bin/bash

export MALLOC_CHECK_=0

cd /home/games/RO

aoss nice -n -5 /home/games/RO/rolauncher
*EDIT*
Here's a crashlog when using aoss with version 0.9.28 of RO
Code:
libs/libcore_client.so(_ZN10ClientBase14save_backtraceEv+0x7e) [0xb7d71afe]
libs/libcore_client.so(_ZN10ClientBase12client_crashEi+0x17) [0xb7d71e87]
[0xb7f9e420]
/lib/libc.so.6(__uflow+0x81) [0xb6f684e1]
/lib/libc.so.6(getc+0xac) [0xb6f6228c]
libs/liblua51.so(luaL_loadfile+0x2c3) [0xb71cccc3]
libs/libresource_system_extension.so(_ZN13ScriptManager10lua_dofileEP9lua_State+0xbf) [0xb76dc81f]
libs/liblua51.so [0xb71b473e]
libs/liblua51.so [0xb71b5016]
libs/liblua51.so [0xb71ae1a5]
libs/liblua51.so [0xb71b3b50]
libs/liblua51.so [0xb71b57a5]
libs/liblua51.so(lua_cpcall+0x4c) [0xb71ae20c]
libs/libresource_system_extension.so(_ZN13ScriptManager10run_scriptEP9lua_StatePKc+0xf0) [0xb76df090]
libs/libresource_system_extension.so(_ZN13ScriptManager6dofileEP9lua_State+0x3d) [0xb76e005d]
libs/liblua51.so [0xb71b473e]
libs/liblua51.so [0xb71b5016]
libs/liblua51.so [0xb71adfc1]
libs/liblua51.so [0xb71b3b50]
libs/liblua51.so [0xb71b57a5]
libs/liblua51.so(lua_pcall+0x69) [0xb71ae039]
libs/libentity_system.so(_ZN9LuaEntity4callEii+0xac) [0xb74d80fc]
libs/libentity_system.so(_ZN9LuaEntity6dofileEPKc+0x70) [0xb74d8eb0]
libs/libentity_system.so(_ZN9LuaEntity10run_scriptEPKc+0x39) [0xb74e1459]
libs/libconsole.so(_ZN7Console15creation_notifyEP7Message+0x160) [0xb7513bf0]
libs/libentity_system.so(_ZN13EntityManager32initialize_entity_as_custom_typeEPKciS1_P7MessageP6Entity+0x66f) [0xb74b7cff]
libs/libentity_system.so(_ZN13EntityManager27register_initialized_entityEPKciP6EntityP7Message+0x43) [0xb74b87e3]
libs/libcommon_entities.so(_ZN24ApplicationManagerEntity34start_application_entity_with_infoEPN17ApplicationEntity4DataEP7MessageP10EntityInfo+0xa7) [0xb7b5bac7]
libs/libcommon_entities.so(_ZN24ApplicationManagerEntity18launch_applicationEP7Message+0xb8a) [0xb7b5d2fa]
libs/libentity_system.so(_ZN6Entity22input_message_internalEP7Message+0xc3a) [0xb74aca5a]
libs/libentity_system.so(_ZN6Entity13input_messageEP7Message+0x22) [0xb74aac82]
libs/libentity_system.so(_ZN6Entity13input_messageEPKcP7Message+0x45) [0xb74aaef5]
libs/libregnum_client.so(_ZN10GameClient19initialize_entitiesEv+0x1cf2) [0xb7f3e9a2]
libs/libregnum_client.so(_ZN10GameClient4initEiPPc+0x92c) [0xb7f403cc]
libs/libregnum_client.so(_ZN10GameClientC1EiPPc+0xc1) [0xb7f41a51]
./game(main+0x37) [0x8048a87]
/lib/libc.so.6(__libc_start_main+0xe0) [0xb6f18390]
./game(__gxx_personality_v0+0x65) [0x80489b1]
*/EDIT*

As I mentioned above this method has worked for quite some time now (worked yesterday) and have a couple of other friends that used it with success on different distributions (ubuntu and I on archlinux). This now fails on their computer as well. It would be great if we could work out a solution to this problem and allow us to have other programs using the soundcard as well as RO.

Best regards,

Thesis
__________________
Thesis (Warlock) Alsius lvl 50 - La Fragua -

Last edited by DaggerSpell; 02-27-2008 at 03:25 AM.
DaggerSpell no ha iniciado sesión   Reply With Quote
Old 02-27-2008, 07:07 PM   #2
DaggerSpell
Pledge
 
DaggerSpell's Avatar
 
Join Date: Jun 2007
Posts: 27
DaggerSpell is on a distinguished road
Default [solved] New update 0.9.28: RO and other programs using sound at the same time

This solution works like a charm

I have just copied your /etc/openalrc file and modified my startup script not to use aoss.

Thanks a lot Katiechan.
__________________
Thesis (Warlock) Alsius lvl 50 - La Fragua -
DaggerSpell no ha iniciado sesión   Reply With Quote
Old 02-27-2008, 11:00 PM   #3
Dupa_z_Zasady
Banned
 
Dupa_z_Zasady's Avatar
 
Join Date: Dec 2007
Location: Poland
Posts: 489
Dupa_z_Zasady is an unknown quantity at this point
Default

yeah Katiechan, I can't hold to post big thanks for you!
Dupa_z_Zasady no ha iniciado sesión   Reply With Quote
Old 02-29-2008, 11:47 PM   #4
NightTwix
Count
 
NightTwix's Avatar
 
Join Date: Dec 2006
Location: Germany
Posts: 1,655
NightTwix is on a distinguished road
Default

Quote:
Originally Posted by Katiechan
Here is an example OpenAL configuration file(/etc/openalrc) that pipes to ALSA's dmix on most systems:
Code:
(define devices '(alsa))
(define speaker-num 2)
(define alsa-out-device "default")
(define alsa-in-device "default")
when i put that into my ~/.openalrc then my game wont pass the intro.
I never got openal to work on my system and had to use 'aoss' too.

anything else just mixes fine
NightTwix no ha iniciado sesión   Reply With Quote
Old 03-01-2008, 03:45 PM   #5
NightTwix
Count
 
NightTwix's Avatar
 
Join Date: Dec 2006
Location: Germany
Posts: 1,655
NightTwix is on a distinguished road
Default

Quote:
Originally Posted by Katiechan
Sometimes the Standard Implementation (SI) support for your setup is really bad, like for mine.
In this case using OpenAL Soft will work instead. There's a thread in this forum somewhere about it and why it helps.
uhm yeah i saw this thread. might give it a try
NightTwix no ha iniciado sesión   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
NGD Studios 2002-2024 © All rights reserved