This forum has been archived. All content is frozen. Please use KDE Discuss instead.

SDL Audio in KDE4

Tags: None
(comma "," separated)
kadrach
Registered Member
Posts
8
Karma
0

SDL Audio in KDE4

Sun Oct 12, 2008 11:45 pm
Hi, I cannot get SDL audio working with KDE4 at all. SDL works fine in Gnome, so it has to be a KDE4 problem. I could not find any topic on this using Google, so I am wondering whether its just my machine acting up or a general problem.

The main reason for asking is that sound in zsnes and mupen64plus does not work :)

I get errors that /dev/dsp is in use and not available, so something must be hogging /dev/dsp. Tried killing the artsd, but that does not help.

Any suggestions?


kadrach, proud to be a member of KDE forums since 2008-Oct.
bfrog
Registered Member
Posts
2
Karma
0

RE: SDL Audio in KDE4

Mon Oct 13, 2008 1:16 am
Sounds like your using KDE3, in which case you may want to disable artsd altogether. I don't have kde3 anymore, but if I remember correctly its under settings->sound

or something along those lines.
kadrach
Registered Member
Posts
8
Karma
0

RE: SDL Audio in KDE4

Mon Oct 13, 2008 3:03 am
If you read the above post, you will notice that I use KDE4 :)


kadrach, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: SDL Audio in KDE4

Mon Oct 13, 2008 3:15 am
Check to make sure Gnome's esd isn't running either. It can also hog sound devices, and will be started along with most Gnome apps. Web browsers ( in the case of flash ), and any form of audio application ( skype ) are also likely suspects.

If this all fails, open konsole and type in this: lsof | grep /dev/dsp
Post its output here and i can tell you the offender.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kadrach
Registered Member
Posts
8
Karma
0

RE: SDL Audio in KDE4

Mon Oct 13, 2008 6:12 am
lsof does not list /dev/dsp as open.

Thus my mystification with this problem.

Neither esd/pulse are running. I was using pulseaudio with Gnome, but switched to KDE4.1 when it was released. Obviously, I no longer use pulseaudio. Phonon is configured to favour xine over gstreamer.[/align]


kadrach, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: SDL Audio in KDE4

Mon Oct 13, 2008 6:41 am
Now thats weird. Does it still work under Gnome?
Check the device preference under Sound In System Settings ( KDE4 Control Center ). It should be set to your sound card ( not pulseaudio )

What distribution do you have installed?

Intrestingly nothing opens /dev/dsp on my system either but they do open things under /dev/snd
Try this instead: lsof | grep /dev/snd/

Which returns entries for me.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kadrach
Registered Member
Posts
8
Karma
0

RE: SDL Audio in KDE4

Mon Oct 13, 2008 6:52 am
Yes, it works fine in Gnome.
System Settings lists pulseaudio and esd as possible output devices, but my sound card (HDA Intel (ALC880 Analog)) is listed at the top.

Using Ubuntu Hardy 2.6.24-19-generic with KDE4.1.2

Code: Select all
$ lsof | grep /dev/snd/
plasma    28854       niko  mem       CHR     116,16            11899 /dev/snd/pcmC0D0p
plasma    28854       niko   15u      CHR      116,0            11963 /dev/snd/controlC0
plasma    28854       niko   19r      CHR     116,33            11490 /dev/snd/timer
plasma    28854       niko   21u      CHR     116,16            11899 /dev/snd/pcmC0D0p
kmix      28898       niko   22u      CHR      116,0            11963 /dev/snd/controlC0


kadrach, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: SDL Audio in KDE4

Mon Oct 13, 2008 7:04 am
Now i see... plasma is to blame?
What widgets do you have on your plasma desktop?

My plasma process doesn't even touch the sound devices ( also running KDE 4.1.2 but on openSuSE 11.0 )

But i use pretty much the defaults. because the only ones i would be interested in would be system monitors but they tend to make plasma / X use the processor too much... not good on a laptop


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kadrach
Registered Member
Posts
8
Karma
0

RE: SDL Audio in KDE4

Mon Oct 13, 2008 7:15 am
Plasma is not the culprit either (and neither is kmix), as I have tried it after issuing a "kquitapp plasma", and SDL sound still does not work.

The widgets I currently use are teatimer, sticky notes, weather and folderview.


kadrach, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: SDL Audio in KDE4

Mon Oct 13, 2008 7:21 am
This gets stranger every minute.
Summary so far:
- zsnes and mupen64plus claim /dev/dsp to be in use only under KDE4
- yet no application has opened /dev/dsp under KDE4
- plasma for some reason opens a sound device in /dev/snd/
- even with plasma closed, /dev/dsp is "still in use"

Under Gnome, could you run both:
lsof | grep /dev/snd
lsof | grep /dev/dsp

Just to see if there is a difference?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kadrach
Registered Member
Posts
8
Karma
0

RE: SDL Audio in KDE4

Mon Oct 13, 2008 8:54 am
In Gnome:
Code: Select all
$ lsof | grep /dev/snd
mixer_app 30285       niko   20r      CHR      116,0            11963 /dev/snd/controlC0

Grepping for /dev/dsp returns empty.

I updated mupen64plus to svn version to see if there is any difference. The audio plugin now claims that there is no device available.

Last edited by kadrach on Mon Oct 13, 2008 8:55 am, edited 1 time in total.


kadrach, proud to be a member of KDE forums since 2008-Oct.
User avatar
aseigo
KDE Developer
Posts
124
Karma
2

RE: SDL Audio in KDE4

Tue Oct 14, 2008 12:27 am
My guess is that Phonon is using a backend which is not playing nice and claiming the soundcard.
Try (assuming your not on OpenSolaris ;) `killall -9 knotify4` and see if that fixes it? It's one of the few apps that use sound "in the background".


aseigo, proud to be a member of KDE forums since 2008-Oct.
kadrach
Registered Member
Posts
8
Karma
0

RE: SDL Audio in KDE4

Tue Oct 14, 2008 1:27 am
knotify4 does not stay dead, some process always starts a new instance when I kill it :/


kadrach, proud to be a member of KDE forums since 2008-Oct.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

RE: SDL Audio in KDE4

Tue Oct 14, 2008 5:48 am
sometimes i find that you just have to keep killing it. about 3 to 4 times usually does the trick :) then it doesn't get restarted anymore.
however it will return when you login again.

Last edited by bcooksley on Tue Oct 14, 2008 5:54 am, edited 1 time in total.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Vir
Registered Member
Posts
1
Karma
0

RE: SDL Audio in KDE4

Tue Oct 14, 2008 3:50 pm
I guess your SDL audio application either wants to use the ALSA hw device (i.e. no dmix) or the OSS /dev/dsp device. If you're sure that app is using dmix then something with phonon-xine is going really wrong. You should be able to find out what device phonon-xine is using by looking at the debug output of it.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]