Skip to content

Latest commit

Β 

History

202 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎢 aplay+: A Simple and High-Quality Audio Player

GitHub Repo stars GitHub code size in bytes Languages GitHub release (latest by date) MIT License Sponsor

🎧 Enjoy BitPerfect audio playback with simplicity and precision!

Logo

πŸ–ΌοΈ Screenshots

aplay+ built-in Ember skin β€” player, equalizer, and playlist

Built-in Ember β€” warm charcoal, copper accents, live equalizer, and BitPerfect device status

aplay+ using a custom Sapphire Winamp Classic skin
Custom Winamp Classic skin β€” Sapphire neon theme
aplay+ Ember skin with the complete right-click control menu
Right-click controls β€” playback, DSP, devices, skins, and display options

These compact SVG assets contain optimized raster copies derived from captures rendered by the real Luna/OpenGL application through the headless screenshot runner in tools/screenshots. Its minimal GLFW compatibility layer uses surfaceless EGL, so regenerating the raw PNG captures does not require GLFW development packages.

πŸ’Ώ Supported File Formats

aplay+ supports a variety of popular audio formats:

  • 🌟 FLAC: High-quality lossless compression
  • 🌟 DSD (DSF / DFF): Direct Stream Digital (high-resolution 1-bit audio)
  • 🌊 WAV: Uncompressed audio with crystal-clear quality
  • 🎢 MP3: The most commonly used compressed format
  • 🎡 Ogg Vorbis: Great compression with excellent sound
  • πŸ“± AAC (mp4/m4a): Widely used in iPhones and YouTube
  • 🎼 WMA: Windows Media Audio

Realtime extras during playback:

  • πŸ”€ Crosstalk cancellation (XTC)
  • 🎹 PCM β†’ DSD64 (DoP) output
  • ✨ Super-resolution upsampling
  • 🎚️ ALSA mixer volume and live device switching
  • πŸ” Playlist loop, format filter, and recursive / regex file picking

Two front ends share the same engine:

Binary Interface
aplay+ Terminal player with live keyboard controls
aplay+ui Multi-window Ember / Winamp-skin GUI (make ui)

πŸ”§ How to build

Build Online

Build Locally

  1. Install required libraries:
sudo dnf install alsa-lib-devel
# GUI also needs: glfw, OpenGL, unzip (for .wsz skins)
sudo dnf install alsa-lib-devel glfw-devel mesa-libGL-devel unzip
make
sudo apt install -y libasound2-dev rpm build-essential git
sudo apt install -y libglfw3-dev libgl-dev unzip
make
  1. Clone the repository and build:
git clone https://github.com/yui0/aplay-.git
cd aplay-
make          # β†’ aplay+   (CLI)
make ui       # β†’ aplay+ui (GUI)

Build the graphical player

The graphical build uses ALSA, GLFW, and OpenGL. It also uses the unzip command at runtime when a compressed Winamp .wsz skin is selected.

make ui

Winamp Classic skins

Pass either a Winamp Classic .wsz file or an already extracted skin directory. A valid skin must contain MAIN.BMP and CBUTTONS.BMP (matching is case-insensitive). The original card-style interface has been removed. Without --skin, or when a custom skin is invalid, the player uses the built-in aplay+ Ember Winamp-style skin (warm charcoal + copper).

The Ember artwork is generated entirely by aplay+ui.c, contains no Winamp artwork, and is distributed under this project's MIT license. It is safe to redistribute with the player. (Earlier builds called this skin Graphite; the built-in theme is now Ember.)

./aplay+ui --skin ~/Skins/MySkin.wsz /Music
./aplay+ui -S ~/Skins/MySkin/ /Music
./aplay+ui -R ~/Skins/          # skin pack: random skin per track

The Winamp main window and transport sprites are rendered from the skin. aplay+-specific XTC, DSD, repeat, and format controls remain available from the right-click menu (and keyboard shortcuts). Text size can be cycled with T / Text size in the menu (Compact β†’ Comfortable β†’ Large β†’ Extra large).

πŸ–₯️ Graphical player (aplay+ui)

make ui builds a multi-window Winamp-style shell on top of the same playback engine as aplay+:

Window Role
Player Transport, time, title, volume
Equalizer Spectrum / EQ chrome
Playlist Track list, device status, notes
Context menu Right-click anywhere on a surface
About Ember Edition credits

Right-click the player (or equalizer / playlist) for Play/Pause, seek, volume, XTC, DSD, super resolution, repeat, format filter, skins, text size, About, and Exit. Add folder... appends another directory to the playlist without restarting.

ALSA device β€” hierarchical menu

Output devices are chosen from a cascading submenu so cards stay easy to scan:

  1. ALSA device β–Έ in the context menu
  2. Sound cards flyout (hw:N Β· Card name)
  3. Devices flyout (hw:N,M for that card)

The active card and PCM device are marked with a check. You can still click the device label in the playlist footer for the flat picker, or pass -d on the command line. Without -d, aplay+ auto-selects the first openable hw:N,M.

🌸 How to use

Basic Commands (CLI β€” aplay+)

$ ./aplay+ -h
Usage: ./aplay+ [options] dir

Options:
-h                 Print this help message
-d <device name>   Specify ALSA device [default: first openable hw:N,M]
-f                 Use 32-bit floating-point playback
-r                 Recursively search directories
-x                 Enable random playback
-s <regexp>        Search files with a regex
-t <ext type>      Specify file type (e.g., flac, mp3, wma, dsf, dff...)
-p                 Optimize for Linux platforms
-l                 Loop the directory playlist
-v                 Verbose mode
-V <volume>        Set ALSA mixer volume (0.0-1.0, default 1.0)
-c                 Enable crosstalk cancellation
-D <meters>        Speaker distance for crosstalk cancellation
-T                 Enable test mode (sine wave: left, right, pan)
-e                 Start playback with real-time PCM->DSD64 (DoP)
-o <path>          Also write the raw DSD bitstream when DoP is active

During CLI playback:

Key Action
Space Pause / resume
Tab Pause / resume and release the ALSA device (other apps can use the card)
← / β†’ Seek βˆ’/+ 10s (FLAC, MP3, WAV, OGG)
↑ / ↓ Volume Β±5%
C Toggle crosstalk cancellation
+ / βˆ’ Adjust crosstalk attenuation
E Toggle PCM ↔ DSD64 (DoP)
S Toggle wave super resolution
F Cycle format filter (ALL / flac / mp3 / m4a / ogg / wav / wma / dsf / dff)
D Cycle ALSA output device (live)
B / \ Previous track
d Skip to next directory
Q / Esc Quit
other keys Next track

Graphical Commands (aplay+ui)

aplay+ui accepts the same playback options as aplay+, plus skin-pack flags. A luna-ui player window opens automatically. Playback, seek, volume, Crosstalk, DSD, super resolution, format filter, repeat, device, text size, and quit are controlled from the right-click menu (and keyboard shortcuts).

$ ./aplay+ui -h
Usage: ./aplay+ui [options] dir

Options:
-h                 Print this help message
-S <path>          Use a Winamp Classic .wsz file or extracted skin directory
--skin <path>      Same as -S
-R <dir>           Skin pack folder (.wsz files and/or skin directories).
                   When set, a random skin is applied on each track change
                   (toggle from the right-click menu)
--skins <dir>      Same as -R
-d <device name>   Specify ALSA device [default: first openable hw:N,M]
-f                 Use 32-bit floating-point playback
-r                 Recursively search directories
-x                 Enable random playback
-s <regexp>        Search files with a regex
-t <ext type>      Specify file type (e.g., flac, mp3, wma, dsf, dff...)
-p                 Optimize for Linux platforms
-l                 Loop the directory playlist
-v                 Verbose mode
-V <volume>        Set ALSA mixer volume (0.0-1.0, default 1.0)
-c                 Enable crosstalk cancellation
-D <meters>        Speaker distance for crosstalk cancellation
-T                 Enable test mode (sine wave: left, right, pan)
-e                 Start playback with real-time PCM->DSD64 (DoP)
-o <path>          Also write the raw DSD bitstream when DoP is active

GUI keyboard shortcuts (also shown on the right-click menu):

Key Action
Space Play / Pause
Tab Stop (release device)
B / N Previous / Next track
← / β†’ Rewind / Forward 10s
↑ / ↓ Volume up / down
C Crosstalk (XTC)
+ / βˆ’ XTC attenuation
E DSD (DoP)
S Super resolution
L Repeat playlist
F Format filter
D ALSA device menu
T Text size
Q Exit

Examples

  • πŸ”€ Random playback:
    $ ./aplay+ -rx .
  • 🎀 Search for a specific artist:
    $ ./aplay+ -rx -d hw:7,0 /Music/ -s ZARD
  • 🎹 Exclude instrumentals from playback:
    $ ./aplay+ -rfx -d hw:7,0 /Music/ -s '^(?!.*nstrumental).*$'
  • πŸ” Loop a folder on a USB DAC:
    $ ./aplay+ -rl -d hw:7,0 -V 0.8 /Music/FLAC
  • πŸ–₯️ Graphical Ember UI with a USB DAC:
    $ ./aplay+ui -rxfp -d hw:7,0 /Music/
  • 🎨 Skin pack (random skin each track):
    $ ./aplay+ui -R ~/Skins -d hw:7,0 /Music/

🌟 Linux Optimization Settings

πŸš€ Optimize Disk I/O

Add the following to your sysctl.conf:

vm.dirty_ratio = 40
vm.dirty_background_ratio = 10
vm.dirty_expire_centisecs = 3000
vm.dirty_writeback_centisecs = 500
#dev.hpet.max-user-freq = 3072
vm.overcommit_memory = 1

Apply changes:

sysctl -p

βš™οΈ Adjust Scheduler Settings

Optimize SSDs and HDDs with the following script:

#!/bin/sh
#cat /sys/block/sd*/queue/scheduler
for FILE in /sys/block/sd*/queue/scheduler
do
	[ -f $FILE ] || continue
	echo -n none > $FILE
done

πŸ’¨ Set CPU Performance Mode

Use this script to switch CPU governor to "performance":

#!/bin/sh
#cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
do
	[ -f $CPUFREQ ] || continue
	echo -n performance > $CPUFREQ
done

I/O scheduler

# scheduler for non rotational, SSD
ACTION=="add|change", KERNEL=="sd[a-z]|mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
# scheduler for rotational, HDD
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"

fstrim -v /

Timer

#cat /sys/devices/system/clocksource/clocksource0/current_clocksource
echo tsc > /sys/devices/system/clocksource/clocksource0/current_clocksource

ulimit -a

🎢 Sample Music

πŸ“– References

🎡 Experience perfect audio playback with aplay+! Start your music journey today!

Releases

Sponsor this project

Packages

Contributors

Languages