Pipeplayer - simple music demon
Find a file
2022-08-08 00:42:22 +00:00
.gitignore Initial commit. 2022-08-08 00:42:22 +00:00
commands.h Initial commit. 2022-08-08 00:42:22 +00:00
config.h Initial commit. 2022-08-08 00:42:22 +00:00
config.mk Initial commit. 2022-08-08 00:42:22 +00:00
dirname.c Initial commit. 2022-08-08 00:42:22 +00:00
dirname.h Initial commit. 2022-08-08 00:42:22 +00:00
list.c Initial commit. 2022-08-08 00:42:22 +00:00
list.h Initial commit. 2022-08-08 00:42:22 +00:00
log.h Initial commit. 2022-08-08 00:42:22 +00:00
loglevels.h Initial commit. 2022-08-08 00:42:22 +00:00
Makefile Initial commit. 2022-08-08 00:42:22 +00:00
pipe.c Initial commit. 2022-08-08 00:42:22 +00:00
pipe.h Initial commit. 2022-08-08 00:42:22 +00:00
pipeplayer.1 Initial commit. 2022-08-08 00:42:22 +00:00
pipeplayer.c Initial commit. 2022-08-08 00:42:22 +00:00
player.c Initial commit. 2022-08-08 00:42:22 +00:00
player.h Initial commit. 2022-08-08 00:42:22 +00:00
playlist.c Initial commit. 2022-08-08 00:42:22 +00:00
playlist.h Initial commit. 2022-08-08 00:42:22 +00:00
README.md Initial commit. 2022-08-08 00:42:22 +00:00
threads.c Initial commit. 2022-08-08 00:42:22 +00:00
threads.h Initial commit. 2022-08-08 00:42:22 +00:00

Pipeplayer

Pipeplayer is a simple music daemon. It uses libmpg123 to decode files and libao to play sound. You can control it with named pipe (FIFO).

Before using this

This program requires playlist file which is plain text of songs in the same directory. For example, you have folder with this files: song1.mp3, song_2.mp3, 4.mp3 and 56.mp3. Your playlist file shoul'd look like:

song1.mp3
song_2.mp3
4.mp3
56.mp3

Tip: cd into folder with music and run command ls -1N | tee playlist to automatically generate playlist file. Note that order may differ.

Usage

First of all, you need to create named pipe (FIFO). It can be done by running following command:

mkfifo ~/.cache/.pipeplayer

Then, you can start daemon either during start of your desktop environment or window manager or even in tty with this command:

pipeplayer ~/.cache/.pipeplayer

Note: add & at the end of command to run process in background.

Now you can send commands to created named pipe like this:

echo l$HOME/Music/playlist > ~/.cache/.pipeplayer

You can find all commands in man page, after installation you can run: man pipeplayer

Installation

You need a few things:

  • git
  • C compiler, such as gcc, clang or tcc
  • make
  • libmpg123
  • libao

Install that stuff, clone this repository, cd into it and simply run make and sudo (or doas) make install:

git clone https://git.disroot.org/elijah.dev/pipeplayer.git
cd pipeplayer
make
sudo make install

If you prefer gcc, then run make CC=gcc instead of make. Also, if you prefer clang, run make CC=clang STRIPFLAG=

Here some tips for installing dependencies on some distros:

Archlinux and arch-based distros

pacman -Syu --needed tcc mpg123 libao

Guides for other distibutions will appear in future. If you know one, feel free to add.

TODO

  • Add pause command
  • Add navigation inside song

Bugs

If you have found bugs, you can open issue or contact me via email elijah.dev@disroot.org