Author Topic: Blog: A fresh new KMix (mostly just a pre-alpha)  (Read 150 times)

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15310
  • ┌∩┐(◕_◕)┌∩┐
Blog: A fresh new KMix (mostly just a pre-alpha)
« on: March 21, 2013, 12:16:47 PM »
Posted on March 21, 2013 by Trever   

KMix is KDE’s forgotten redheaded stepchild.



It is old, has been maintained my Christian Esken since early 2001, and has grown organically. Through no fault of Christian’s or anyone else’s, it is buggy, messy, and nobody else wants to help fix it, or at least has the constitution to do so.

Us redheads need to stick together.

At last year’s Randa, I started working on refactoring and rebuilding KMix from the ground up. Why should adjusting the volume in your desktop be so frustrating? It shouldn’t, thats why.



That is the prototype for the new KMix. The UI design has been shamelessly stolen from pavucontrol:



As you can see, there is much work left to do. However, I feel that it is ready for others to hack on and test. This restructuring of KMix contains a *lot* of the original KMix code that has been contributed to over the years by over 142(!) people. The biggest committers have been Christian Esken (601), Colin Guthrie (130), and Laurent Montel (123). Mad props to those people and everyone else involved for their work and dedication.

When I started out on this endeavor, I aimed to fix a number of issues I had encountered before:

    Sometimes at startup, your volume would be all kinds of broken since the KDED module, Tray application, and a session startup script would all sometimes try to restore the volumes and sometimes it just wouldn’t.

    The GUI was completely rebuilt with every device change. Back in the early days of KMix, hot-pluggable audio devices wasn’t a major use case so it wasn’t included in the design.

Since there is no one process that controls all the volume everywhere, that means lots and lots of backend libraries and their respective data structures loaded into many processes, such as plasma, the tray application, the KDED module, the tiny script at startup that restores your volumes.

All these different points of control had to make sure they didn’t step on each others toes all the time.

To control the volume over dbus, the tray application had to be running. There was no dbus autolaunch, and why would you want a GUI application to automatically launch and do weird things when you just want a small script to turn down your volume between the hours of 3 am and 6 am?

pavucontrol had neat VU meters

I’m just kinda okay at UI and UX design for end-users.

In response, I’ve come up with the following design:

    There exists a unique daemon on the session bus at org.kde.kmixd, which is managed via dbus autolaunch

    This unique daemon supports multiple backends being loaded at once, such as ALSA and PulseAudio (note: currently requires commenting out an if statement)

    Clients don’t need to worry about learning the oddities of ALSA or PulseAudio control since all interaction happens over the bus in a backend-agnostic manner. You are given a set of controls (such as your internal audio output, or the output of chrome’s flash plugin), a set of control groups (Output Devices, Recording Streams, etc), and a single interface to adjusting the master volume (which is whatever the user configures).

    Thanks to dbus autolaunch, you don’t have a daemon running in the background until the very instant during your session that volume control is needed. This helps to decrease startup time and overall resource usage.

    The UI is decoupled from the volume control itself, so others can easily create much better looking UIs in QML, Plasma, QtWidgets, or whatever other language that supports DBus.

All of this is in my kmix-improvements branch on KDE git’s kmix repository.

I’ll reiterate: this is mostly just a pre-alpha. Don’t expect everything to work, though I have been using it on my desktops without significant issues. Feedback and contributions are welcome.


http://wm161.net/2013/03/21/a-fresh-new-kmix/?utm_source=rss&utm_medium=rss&utm_campaign=a-fresh-new-kmix
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15310
  • ┌∩┐(◕_◕)┌∩┐
Re: Blog: A fresh new KMix (mostly just a pre-alpha)
« Reply #1 on: April 01, 2013, 09:26:59 AM »
Posted on April 1, 2013 by T. Fischer   

The Volume Slider Compromise

Hi, KDE users. I think it is time we had an adult conversation about KMix and usability.

You see, in my last post, there was an awful lot of vitriol spewed about my heavy handed decision to use horizontal sliders. My personal belief is that vertical sliders have a tendency to induce vertigo in older users and ex-paratroopers. There is no way I can live my life with that kind of guilt on my conscious. Paratroopers serve an incredibly useful purpose in our military operations. I simply cannot allow these great ‘murricans to experience pain at my hands.

After much thought and discussion of usability with an awfully friendly bartender (and much tequila), I’ve decided to implement a compromise in KMix2:



http://wm161.net/2013/04/01/the-volume-slider-compromise/
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10667
  • MLUs Forever!
Re: Blog: A fresh new KMix (mostly just a pre-alpha)
« Reply #2 on: April 02, 2013, 01:44:40 AM »
Yep, seemed reasonable at that time  :D
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT