minimalistic music player https://projects.omarpolo.com/amused.html
 
 
 
 
Go to file
Omar Polo b879254714 fix build when there is no system endian.h 2023-10-09 09:04:30 +00:00
contrib contrib/amusing: use fancy unicode characters for the controls 2023-08-01 14:22:26 +00:00
web amused-web: typo in error message 2023-09-11 20:44:59 +00:00
.gitignore add amused-web, a web interface to control amused 2023-08-14 18:53:28 +00:00
CHANGES typo in CHANGES 2023-09-09 21:10:31 +00:00
LICENSE initial commit 2022-02-16 18:28:23 +00:00
Makefile work around missing endian.h 2023-10-08 19:30:13 +00:00
README.md note that libmd is needed on mac too 2023-10-09 08:27:02 +00:00
amused.1 adjust copyright years 2023-05-02 18:24:13 +00:00
amused.c work around missing SOCK_{CLOEXEC,NONBLOCK} on some dumb OSes 2023-10-07 22:12:05 +00:00
amused.h switch from libevent to a smaller, thin wrapper around poll() 2023-08-16 10:04:17 +00:00
audio_alsa.c trailing whitespace 2023-10-07 19:47:10 +00:00
audio_ao.c add an libao audio backend 2023-10-07 19:47:10 +00:00
audio_sndio.c cache audio_nfds() 2023-05-13 15:09:34 +00:00
compats.c add missing #include for endian.h in imsg compat 2023-10-09 08:09:12 +00:00
configure fix build when there is no system endian.h 2023-10-09 09:04:30 +00:00
configure.local.example fix my email address 2023-05-02 18:17:37 +00:00
control.c (cont) work around lack of SOCK_{CLOEXEC,NONBLOCK} 2023-10-08 19:11:45 +00:00
control.h switch from libevent to a smaller, thin wrapper around poll() 2023-08-16 10:04:17 +00:00
ctl.c don't reply with a STATUS on MODE change 2023-08-31 17:40:32 +00:00
endian.h ooops, fix path 2023-10-09 08:15:10 +00:00
ev.c work around (a possibly missing) pipe2(2) 2023-10-07 22:04:19 +00:00
ev.h switch from libevent to a smaller, thin wrapper around poll() 2023-08-16 10:04:17 +00:00
imsg.h update imsg 2023-07-02 08:44:06 +00:00
log.c use (a modified version of) kristaps' oconfigure 2022-07-09 09:52:38 +00:00
log.h initial commit 2022-02-16 18:28:23 +00:00
player.c unbreak percentage relative seeking 2023-07-13 12:20:45 +00:00
player_123.c fix my email address 2023-05-02 18:17:37 +00:00
player_flac.c fix my email address 2023-05-02 18:17:37 +00:00
player_oggvorbis.c fix my email address 2023-05-02 18:17:37 +00:00
player_opus.c fix my email address 2023-05-02 18:17:37 +00:00
playlist.c fix my email address 2023-05-02 18:17:37 +00:00
playlist.h fix my email address 2023-05-02 18:17:37 +00:00
queue.h use (a modified version of) kristaps' oconfigure 2022-07-09 09:52:38 +00:00
tests.c add an libao audio backend 2023-10-07 19:47:10 +00:00
xmalloc.c use (a modified version of) kristaps' oconfigure 2022-07-09 09:52:38 +00:00
xmalloc.h initial commit 2022-02-16 18:28:23 +00:00

README.md

amused

amused is a music player. It doesn't have any amazing features built-in, on the contrary: it's quite minimal (a fancy word to say that does very little.) It composes well, or aims to do so, with other tools though.

The main feature is that audio decoding runs in a sandboxed process under pledge("stdio recvfd audio") (on OpenBSD at least.)

It's available on the OpenBSD port tree starting from 7.1

Building

The dependencies are:

  • flac
  • libmpg123
  • libvorbis
  • opusfile
  • libsndio or libasound (ALSA) or libao
  • libmd (optional; needed by amused-web on linux and Mac)

Then, to build:

$ ./configure
$ make
# make install # eventually

To compile the web control interface, amused-web, run:

$ make web
# make install-web # eventually

The build can be customized by passing arguments to the configure script or by using a configure.local file; see ./configure -h and configure.local.example for more information.

For each library the configure script first tries to see if they're available without any extra flags, then tries again with some hard-coded flags (e.g. -lFLAC for flac) and finally resorts to pkg-config if available. pkg-config auto-detection can be disable by passing PKG_CONFIG=false (or the empty string)

For Linux users with libbsd installed, the configure script can be instructed to use libbsd exclusively as follows:

$ CFLAGS="$(pkg-config --cflags libbsd-overlay)" \
	./configure LDFLAGS="$(pkg-config --libs libbsd-overlay)"

To force the use of one specific audio backend and not simply the first one found, pass --backend as:

$ ./configure --backend=alsa # or sndio, or ao

Usage

The fine man page has all nitty gritty details, but the TL;DR is

  • enqueue music with amused add files... or amused load <playlist
  • control the playback with amused play|pause|toggle|stop
  • check the status with amused status and the current playlist with amused show

amused tries to be usable in composition with other more familiar tools instead of providing everything itself. For instance, there isn't a command to remove an item from the playlist, or shuffle it; instead, standard UNIX tools can be used:

$ amused show | grep -vi kobayashi | amused load
$ amused show | sort -R | amused load
$ amused show | sort | uniq | amused load

It also doesn't provide any means to manage a music collection. It plays nice with find(1) however:

$ find . | amused load

Non-music files found in the playlist are automatically skipped and removed, so there's no harm in loading everything under a certain directory.

I wrote a bit more about the background of amused in a blog post.