Blame


1 a9fc4552 2022-02-17 op # amused
2 a9fc4552 2022-02-17 op
3 09223daf 2022-06-11 op amused is a music player. It doesn't have any amazing features
4 09223daf 2022-06-11 op built-in, on the contrary: it's quite minimal (a fancy word to say
5 09223daf 2022-06-11 op that does very little.) It composes well, or aims to do so, with
6 2ab37934 2022-07-23 op other tools though.
7 a9fc4552 2022-02-17 op
8 bbf64a33 2022-02-17 op The main feature is that audio decoding runs in a sandboxed process
9 80982f2c 2022-07-09 op under `pledge("stdio recvfd audio")` (on OpenBSD at least.)
10 a9fc4552 2022-02-17 op
11 2acca6be 2022-09-28 op It's available on the OpenBSD port tree starting from 7.1
12 a9fc4552 2022-02-17 op
13 a9fc4552 2022-02-17 op
14 09223daf 2022-06-11 op ## Building
15 a9fc4552 2022-02-17 op
16 80982f2c 2022-07-09 op The dependencies are:
17 a9fc4552 2022-02-17 op
18 a9fc4552 2022-02-17 op - flac
19 0ea0da1e 2022-02-23 op - libmpg123
20 a9fc4552 2022-02-17 op - libvorbis
21 a9fc4552 2022-02-17 op - opusfile
22 91a5f366 2023-03-24 op - libsndio or libasound (ALSA)
23 7f271cbc 2023-09-07 op - libmd (optional; needed on linux and only for amused-web)
24 a9fc4552 2022-02-17 op
25 80982f2c 2022-07-09 op Then, to build:
26 a9fc4552 2022-02-17 op
27 80982f2c 2022-07-09 op $ ./configure
28 80982f2c 2022-07-09 op $ make
29 80982f2c 2022-07-09 op # make install # eventually
30 a9fc4552 2022-02-17 op
31 b3c3ccdc 2023-09-07 op To compile the web control interface, amused-web, run:
32 b3c3ccdc 2023-09-07 op
33 b3c3ccdc 2023-09-07 op $ make web
34 b3c3ccdc 2023-09-07 op # make install-web # eventually
35 b3c3ccdc 2023-09-07 op
36 80982f2c 2022-07-09 op The build can be customized by passing arguments to the configure
37 80982f2c 2022-07-09 op script or by using a `configure.local` file; see `./configure -h`
38 80982f2c 2022-07-09 op and [`configure.local.example`](configure.local.example) for more
39 80982f2c 2022-07-09 op information.
40 80982f2c 2022-07-09 op
41 80982f2c 2022-07-09 op For each library the `configure` script first tries to see if they're
42 80982f2c 2022-07-09 op available without any extra flags, then tries again with some
43 b3c3ccdc 2023-09-07 op hard-coded flags (e.g. `-lFLAC` for flac) and finally resorts to
44 80982f2c 2022-07-09 op pkg-config if available. pkg-config auto-detection can be disable by
45 80982f2c 2022-07-09 op passing `PKG_CONFIG=false` (or the empty string)
46 80982f2c 2022-07-09 op
47 d942a1f8 2022-07-13 op For Linux users with libbsd installed, the configure script can be
48 d942a1f8 2022-07-13 op instructed to use libbsd exclusively as follows:
49 80982f2c 2022-07-09 op
50 2acca6be 2022-09-28 op $ CFLAGS="$(pkg-config --cflags libbsd-overlay)" \
51 d942a1f8 2022-07-13 op ./configure LDFLAGS="$(pkg-config --libs libbsd-overlay)"
52 d942a1f8 2022-07-13 op
53 91a5f366 2023-03-24 op To force the use of one specific audio backend and not simply the first
54 91a5f366 2023-03-24 op one found, pass `--backend` as:
55 d942a1f8 2022-07-13 op
56 91a5f366 2023-03-24 op $ ./configure --backend=alsa # or sndio
57 91a5f366 2023-03-24 op
58 91a5f366 2023-03-24 op
59 09223daf 2022-06-11 op ## Usage
60 3c18f438 2022-03-13 op
61 a9fc4552 2022-02-17 op The fine man page has all nitty gritty details, but the TL;DR is
62 a9fc4552 2022-02-17 op
63 885b6e2b 2023-01-08 op - enqueue music with `amused add files...` or `amused load <playlist`
64 2ab37934 2022-07-23 op - control the playback with `amused play|pause|toggle|stop`
65 885b6e2b 2023-01-08 op - check the status with `amused status` and the current playlist with
66 2ab37934 2022-07-23 op `amused show`
67 a9fc4552 2022-02-17 op
68 213aea73 2022-02-17 op amused tries to be usable in composition with other more familiar tools
69 213aea73 2022-02-17 op instead of providing everything itself. For instance, there isn't a
70 213aea73 2022-02-17 op command to remove an item from the playlist, or shuffle it; instead,
71 213aea73 2022-02-17 op standard UNIX tools can be used:
72 a9fc4552 2022-02-17 op
73 da045d77 2022-02-17 op $ amused show | grep -vi kobayashi | amused load
74 da045d77 2022-02-17 op $ amused show | sort -R | amused load
75 da045d77 2022-02-17 op $ amused show | sort | uniq | amused load
76 da045d77 2022-02-17 op
77 da045d77 2022-02-17 op It also doesn't provide any means to manage a music collection. It
78 da045d77 2022-02-17 op plays nice with find(1) however:
79 da045d77 2022-02-17 op
80 2acca6be 2022-09-28 op $ find . | amused load
81 a9fc4552 2022-02-17 op
82 885b6e2b 2023-01-08 op Non-music files found in the playlist are automatically skipped and
83 885b6e2b 2023-01-08 op removed, so there's no harm in loading everything under a certain
84 885b6e2b 2023-01-08 op directory.
85 885b6e2b 2023-01-08 op
86 a1e58086 2022-03-12 op I wrote a bit more about the background of amused [in a blog
87 a1e58086 2022-03-12 op post](https://www.omarpolo.com/post/amused.html).