AlsaPlayer is a new kind of player that effectively runs pulse-code modulation or .PCM files. The player uses multithreading pretty heavily and was written specifically for giving some good exercise to the new Advanced Linux Sound Architecture (ALSA) driver and the library system. If you look closely, you’ll observe that AlsaPlayer has some highly interesting features that can be found only in the UNIX-based or Linux-based players. The main goal of the people who created AlsaPlayer was to develop a completely pluggable framework that could playback every type of media file, with majority of focus on the PCM audio data.
Although AlsaPlayer was developed specifically for the Linux operating system, support has been added for many other operating systems too (with most of them being UNIX variants) ever since its first public beta release.
Considering the technological advancements that have taken place in the past few years, many people may find the name AlsaPlayer to be a little confusing, especially because the player now supports a good number of different output systems. OSS audio interface, which is an old default interface is supported apart from SGI audio outputs, Sparc, Network Audio Server (NAS) and Esound. Among these interesting output systems, JACK deserves the most attention. Jack is pretty different than other audio server systems in the way that it has been specifically designed from the ground up, in order to ensure that it serves as the ideal audio system for the professional audio work. This implies that the system focuses extensively on two important areas: low latency operation and synchronous execution of all the clients. It is our belief that this particular interface is geared up to become the most preferred one of all the professionals in the times to come. JACK makes use of ALSA to interface with the audio hardware.
Let us now go over some of the plugins of AlsaPlayer.
AlsaPlayer is a plugin based system, which implies that you can simply add new file formats by creating a fresh input plugin. The main prerequisite applicable in this case is that the data should be compatible with the PCM audio format. The plugins mentioned below are already in different states of usability:
- FLAC plugin (including the oggFLAC) with the support available for FLAC version 1.3 or higher.
- CDDA plugin, which plays back the audio CDs by ripping off the digital data from the disk.
- OGG vorbis plugin that employs the ogg/vorbis libs and works pretty faultlessly.
- An audio plugin based on MAD (actually based on the latest MAD MPEG decoder library to be precise). Although it uses a little bit more of CPU, its output quality is far better than mpg123.
- Audio file library plugin, which still needs some work.
- MikMod plugin which plays back all the module formats that are supported by MikMod. However, there is no facility of random seeking in the modules so far.
- MPEG audio plugin that is based on the mpg123 0.59r. It works pretty well too.
The player makes use of a plugin system for the output of audio data. Its output mechanism was designed specifically keeping ALSA in mind. Several other prominent UNIX audio systems are known to map pretty well on to it too. Some of the supported output plugins are as follows:
- ALSA (best supported; is also the default plugin)
- OSS/Lite and OSS
This amazingly cool plugin enables you to entirely customise the user interface of AlsaPlayer. It means that the AlsaPlayer’s core gets decoupled from the player’s user interface. The GTK2 interface is supported the best. You can also use a text-only interface among many others.
Just like the way output and input supports get loaded dynamically, the visualization or scope plugins also get loaded dynamically. It helps developers in modifying the visualization plugin without making any changes to the code of the main program (not even a single line). Some of the scope plugins which are included in the AlsaPlayer distribution are as follows:
- OpenGL Spectrum
What’s important to note here is that the developers have all the liberty in writing as good a visualization plugin as they need! It could be a solid ‘Fullscreen’ (DGA) or for that matter even ‘Hardware Accelerated OpenGL’!
You can even control the AlsaPlayer from an external program if you need. All you need to do is link the application against the available libalsaplayer.so. When you do so, commands like playlist advancement, speed control and seeking are few of the many that you can effectively use.
About its installation
The installation of AlsaPlayer from the source can be as simple as execution of the configure script, followed by running the ‘make install’. This script detects all the output and input plugins for the system.
Ensure that you definitely run the ‘make install’ post the compilation. All the different plugins must be in their specific places on the system. In the event that you don’t want to install it immediately, there’s always the option of doing it later by using a different --prefix at the time of a running the configure script.
The embedded mode
The target systems which are low on RAM and CPU resources can run the configure script with “CFLAGS= -DEMBEDDED.” Doing so significantly reduces the RAM and CPU usage, but imposes limitations mentioned below:
- No availability of effect plugins
- No software volume/pan
- No possibility of mixing the streams (only the single stream option)
Running the AlsaPlayer
All you need to do is run the executable file. As an alternative you can pass and play the files on the command line as well. They’ll get added to queue with the first entry playing automatically. You can use the button with a CD like appearance to hide the menu. The other controls on the player are pretty straightforward and self-explanatory.