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 80982f2c 2022-07-09 op It's available on the OpenBSD port tree starting with 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 80982f2c 2022-07-09 op - libsndio
23 a9fc4552 2022-02-17 op
24 80982f2c 2022-07-09 op Then, to build:
25 a9fc4552 2022-02-17 op
26 80982f2c 2022-07-09 op $ ./configure
27 80982f2c 2022-07-09 op $ make
28 80982f2c 2022-07-09 op # make install # eventually
29 a9fc4552 2022-02-17 op
30 80982f2c 2022-07-09 op The build can be customized by passing arguments to the configure
31 80982f2c 2022-07-09 op script or by using a `configure.local` file; see `./configure -h`
32 80982f2c 2022-07-09 op and [`configure.local.example`](configure.local.example) for more
33 80982f2c 2022-07-09 op information.
34 80982f2c 2022-07-09 op
35 80982f2c 2022-07-09 op For each library the `configure` script first tries to see if they're
36 80982f2c 2022-07-09 op available without any extra flags, then tries again with some
37 80982f2c 2022-07-09 op hard-coded flags (e.g. `-lflac` for flac) and finally resorts to
38 80982f2c 2022-07-09 op pkg-config if available. pkg-config auto-detection can be disable by
39 80982f2c 2022-07-09 op passing `PKG_CONFIG=false` (or the empty string)
40 80982f2c 2022-07-09 op
41 d942a1f8 2022-07-13 op For Linux users with libbsd installed, the configure script can be
42 d942a1f8 2022-07-13 op instructed to use libbsd exclusively as follows:
43 80982f2c 2022-07-09 op
44 d942a1f8 2022-07-13 op CFLAGS="$(pkg-config --cflags libbsd-overlay)" \
45 d942a1f8 2022-07-13 op ./configure LDFLAGS="$(pkg-config --libs libbsd-overlay)"
46 d942a1f8 2022-07-13 op
47 d942a1f8 2022-07-13 op
48 09223daf 2022-06-11 op ## Usage
49 3c18f438 2022-03-13 op
50 a9fc4552 2022-02-17 op The fine man page has all nitty gritty details, but the TL;DR is
51 a9fc4552 2022-02-17 op
52 2ab37934 2022-07-23 op - enqueue music with `amused add files...` or `amused load`
53 2ab37934 2022-07-23 op - control the playback with `amused play|pause|toggle|stop`
54 2ab37934 2022-07-23 op - check the status with `amused status` and the playlist with
55 2ab37934 2022-07-23 op `amused show`
56 a9fc4552 2022-02-17 op
57 213aea73 2022-02-17 op amused tries to be usable in composition with other more familiar tools
58 213aea73 2022-02-17 op instead of providing everything itself. For instance, there isn't a
59 213aea73 2022-02-17 op command to remove an item from the playlist, or shuffle it; instead,
60 213aea73 2022-02-17 op standard UNIX tools can be used:
61 a9fc4552 2022-02-17 op
62 da045d77 2022-02-17 op $ amused show | grep -vi kobayashi | amused load
63 da045d77 2022-02-17 op $ amused show | sort -R | amused load
64 da045d77 2022-02-17 op $ amused show | sort | uniq | amused load
65 da045d77 2022-02-17 op
66 da045d77 2022-02-17 op It also doesn't provide any means to manage a music collection. It
67 da045d77 2022-02-17 op plays nice with find(1) however:
68 da045d77 2022-02-17 op
69 09223daf 2022-06-11 op find . | amused load
70 a9fc4552 2022-02-17 op
71 a1e58086 2022-03-12 op I wrote a bit more about the background of amused [in a blog
72 a1e58086 2022-03-12 op post](https://www.omarpolo.com/post/amused.html).