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 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 b3c3ccdc 2023-09-07 op To compile the web control interface, amused-web, run:
31 b3c3ccdc 2023-09-07 op
32 b3c3ccdc 2023-09-07 op $ make web
33 b3c3ccdc 2023-09-07 op # make install-web # eventually
34 b3c3ccdc 2023-09-07 op
35 80982f2c 2022-07-09 op The build can be customized by passing arguments to the configure
36 80982f2c 2022-07-09 op script or by using a `configure.local` file; see `./configure -h`
37 80982f2c 2022-07-09 op and [`configure.local.example`](configure.local.example) for more
38 80982f2c 2022-07-09 op information.
39 80982f2c 2022-07-09 op
40 80982f2c 2022-07-09 op For each library the `configure` script first tries to see if they're
41 80982f2c 2022-07-09 op available without any extra flags, then tries again with some
42 b3c3ccdc 2023-09-07 op hard-coded flags (e.g. `-lFLAC` for flac) and finally resorts to
43 80982f2c 2022-07-09 op pkg-config if available. pkg-config auto-detection can be disable by
44 80982f2c 2022-07-09 op passing `PKG_CONFIG=false` (or the empty string)
45 80982f2c 2022-07-09 op
46 d942a1f8 2022-07-13 op For Linux users with libbsd installed, the configure script can be
47 d942a1f8 2022-07-13 op instructed to use libbsd exclusively as follows:
48 80982f2c 2022-07-09 op
49 2acca6be 2022-09-28 op $ CFLAGS="$(pkg-config --cflags libbsd-overlay)" \
50 d942a1f8 2022-07-13 op ./configure LDFLAGS="$(pkg-config --libs libbsd-overlay)"
51 d942a1f8 2022-07-13 op
52 91a5f366 2023-03-24 op To force the use of one specific audio backend and not simply the first
53 91a5f366 2023-03-24 op one found, pass `--backend` as:
54 d942a1f8 2022-07-13 op
55 91a5f366 2023-03-24 op $ ./configure --backend=alsa # or sndio
56 91a5f366 2023-03-24 op
57 91a5f366 2023-03-24 op
58 09223daf 2022-06-11 op ## Usage
59 3c18f438 2022-03-13 op
60 a9fc4552 2022-02-17 op The fine man page has all nitty gritty details, but the TL;DR is
61 a9fc4552 2022-02-17 op
62 885b6e2b 2023-01-08 op - enqueue music with `amused add files...` or `amused load <playlist`
63 2ab37934 2022-07-23 op - control the playback with `amused play|pause|toggle|stop`
64 885b6e2b 2023-01-08 op - check the status with `amused status` and the current playlist with
65 2ab37934 2022-07-23 op `amused show`
66 a9fc4552 2022-02-17 op
67 213aea73 2022-02-17 op amused tries to be usable in composition with other more familiar tools
68 213aea73 2022-02-17 op instead of providing everything itself. For instance, there isn't a
69 213aea73 2022-02-17 op command to remove an item from the playlist, or shuffle it; instead,
70 213aea73 2022-02-17 op standard UNIX tools can be used:
71 a9fc4552 2022-02-17 op
72 da045d77 2022-02-17 op $ amused show | grep -vi kobayashi | amused load
73 da045d77 2022-02-17 op $ amused show | sort -R | amused load
74 da045d77 2022-02-17 op $ amused show | sort | uniq | amused load
75 da045d77 2022-02-17 op
76 da045d77 2022-02-17 op It also doesn't provide any means to manage a music collection. It
77 da045d77 2022-02-17 op plays nice with find(1) however:
78 da045d77 2022-02-17 op
79 2acca6be 2022-09-28 op $ find . | amused load
80 a9fc4552 2022-02-17 op
81 885b6e2b 2023-01-08 op Non-music files found in the playlist are automatically skipped and
82 885b6e2b 2023-01-08 op removed, so there's no harm in loading everything under a certain
83 885b6e2b 2023-01-08 op directory.
84 885b6e2b 2023-01-08 op
85 a1e58086 2022-03-12 op I wrote a bit more about the background of amused [in a blog
86 a1e58086 2022-03-12 op post](https://www.omarpolo.com/post/amused.html).