Registered Member
|
Phonon is Kde's main sound server, but there are many applications that use other sound servers like jack, alsa, pulseaudio, and even esd. Having multiple sound servers running at the same time seems a little bit ridiculous to me, not to mention all of the bugs it probably causes. So, why not make phonon capable of running all of the more prominent sound server protocols (jack, pulseaudio, alsa, esd, oss) give it the capabilities and quality of jack (sound routing from applictaion to application + realtime). Therefore there would be only one server for all protocols. I would definitely use that.
A small chart showing conceptually what it might do. Blue lines are examples of routed connections to other programs. Each app would need its own connections, not just a set of connections per server node.
Last edited by xax200 on Mon Jan 18, 2010 2:37 am, edited 3 times in total.
|
Moderator
|
Check System settings-> Multimedia. Is that what you wish?
You can set priority of sound servers etc...
Primoz, proud to be a member of KDE forums since 2008-Nov.
|
Registered Member
|
No, though that feature is nice.
What I'm talking about is a phonon server that connects directly to the ALSA driver, provides software mixing, and is able to process requests that would go to other servers without the other servers running at all. For example, the sound stream from rythymbox would be routed to phonon, where it would then be processed internally and software mixed to the hardware output. But, in a gui, you could also choose to have it routed to recording software or an internet stream simultaneously and at low latency. Right now, to run the majority of programs that use sound, you have to have at least pulseaudio, phonon, and possibly jackdmp running if you do ANY sound recording or routing. It seems inefficient to me. So basically, my idea is to cut out all of the "middle middle men" in the sound processing world of linux by making phonon able to handle everything the other sound processors, but better. |
KDE Developer
|
This would be a nice idea if Phonon were a sound server, but it isn't.
Phonon is a multi media API, implemented by various backends, e.g. GStreamer. What you are looking for is something like Pulse Audio. It is exactly intended for what you're suggesting, it mixes audio channels for systems that either do not have hardware mixing or do not use software mixing on a lower level (e.g. ALSA or OSS) or want any of the additional features such as per-channel volume.
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Well, that's unfortunate. I find pulse audio to be buggy at best, and setting it up to work with jack for real time processing and mixing is a nightmare. Maybe a Phonon sound server should be created using the phonon multimedia API. Phonon already supports mixing sound directly to the hardware card doesn't it? Sounds very server like to me.
The basic API for phonon is this: MediaObjects, Paths, and Outputs. As far as I can tell, phonon can open up the sound card as an output path. Also, any recording interface can be opened as a MediaObject. Paths would be fairly self-explanatory at this point. So, all there needs to be are various nodes that would intercept the streams that would go to pulseaudio, jack, alsa, esd, and oss. Pulseaudio already does that sort of thing with esd, alsa, and oss, but is very buggy (I'm guessing the code isn't very clean). Finally, add an awesome gui/plasmoid to control volume and connections manually and you're done! |
Registered Member
|
Phonon is no soundserver, thats true. But it nicely integrates into KDE and pipes the sound to the real output. If the sound is wrapped to phonon it would be a great help because you can than define yourself which sound-server should be used and as thus it would allow much more flexiblity for sound on kde.
Twitter: @API_Beast
|
KDE Developer
|
I know that Phonon is hard to understand for people who are not aware of its architecture and design goals, even for developers, so I'll try a different approach.
Phonon doesn't do anything, it delegates everything. It is a bit like when editing a Wiki page: we use special markup for formatting and from our point of few it looks like the browser then turns this into HTML when we save the page. However, in fact it just delegates that to the Wiki engine running on the web server and just displays that engine's output. Phonon also provides "markup" (C++ classes) for "formatting" (flow control, effects) media output, but it doesn't process the media itself, it sends the chosen "markup" to somethings else, a Backend. Like the Wiki Engine this backend then processes the chosen media path. There is a variation of backends either already available or under development, e.g. for Linux there is a backend based on the Xine media engine and one based on th GStreamer media engine. These engines are capable of writing output data either directly to the system's device drivers, e.g. ALSA, or to some further processing stage, e.g. PulseAudio or Jack. Since basically all media engines have similar output capabilities, a system setup can use the same for all of them, e.g. Jack, meaning that whatever media engine is used by any application will end up in a Jack processing pipeline before it hits the actual device driver. Or they could be setup to all use ALSA, so all applications would write to the device driver directly (which depending in its setup will then do software mixing or delegate that even further to the hardware). KDE applications using Phonon are just like applications using Xine or GStreamer directly, because these engines do the media processing.
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Sure, but then the idea would be simple that everything gets "delegated" by phonon and as thus would all use the same soundserver/backend (to the soundserver/backend which is selected for phonon) which wouldn't not be bad either.
Twitter: @API_Beast
|
KDE Developer
|
Correct. Everything gets delegated by Phonon, thus using the same output, e.g. sound server or direct output
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Ok, so I understand that Phonon itself is not in fact a sound server. What I would like is for KDE to make a sound server based on high quality, low-latency, and ease of configurability. Like jack, except jack is a beast to set up for newbies. Also, jack is buggy. Pulseaudio is even harder to set up if you want to use the jack server, and is also extremely buggy.
I just want a sound server that when you start it up, it has the option to kill all the other servers, capture streams that would go to them, and make them ALL available for routing to various programs without suffering from ridiculous amounts of popping noises. Also, jack only supports one sound card at a time, which is a problem in my eyes. To me, it seems as if Linux has the most powerful architecture with the most flexibility. Even on windows and mac computers we can have high quality recording with low latency. So, my humble question is: Why couldn't this be possible on linux? |
KDE Developer
|
KDE will not attempt again to introduce a sound server.
The last time we did we had the best one of all available at the time but everybody else opted to use others. Therefore we decided to leave development of sound servers to those who want to do just that and concentrate our resources on other things instead, e.g. making it easy for developer to do audio stuff without having to care about the details below. You should probably discuss this with PulseAudio and/or Jack developers.
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
Ah, I'm sorry to hear that. I thought about asking the Devs at Jack and PulseAudio, but I didn't want it to be based on buggy and cluttered code. I didn't think a rewrite of their sound servers would be something they would want to do. If someone could help me to get started on a sound server, I would be happy to do any coding I could. I know C and Java, but don't have a lot of experience.
Anyways, if not, I'm sorry to have wasted everyone's time with this thought. |
Registered Member
|
This is exactly what I thought: this duplicates exactly what the PulseAudio project is attempting to achieve. Phonon isn't a sound server, it's just a single, standardized method for KDE applications to communicate with other sound servers through Xine/GStreamer.
Madman, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
I agree with Madman - why creating ANOTHER sound server? Anyone in the Linux world are tired of new sound systems... Let's keep PulseAudio doing it's job!
|
Registered Member
|
I'd be fine with pulseaudio if it wasn't so buggy, was way more user friendly, and could support easily mixing streams from different applications. For example, even after giving PA all of the limits, permissions, and custom configuration (including downloading a jack enabled PA) I could not get it run in RT mode.
More reasons why PA is not the solution: It can randomly shut down at any time; It doesn't have an easily configurable Gui that I can see; When it restarts, all of the sound applications lose their connection, freeze up, and wreak havoc. I know that PA is a highly powerful, highly configurable piece of software that many people like, and I thank the devs for that. I just want the common user to be able to use that power without having to go directly into a huge maze of configuration files, PPAs, and headaches. Not to mention wondering what-in-heck-just-happened when all of their audio applications grey out and die. If the Linux world is tired of new sound servers, we have decided to settle for mediocrity. Why should we settle for less than best? We have some of the best minds of our generation working on building software, the power of opensource, and a thriving community. If we stop trying to make better versions of what we have, progress will stagnate and eventually die. I guess that would prove that freedom in software is not feasible. I don't believe that. All the code is already there, it's just not unified. So why wouldn't we want a sound server that can do it all, do it all right, and also be completely accessible to anyone with a Linux machine? I can't think of any major ones. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]