XGalaga: Key pad and sound do not function on latest version of Hardy Heron

Bug #222779 reported by arm-c
8
Affects Status Importance Assigned to Milestone
xgalaga (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: xgalaga

Not sure of what the issue is with XGaliga. There are two problems I am having presently with the program.

a. The worst is that the keyboard control of the game does not function. It only accepts input from the mouse.

b. Less than optimal, sound fails to work with XGalaga since Gusty, and it remains the issue with Heron.

I don't have a crash or anything to attach.

Tags: patch
Revision history for this message
benni (benjamin-baermann) wrote :

The sound problem seems to be related with alsa/oss. I got "xgal.sndsrv: Couldn't open DSP /dev/dsp" sometimes. But sometimes the sound worked. I also tryed "aoss xgalaga" and got some sound, but a wired one. There is maybe some development in process around this issue: http://sourceforge.net/forum/forum.php?thread_id=2153592&forum_id=404316

Revision history for this message
Yudai8 (yudai8) wrote :

When I lunch from gnome-terminal to type xgalaga, it sounds.
I found that from gnome-terminal xgalaga make sub-process but from desktop menu xgalaga lunches alone.

$ ps xf | less
19036 ? S 0:26 xgalaga
18922 ? Sl 0:04 gnome-terminal
18925 ? S 0:00 \_ gnome-pty-helper
18926 pts/0 Ss 0:00 \_ bash
19067 pts/0 S+ 0:30 | \_ xgalaga
19068 pts/0 S+ 0:06 | \_ /usr/share/games/xgalaga/xgal.sndsrv.oss /usr/share/games/xgalaga/sounds/ /dev/dsp

Revision history for this message
Yudai8 (yudai8) wrote :

The fix by using padsp --- $ padsp -n xgalaga xgalaga

It seems that a click sound played by the desktop system when xgalaga lunches or the sounds of the other application like mpd or Audacious, or any sounds via pulse audio or via directly ALSA, block(s) xgalaga's opening DSP /dev/dsp.

When xgalaga lunches from the desktop, the desktop system plays a click sound for example "clicked.wav". And the sound uses alsa pcm via pulse audio.
Since alsa pcm is in use, xgalaga fails to open DSP /dev/dsp.

Xgalaga lunching from the desktop can play sounds in the condition 1 and 2;
1. Uncheck sounds for events in Sound Preferences [System]->[Preferences]->[Sound]
2. No sound. --- no application makes sound. Not using audio player. So pulse audio is not in use, and alsa pcm is free

Try in the terminal with/without audio player playing.
$ ( xgalaga -window & ); sleep 0.5 ; ps axfww -o tty,ppid,pid,uid,args | grep '[C]OMMAND\|[x]galaga'

And also try
$ ( padsp xgalaga -window & ); sleep 0.5 ; ps fww -o tty,ppid,pid,uid,args -C xgalaga -C xgal.sndsrv.oss

Even in the condition of other's sound, by using of padsp, xgalaga lunched from desktop application menu can play sounds via pulse audio.
$ padsp -n xgalaga xgalaga

To make xgalaga use padsp from the desktop,
Right click [application]->[edit menu] and choose the luncher properties of xgalaga.
Edit command field to "padsp -n xgalaga xgalaga" in luncher properties.

Or edit xgalaga.desktop in "/usr/share/applications/" or "~/.local/share/applications/".
I append a patch. But it was edited only 1 line.('_^)/

I feel sorry that It is the end of desktop ver. of Hardy LTS to I find this fix.

Anyway, it seems that padsp makes many applications playable that uses the OSS (Open Sound System).
And it's only editting ".desktop" file to make use padsp.

I think this sound probrem is a kind of a packaging probrem.
I know there are users who do not use pluse audio. But it is not the default setting. It is needed to install-and-work with no change the configulations. So I think it is better to make using padsp default or take other better way.

But I think the providing seamless /dev/dsp emulation of pulse audio is the better way than wrapping by padsp.
I haven't tested but osspd is seems the one.

tags: added: patch
Revision history for this message
doniks (kaabud-lp) wrote :

Im using kubuntu 11.04 and im also not hearing any sound from xgalaga not even when using padsp. maybe i havent full understood everything yudai said but i tried the following:

$ xgalaga -window -keyboard
xgal.sndsrv: Couldn't open DSP /dev/dsp

$ padsp xgalaga -window -keyboard
xgal.sndsrv: Couldn't open mixer /dev/mixer

so yes padsp makes a difference : it fails on /dev/mixer instead of on /dev/dsp, yet i still cant hear anything.

Revision history for this message
Bill (hudacek) wrote :

Same here, on w500, xubuntu 11.04, xgalaga 2.1.1.0-3.

It happens with both xgalaga and xgalaga-hyperspace.

I'm aware that this is an intentional change in Ubuntu 11.04 (sigh). However, for an app to use /dev/dsp and /dev/mixer these days is rather anachronistic. OSS was so 90's :-)

Any chance the upstream application could be 'repaired' to work in today's world?

Otherwise, I'll simply have to limit my 'leisure time' to my 2001 a21p (still running lucid).

"McPost"

Revision history for this message
Stephen M. Webb (bregma) wrote :

This still happens in Ubuntu 10.10. Same symptoms, same pdsp solution.

Changed in xgalaga (Ubuntu):
status: New → Confirmed
Revision history for this message
chipschap (bobnewell) wrote :

As noted above you can get sound with padsp but it sometimes lags. I rewrote the sound daemon to use pulse audio and that works fine. It's kind of hack code, and works only on pulse audio, so I haven't submitted patches (and not sure I know how either!), but if anyone wants either the source or precompiled binaries just write to <email address hidden> and I'm happy to send it along.

I don't know about the keypad problem, I haven't seen it.

I also fixed an issue in the stock Ubuntu that overscans in full-screen (at least on my desktop system). Again, I didn't submit a patch because it's a real hack job.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.