Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Development » PulseAudio-compatible audio
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
PulseAudio-compatible audio [message #1830] Fri, 10 September 2010 13:07 Go to next message
dgtombs  [PM]
First off, let me say that Mednafen is fantastic! Really quality stuff, and feature-rich too.

I'm running Ubuntu, which as you all probably know, has used PulseAudio to manage its audio stack for a couple years. I guess PA doesn't have a great reputation around here (and I can understand why), but it is a great solution for the desktop even if it's sub-par for lower-level stuff like Mednafen.

Right now Mednafen sound doesn't work very well by default with PA. You have to run it with "pasuspender" (or just wait until nothing's using your card), which means all the other apps (media players, IM clients, etc.) just don't get their audio through. Reading the Mednafen docs, I understand this is because--by default--it opens "hw:0" for use with ALSA.

I'm not an audio guy, but I am a programmer and I'm a knowledgeable Ubuntu user so if I can improve a great program (Mednafen) to work with a great OS (Ubuntu), I'd love to try.

Seems to me the only future-proof way of fixing this, since even GNOME as a whole is moving towards PA, is not trying to open "hw:0". There seem to be three options for this:
  • Use ALSA device "default", but the docs say this has bad performance and I can confirm on my box.
  • Use SDL driver by default. The docs say this also has bad performance, but it seems comparable to ALSA hw on my box.
  • Write a PA backend. This means more maintenance, probably not worth it.

My uninformed opinion is that SDL should be used, and if it sucks, SDL should be fixed. It is supposed to be a gaming library, after all, and Mednafen is a classic example.

What are the developers' thoughts on this? Is there anything that can be done?

Thanks for the consideration.
Re: PulseAudio-compatible audio [message #1936 is a reply to message #1830 ] Mon, 22 November 2010 10:20 Go to previous messageGo to next message
SamDeRe81  [PM]
I also have Ubuntu Maverick and need to change it to SDL in order to get audio. I'm not even sure why honestly lol I'm confused, does Ubuntu use ALSA or PulseAudio? Both seem installed =/

Well anyways thanks
Re: PulseAudio-compatible audio [message #1993 is a reply to message #1830 ] Tue, 28 December 2010 17:23 Go to previous message
Themaister  [PM]
I did write a PulseAudio plugin for Mednafen once, but the performance was craptastic (random framedrops, audio pops, etc), so I didn't really bother with it. It's a terrible API to work with, that's for sure. I'm sure it could be fixed though, so if anyone is willing to work with it more I can post it.

SDL audio is bad. SDL could perform decently, but at that point anything else will too, really.

Mednafen's audio core is a bit shaky it seems, since it basically seems to require hw:0 (reliable _low_ fragment sizes, etc) to be able to perform well. It performs very well with hw:0 though, so I don't really know where the core issue is.

The best solution I think would be to make it work well with ALSA "default".
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:PCE.emu 1.3.2 (unofficial Android, iOS, WebOS, & PS3 port of Mednafen)
Next Topic:Game Boy Classic, Super Game Boy, and Game Boy color.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 18 11:17:38 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software