Linux-SWAT
Forum Addict!
- Joined
- Feb 13, 2010
- Messages
- 9,194
Maybe ALSA can hold some kind of dummy buffer, allowing to route the stream on the fly with the help of some script/zenity/whatever ?
Isn't this the elephant in the room? Can't use the Debian repos for any application using Pulse then. I thought the point was to stay close to mainline and existing distros? Somebody will have to maintain that stuff.Every linked packages needs to be rebuild. There will likely be broken packages.
Here also we can avoid pulseaudio:Pulseaudio also will be important as it supports echo cancelation, for the phone function.
...which has some serious compatibility issues with certain Pulse-only applications that it was not specifically developed for.you can use apulse to "force" programs that only support pulseaudio (like recent firefox) to send their audio stream directly to alsa, without the need for an actual pulse daemon.
Audio stream a \
Audio stream b \
Audio stream c > ALSA = Single Output Stream
Audio stream d /
Audio stream e /
Audio stream a \ / Output stream a
Audio stream b \ / Output stream b
Audio stream c > Pulse < Output stream c
Audio stream d / \ Output stream d
Audio stream e / \ Output stream e
And yet you managed to get it all wrong, all you did was explain how the dmix plugin mixes its streams. You can do pretty much everything you can do with Pulse with ALSA as well, the big difference is that you cannot configure it dynamically. This includes routing an audio stream to multiple output devices or mixing several input devices into a single output stream. Once a single process has started to load and initialize libasound you are locked onto the currently configured setup, the routing of the audio streams becomes fixed. At least as far as ALSA is concerned, you may still include plugins into your ALSA config that reroute audio streams to seperate processes that can reroute them dynamically, which is exactly what Pulse does to support ALSA-only applications. This is actually one of the things I never understood: You could basically use this approach to do only the dynamic rerouting of everything, gaining the big advantage of Pulse without many of its drawbacks.ALSA has a fairly simple model.
All of it?And yet you managed to get it all wrong, all you did was explain how the dmix plugin mixes its streams.
As per my example above, that you restated here, ALSA cannot dynamically shift and mix audio to multiple independent output channels on the fly where Pulse can. So, I didn't get it all wrong - in fact, you just restated my main point. ALSA works favorably for the simple case where you have multiple Input channels with the intent to combine them into a single (or stereo) output channel with a singular program on one or more output channels.You can do pretty much everything you can do with Pulse with ALSA as well, the big difference is that you cannot configure it dynamically. This includes routing an audio stream to multiple output devices or mixing several input devices into a single output stream. Once a single process has started to load and initialize libasound you are locked onto the currently configured setup, the routing of the audio streams becomes fixed. At least as far as ALSA is concerned,
At the point where you have had to add plugins and tweaks and special cases to ALSA to make it do some of what Pulse does, you have made ALSA more complicated than Pulse is.you may still include plugins into your ALSA config that reroute audio streams to seperate processes that can reroute them dynamically, which is exactly what Pulse does to support ALSA-only applications. This is actually one of the things I never understood: You could basically use this approach to do only the dynamic rerouting of everything, gaining the big advantage of Pulse without many of its drawbacks.
Again, restating my point that ALSA is great for -simple- routing of sound sources into a singular program (sound engineer not software engineer version of that term) that is then output over one or more channels. If you want a differential program for each channel, that is where you need Pulse.The big difference between ALSA and other sound server solutions is that ALSA is not a sound server to begin with, it manages everything through its client library libasound. The dmix plugin only works because AFAIK it sort of provides a cross-process singleton implementation, the very first process that initializes libasound for outputting audio will parse the ALSA config and create a dmix instance as commanded by that configuration, all following processes will simply hook into the already existing dmix interface provided by the first process. Once that one exits, another running process takes over.
At which point you need to manually edit the configuration files associated with ALSA or run plugins to do that for you - which often wind up running multiple instances of ALSA in order to cope with the multiple processes that need to be done resulting in more overhead.The whole routing process is actually the one where ALSA is by far the most powerful of them all, because you can really fully configure it. You can fully control at which point the resampling happens, it is not part of the routing itself. It is only forced upon you if you leave the ALSA domain: E.g.: The LADSPA interface to include sound effects into the audio streams within the ALSA configuration is fixed to use float samples, but that is pretty much a LADSPA limitation.
I don't do videos. At this point there isn't much to see but a screen full of log messages I don't understand. Working on that.@Grench is doing so much on ankther thread i read it anctiously... put please a video on usage if possible. Be mearcifull. Id love to see it going.
And you have to do that in the program, ALSA itself can't do that... which is the reason I think there's no real way around pulse.