In the GTK+ world, we have many lightweight music players, such as Audacious. While migrating to Qt, some people might want a Qt-based alternative for use in LXDE-Qt. Fortunately, we have Qmmp. Here are screenshots from their website. They provides the old-school WinAmp-like skins, or you can install the qmmp-plugin-pack to get the foobar2000-like simple UI.
The music player looks very suitable for LXDE-Qt, but it has some known problems, one of which is higher CPU usage then similar music players (mainly Audacious). To improve that, I spent two days hacking and found some potential solutions so I share them here.
- Install qmmp-plugin-pack and use mpg123 plugin for playing mp3 files instead of the default libmad plugin. Mpg123 is highly optimized and can use CPU features when available, such as SIMD. This can be changed in the preferences dialog. Just turn off the libmad plugin and turn on the mpg123 one. This greatly reduced the CPU usage while playing mp3 files. Qmmp by default give libmad higher priority, so you have to turn off libmad. Otherwise mpg123 won’t be used.
- Apply these 2 patches I created and recompile qmmp from source. The subversion r4265 code of qmmp should be used. Detailed information about the bugs they fixed is in the bug report 685. I already send the patches to the upstream, but they’re not yet applied. I post them here so other qmmp users can try them.
- avoid_polling_volume_with_timer.patch (This patch only helps if you’re using ALSA)
- stop_analyzer_timer_when_idle_and_decrease_time_label_update.patch (This only helps if you’re using the simple UI)
- Turn off the visualizer (spectrum visualizer) if you’re using the simple UI (the second screenshot above). It’s the main cause of high CPU usage. Turning it off can decrease CPU usage to some degree. With the second patch I provided, you can get rid of the CPU usage completely when the visualizer is off.
If you love qmmp, try to see if the solutions provided here solve your problems.