mh wrote:Why lib/? Shouldn't it use share/?
I thought it would be wise not to put customised "resources.cfg" and "plugins.cfg" into share/ since they might only work on the host where they were built - while I agree that the mpks should go there (imagine /usr/share being mounted on a host where Ogre is installed in /usr/local/ instead of /usr as on the file server. The server's plugins.cfg says the plugins are in /usr/lib/OGRE/ while they're actually in /usr/local/lib/OGRE/). However, I can't really see that funguloids will be an app where a network-wide installation is critical so then it's share.
mh wrote:Reading that, maybe the hiscores should be saved to /var/games/funguloids, so on a multiuser PC the players could compete for the best score..
I though about that before (and decided that to be overkill if it's implemented foolproof): you would have to make sure that there is a group for such use (e.g. games) and create it if it doesn't. Then all gamers must share this group. Or make the highscores world-writable, which is out of option (at least for me!). I thought I would probably hit every pitfall when trying to ensure this all, so I decided to give up. However, it might be a good thing to have at least the option to install it with a shared highscore file (this could be handled by the configure script). The funguloids executable could be installed setgid games but without any checks for the existants of this group etc.
Didn't work.
I have Audacious set to use default ALSA device, but Funguloids and it still can't play simultaneously..
Then I strongly believe that something isn't using dmix via the default device (checked your desktop's sound daemon?). Unfortunately, I haven't figured out yet how to tell which apps are using which (ALSA) device so looking which files are open is the way to go:
This is my lsof output when funguloids is the first app using sound output at all (it creates a socket in /tmp/):
Code: Select all
funguloid 6528 piet 11u unix 0xf57cfac0 29573 /tmp/alsa-dmix-6528-1177707487-72131
funguloid 6531 piet 11u unix 0xf57cfac0 29573 /tmp/alsa-dmix-6528-1177707487-72131
funguloid 7132 piet mem CHR 116,6 2711 /dev/snd/pcmC0D0p
funguloid 7132 piet 12u CHR 116,6 2711 /dev/snd/pcmC0D0p
funguloid 7132 piet 13r CHR 116,2 2743 /dev/snd/timer
funguloid 7134 piet mem CHR 116,6 2711 /dev/snd/pcmC0D0p
funguloid 7134 piet 12u CHR 116,6 2711 /dev/snd/pcmC0D0p
with funguloids still running and rocking I can start xmms (mp3 player) and have a perfect cacophony
XMMS doesn't open the socket in /tmp but the same sound device as funguloids:
Code: Select all
xmms 6661 piet mem CHR 116,6 2711 /dev/snd/pcmC0D0p
xmms 6661 piet 8u CHR 116,8 2672 /dev/snd/controlC0
xmms 6661 piet 10u CHR 116,2 2743 /dev/snd/timer
xmms 6661 piet 11u CHR 116,6 2711 /dev/snd/pcmC0D0p
xmms 6661 piet 12r CHR 116,8 2672 /dev/snd/controlC0
With OSS, you will get /dev/[sound/]dsp in the output:
Code: Select all
xmms 6661 piet 9r CHR 14,3 2693 /dev/dsp
Btw, should the changes to .asoundrc and/or .openalrc be in effect instantly, or after a restart? I tried restarting, but no luck.
The ALSA lib has to release all (hardware) sound device in use (closing all apps with sound output should do the trick). Changes in the openalrc took effect on each new start.
Right now I have that .asoundrc and have set "plug:dmix" for .openalrc.
That's not going to work. It's important that *all* apps use the default device and not "plug:dmix" directly. But I guess you have tried "default" in .openalrc, right? And note that OpenAL will *always* fall back to OSS even if it is not mentioned in the device list (as "dsp" or "native").
OpenAL complains about not being able to get audio access but I'd rather say that exiting the game isn't an option. I personally would leave it the way it is!?
Agreed, no need to exit. But it doesn't complain anything for me. From Ogre.log it would seem that everything works perfectly.
Strange, that's my output when sound is blocked by another app:
Code: Select all
ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave
open /dev/[sound/]dsp: Device or resource busy
OpanAL: cannot create OpenAL device
OpenALSoundSystem ERROR: cannot create SoundSystem.