Registered Member
|
The best thing about listening to music on the radio is that you can turn on multiple radios around your house, backyard, etc. and be able to hear it wherever you go.
To that end, it would be awesome to be able to stream KDE's audio to any networked device capable of receiving streaming audio (PC, laptop, PDA, iPhone, PS3, XBox etc). AFAIK, the hardest part would be getting it synced up properly due to the gaps which would be introduced by network latency and buffering. This could be fixed by a short calibration procedure after a device connects to Phonon's network audio stream which 'listens' to the audio through your desktop microphone (or other Phonon input channel), measures the delay, and then adjusts accordingly without interrupting the stream. Now here's the cool part: Consider the situation where the media you are listening to has more than two audio channels (i.e. 5.1 surround sound). What if your KDE desktop computer only has a **** generic one-jack stereo sound card? You have Phonon play only the front R/L channels on your desktop computer, and play only the rear channels on your networked device (which you put behind your chair/couch!). Boom -- instant wireless surround-sound speaker configuration. Never run speaker wire again! :shade: Now with only an extra pair of computer speakers (dirt cheap used) and any wifi-enabled device with a phono-jack you can set up a surround-sound environment anywhere in your house/backyard, etc. Or even a dead-simple public announcement system for a small event. Pretty much any case where you just want to put speakers somewhere without needing a patchboard or tons of wiring to trip over (or, like me, have no speaker wire but tons of LAN cable! ). And from the UI-standpoint all the users should need to do would be along the lines of
Since I'm unsure exactly how Phonon works, I'm not sure whether this would be possible on an app-by-app basis, or for the whole desktop. Presumably since networked audio devices would lag behind the server, either the server will have to transmit audio data ahead of what is currently being played locally (probably pretty hard) or delay it's local audio output to wait for the networked devices to catch up. The second option is probably easier, but would obviously lag the response time on player controls like pausing/playing, and totally mess up the sync with video playback or any other scenerio where audio should coincide with other events (like in video games). So... Is this even feasible within the existing audio framework of Phonon/Linux/KDE?
Last edited by clintonthegeek on Sat May 02, 2009 1:33 am, edited 1 time in total.
|
KDE Developer
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Sat May 02, 2009 8:41 am
That is actually something to take care of "below" Phonon, i.e. in frameworks used to implement Phonon backends.
Maybe GStreamer can do that already or there are plans to add this, or somebody could be developing a Phonon backend based on NMM http://www.networkmultimedia.org/ Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Sat May 02, 2009 6:19 pm
It would be nice to have some sort of pretty UI to visualize the different outputs over the network...
If a Phonon backend were to have wireless networking support, would you see the additional speakers as devices in System Settings --> Multimedia?
Madman, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Sat May 02, 2009 8:40 pm
you can do that with pulseaudio, you can create virtual in-/output devices from any number of real devices but pulse pushes alsa drivers to the limits (or most of the time actually well beyond)...the only problem other is kmix doesnt seem to support phonon just alsa but I heard Helio from mdv is hacking away to integrate phonon or pulse into kmix
(btw I think you could do this now in gnome since 2.26)
Last edited by aapgorilla on Sat May 02, 2009 8:42 pm, edited 1 time in total.
|
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Sun May 03, 2009 1:44 am
Holy ****... you're right! Googling around and reading different docs and wikis suggests that Phonon just needs to eventually make the switch to using PulseAudio as a backend directly instead of using it through Alsa like it is now... so I guess once there are KDE equivilants to the PulseAudio applications like the Device Chooser then this will become a native feature of every KDE desktop? |
KDE Developer
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Sun May 03, 2009 8:04 am
That won't work since PulseAudio is not a multimedia framework, e.g. it doesn't do any media handling like decoding.
Phonon doesn't do anything at this level, its backends do. If the backend, e.g. GStreamer, is configured to output to ALSA, then that this is where the audio will end up. If it is configured to use PulseAudio, the audio will end up there. It is always only a matter of the capabilities of the multimedia stack used to implement the Phonon backend. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Sun May 03, 2009 10:22 pm
Thanks for the informative replies.
So lemme get this straight. Here's how PulseAudio fits into the multimedia stack: from http://en.wikipedia.org/wiki/File:Pulse ... iagram.svg And here's a really helpful blog-post explaing tons of stuff about PulseAudio and ALSA and what they are (and not) http://tiyukquellmalz.org/blogs/blog5.p ... und-stacks This is a reply to a blog post by Aaron Seigo which has a huge flamewar comment-section which makes for some interesting reading too. So PulseAudio is like the middle-man between the application layer (PulseAudio-enabled apps like FlashPlayer, Skype, and regular desktop apps which use libalsa), and the output devices (your soundcard, another soundcard, network stream etc.) which mainly is incharge of software mixing (making sure multiple applications can output sound at the same time) as an alternative to the current ALSA software mixer, dmix, which apparently sucks (less featurefull, doesn't work with OSS devices, etc.) or hardware mixing, which is not standardized and missing from most cheapo desktop soundcards. So for lots of apps it goes libalsa -> PulseAudio -> real ALSA, which breaks lots of stuff because ALSA is poorly documented and PulseAudio is mainly a one-man show with limited testing capabilities. And OSS applications like VMWare out out in the cold. So Phonon would fit into the Library layer, right? Right now the Phonon control panel shows multiple soundcard devices, and lets you route different types of applications to different devices. I'm still a little unclear on how that is different (not redundant) to what PulseAudio wants to do. I don't have PulseAudio installed right now, so I can't quite see how they play together. But based on your last post, it would go KDE App -> Phonon -> GStreamer (or XINE or whatever) (decoded from MP3 or ogg or whatever to raw DATA) -> PulseAudio -> Soundcard (through ALSA drivers again?) or network or whatever. Is that right? So the configuration of all the different wonderful PulseAudio outputs (sinks?) to the soundcard/USB headset/network stack would be configured independantly of Phonon, right? In a few years, assuming PulseAudio becomes the defacto-standard for audio mixing, wouldn't that make the different devices in Phonon's configuration panel redundant? I know it's a lot of questions, it just seems that there is a whole-lot of misunderstanding and missplaced ill-will toward every part of the audio-stack based on all of the opinions I'm reading, so I guess at this point I'm just trying to figure how everything fits together. But whether through Phonon or PulseAudio or whatever, the bottom line is EVENTUALLY something like the idea in my OP will be feasible in the near (distant) future, right? |
Administrator
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Mon May 04, 2009 5:26 am
Phonon simply enables applications to communicate in a abstract manner with any multimedia framework ( read Library Layer ) that a backend has been written for. It can instruct the framework through the backend which audio devices it wishes to use. It is part of the "Application Layer".
Therefore it is actually like follows: Phonon Enabled Application > Phonon Backend ( Xine / GStreamer ) > Pulseaudio > ALSA Sink.
Last edited by bcooksley on Mon May 04, 2009 5:28 am, edited 1 time in total.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Wed May 06, 2009 9:34 pm
then we need a pulse enabled mixer/tray applet and we're in business...
you could do it today in gnome....
Last edited by aapgorilla on Wed May 06, 2009 9:38 pm, edited 1 time in total.
|
Administrator
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Thu May 07, 2009 5:34 am
By Pulse enabled Mixer / Tray applet you mean a Pulseaudio backend to KMix I hope?
You can do it today in GNOME is because I believe Pulseaudio was started to help fix the "esound" daemon problem GNOME has. GNOME also started NetworkManager, hence why the GNOME applet always has the latest and greatest.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Thu May 07, 2009 7:03 am
Yeah but GNOME had to rewrite theirs, so I don't know how easy it is to do it with the existing kmix |
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Thu May 07, 2009 4:33 pm
The problem is that there is no way to configure the backend through phonon.
Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965 |
Registered Member
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Thu May 07, 2009 4:53 pm
I don't have my other (usb)soundcard here but see the problem, I have selected pulse audio as my output device which is great but kmix only controls my (****) intel hda internal soundcard, so it seems kmix does not use phonon
Last edited by aapgorilla on Thu May 07, 2009 4:53 pm, edited 1 time in total.
|
Administrator
|
RE: [Phonon] Allow synchronized playback on multiple devices over the network
Fri May 08, 2009 6:19 am
This is because Phonon was not designed for Audio Mixing applications such as KMix, since KMix interfaces with a level lower than Phonon does ( the underlying audio driver framework, ALSA/OSS )
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
so... thats a lot of information... thx btw. but.. what would be the best solution to this problem? do we have to use phonon for this ...if phonon does not provide an api for this .. can phonon be extended ?
Kubuntu 12.04 x64 | KDE SC 4.8
Nvidia 8800 GTS | Core2Duo E6600 | 4 GB RAM |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]