bsnes and pulseaudio

Archived bsnes development news, feature requests and bug reports. Forum is now located at http://board.byuu.org/
belegdol
Hazed
Posts: 68
Joined: Tue Dec 07, 2004 10:24 am

bsnes and pulseaudio

Post by belegdol »

Hi,

as you might know, more and more Linux distributions are switching to pulseaudio by default. The problem is that bsnes does not work very well with it. I tried many different configs and I found out that the only config so far that works more or less is openal -> sdl ->pulseaudio, but this one has a quite high CPU usage. Without pulseaudio, alsa, oss and libao all have much lower CPU demands, so using them would be preferred. Yet, none of these work with pulseaudio. alsa (via alsa-plugins-pulseaudio) locks up bsnes, oss (via padsp) or libao (via its pulse driver) cause cpu usage to go sky high - 20 fps on 2 ghz core 2 duo. It would be nice if this could be solved somehow so that bsnes would be able to happily coexist with pulseaudio. For reference, these tests were run on Fedora 9.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I'm probably going to reiterate what will probably be said, but pulseaudio itself is more likely the problem by definition.

You don't want to add more additional overhead and latency to something that demands a lot of CPU power and low latency.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

But he needs to hear the funky sounds from his im client and the voices in the flash adds while he looks up the solution to the puzzle he's too stupid to figure out.
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Post by I.S.T. »

henke37 wrote:But he needs to hear the funky sounds from his im client and the voices in the flash adds while he looks up the solution to the puzzle he's too stupid to figure out.
Now, that's unfair by zboard standards(I think). His question wasn't that stupid, merely uninformed.
byuu

Post by byuu »

God, damnit. Four, four Linux audio APIs implemented and it's still not good enough. Christ, and they wonder why Linux hasn't caught on yet.

Guess how many Windows audio drivers I have? And guess how many people can't get audio to work, despite my userbase for Windows being 10-50x the size?

Anyway, I don't know pulseaudio. If someone wants to make a driver, feel free and I'll be happy to include it. I also don't see any reason to be upset / rude with belegdol about it. Good information to know.

Oh, and I hear some GNU worshippers are trying to kill off GLX (eg OpenGL) support in Xorg now, because the license requires you to obey trade export laws (you can't make this stuff up.) So video support will probably suffer soon enough on these platforms.
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

Sorry, I didn't mean to be calling him rude. Yet I did, I need to think more carefully about exactly what I write. My apologies.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

byuu wrote:God, damnit. Four, four Linux audio APIs implemented and it's still not good enough. Christ, and they wonder why Linux hasn't caught on yet.

Guess how many Windows audio drivers I have? And guess how many people can't get audio to work, despite my userbase for Windows being 10-50x the size?
It's funny stuff, when you think about it.
Anyway, I don't know pulseaudio. If someone wants to make a driver, feel free and I'll be happy to include it. I also don't see any reason to be upset / rude with belegdol about it. Good information to know.
Well, if you haven't already seen the reports/requests to get ZSNES to use it, then you may want to tickle yourself at those posts.
Oh, and I hear some GNU worshippers are trying to kill off GLX (eg OpenGL) support in Xorg now, because the license requires you to obey trade export laws (you can't make this stuff up.) So video support will probably suffer soon enough on these platforms.
Those gripes are silly in comparison to the benefits of OpenGL's cross-platform friendlyness or a decent universal standard. I guess people are anal about their licenses... :?
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Post by I.S.T. »

Well, Open GL killed itself with 3.0, or at least began dying...
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I.S.T. wrote:Well, Open GL killed itself with 3.0, or at least began dying...
I'm not sure what you mean there. If you're talking about features and methods of accessing the stuff, then probably (it's been behind DX for a while anyways). It won't stop OpenGL from being impactful though.. just not ideal for the latest and greatest (and I'm not fond of vendor specific paths, other than to see what they can do).
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Post by I.S.T. »

Deathlike2 wrote:
I.S.T. wrote:Well, Open GL killed itself with 3.0, or at least began dying...
I'm not sure what you mean there. If you're talking about features and methods of accessing the stuff, then probably (it's been behind DX for a while anyways). It won't stop OpenGL from being impactful though.. just not ideal for the latest and greatest (and I'm not fond of vendor specific paths, other than to see what they can do).
Open GL 3.0 pissed off the Open GL devs. It had been promised ot be a full re-write of Open GL, fixing all of the little idiocies strung throughout it(Not that D3D doesn't have little stupid mistakes throughout it too...), tossing out old stuff that needs to go away and adding in DX10 style features(SM4.0, Geometry Shaders, things of that nature).

Pretty much all it did was add DX10 style features. They "marked" some old things as obsolete and up for deletion when 3.1 rolls around, and that's about it.

Open GL devs, who had basically been lied to up until the full unveiling of Gl3.0, were understandably pissed off. 2.0 had been promised to be a re-write as well.

Supposedly, 3.1 has been fast tracked to try and placate them.

The apparent reason for the lazy bullshit was internal politics and not wanting to piss off the workstation folks(Even then some of them were pissed off...).

http://forum.beyond3d.com has two topics dedicated to what happened. One in the 3D Technology & Algorithms forum and one in the News forum.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I'll take a look when I get the chance, thanks.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
belegdol
Hazed
Posts: 68
Joined: Tue Dec 07, 2004 10:24 am

Post by belegdol »

byuu wrote:God, damnit. Four, four Linux audio APIs implemented and it's still not good enough. Christ, and they wonder why Linux hasn't caught on yet.

Guess how many Windows audio drivers I have? And guess how many people can't get audio to work, despite my userbase for Windows being 10-50x the size?

Anyway, I don't know pulseaudio. If someone wants to make a driver, feel free and I'll be happy to include it. I also don't see any reason to be upset / rude with belegdol about it. Good information to know.

Oh, and I hear some GNU worshippers are trying to kill off GLX (eg OpenGL) support in Xorg now, because the license requires you to obey trade export laws (you can't make this stuff up.) So video support will probably suffer soon enough on these platforms.
I am not asking you to implement yet another audio driver. According to pulseaudio author, the compatibility layers (alsa-plugins-pulseaudio, padsp and so on) should just work provided the application does not abuse the interface. In fact, they do work in vast majority of the cases. Looks like bsnes does something pulseaudio does not like. I don't know what that is yet, but I'll post it here for sure once I figure it out.
wertigon
Rookie
Posts: 46
Joined: Sat Aug 07, 2004 7:20 pm

Post by wertigon »

byuu wrote:Oh, and I hear some GNU worshippers are trying to kill off GLX (eg OpenGL) support in Xorg now, because the license requires you to obey trade export laws (you can't make this stuff up.) So video support will probably suffer soon enough on these platforms.
Actually, they're not killing off GLX at all. What you're thinking of is Xgl, a technology that allows compositing desktops (e.g. Compiz) on Linux. And it's not as much "killing off" as replacing it with a better technology (AIGLX) that fits in much better with the X-server framework.

GLX isn't going anywhere anytime soon - Unless I'm missing something?
byuu

Post by byuu »

What you're thinking of is Xgl
Your powers of clairvoyance are weak, young Skywalker.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=211765
http://www.gnewsense.org/index.php?n=FAQ.FAQ#toc3
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

"gnewsense".. sounds like a "g-nuisance".. not a good way to keep my interest.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
wertigon
Rookie
Posts: 46
Joined: Sat Aug 07, 2004 7:20 pm

Post by wertigon »

gNewSence is a distro aimed at completely being free, so while it's removing GLX because of a "not sufficiently free" license, I doubt many others will follow suit. Like it or not, people want Compiz and GLX is a precondition for that. And I can't see anything about it being removed from Debian; the bug has been there since 2003. Why remove it now? Looks like it'll be rewritten sometime in the not-too-distant future, but it's not a priority of xorg since it's only two minor files (GL/glx/glxext.c and hw/dmx/glxProxy/glxext.c).
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

I'll take a look when I get the chance, thanks.
Also read: http://www.theregister.co.uk/2008/08/13 ... firestorm/

Puts all the comments in Beyond3D, into a nutshell.

but I agree with IST, this action by the Khronos Group is damn shameful. They promised a object oriented API, yet we are still stuck with the state machine model. They promised other things, yet we can get it all already via OpenGL 2.0/2.1 extensions.
odditude
Official tech support dood
Posts: 2118
Joined: Wed Jan 25, 2006 7:57 am

Post by odditude »

Deathlike2 wrote:"gnewsense".. sounds like a "g-nuisance".. not a good way to keep my interest.
that's actually exactly where the name came from.
Why yes, my shift key *IS* broken.
Dullaron
Lurker
Posts: 199
Joined: Mon Mar 10, 2008 11:36 pm

Post by Dullaron »

If things doesn't work right on Linux then there always windows. This is the way I look at it.

I haven't use Ubuntu in a few years. I might not touch it ever again since my other computer keep restarting and failing. I'm afraid to install it on Gateway because I do need another hard drive first.
Window Vista Home Premium 32-bit / Intel Core 2 Quad Q6600 2.40Ghz / 3.00 GB RAM / Nvidia GeForce 8500 GT
doktor_kris
Lurker
Posts: 102
Joined: Sat Feb 25, 2006 7:47 pm
Contact:

Post by doktor_kris »

Dullaron wrote:If things doesn't work right on Linux then there always windows.
«Play a sad one, Joe!»
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

Topic=derailed
ZH/Franky

Post by ZH/Franky »

topic = rerailed

About the problems bsnes has with pulseaudio...
I use version 8.04.1 of Ubuntu Linux, and I've recently replaced ALSA+PulseAudio with OSS4+esd on my system, and not only are the problems no longer there in terms of sound, I also get better performance in general (when using xv for system.video, with OSS4 instead of ALSA, video is now nice and smooth for me; just remember to set system.audio to oss)

Go to http://board.zsnes.com/phpBB2/viewtopic.php?t=11943 to find out about it.

PS:
Byuu, you said that there are now four linux audio API's;
pulseaudio is not an audio api, if I recall. It's more like esd, functioning as some kind of sound server.
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

It's still a separate API for audio, that's what matters.
AamirM
Regen Developer
Regen Developer
Posts: 533
Joined: Sun Feb 17, 2008 8:01 am
Contact:

Post by AamirM »

Hi,
God, damnit. Four, four Linux audio APIs implemented and it's still not good enough. Christ, and they wonder why Linux hasn't caught on yet
I really hope that Opensolaris and/or Mac OS X one day overtake linux (or gnu/linux or gnu/xorg/linux or gnu/xorg/kde/linux or whatever) as an alternative since they are full OS (not just a kernel) and much more controlled. The only good thing I can think of which GNU has done good is GCC. Everywhere else there seem to be more lawyers than real developers.

stay safe,

AamirM
henke37
Lurker
Posts: 152
Joined: Tue Apr 10, 2007 4:30 pm
Location: Sweden
Contact:

Post by henke37 »

<rant>There is one thing that I don't like about gcc, it has the worst and most useless inline assembler syntax ever. Seriously, embedded control characters? And honestly, why do I need to tell the compiler what registers I overwrote? Can't it figure that out itself?
</rant>
Locked