Update Readme, license and Makefile
This commit is contained in:
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2024 by PedroEdiaz <ppedroediaz (at) gmail.com>.
|
Copyright (c) 2025 by PedroEdiaz <ppedroediaz (at) gmail.com>.
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
|||||||
11
Makefile
Normal file
11
Makefile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
BIN= cdplayer
|
||||||
|
OBJ= \
|
||||||
|
cdplayer.o \
|
||||||
|
tinyalsa/src/pcm.o \
|
||||||
|
tinyalsa/src/pcm_hw.o \
|
||||||
|
tinyalsa/src/snd_card_plugin.o
|
||||||
|
|
||||||
|
CFLAGS = -Itinyalsa/include
|
||||||
|
|
||||||
|
$(BIN): $(OBJ)
|
||||||
|
$(CC) $(OBJ) -o $(BIN)
|
||||||
54
README
54
README
@@ -1,18 +1,46 @@
|
|||||||
cdplayer
|
# cdplayer — Minimal CDDA Player for Linux
|
||||||
|
|
||||||
"cdplayer" is a minimal CDDA (Compact Disk Digital Audio) player
|
**`cdplayer`** is a minimal CDDA (Compact Disc Digital Audio) player for Linux.
|
||||||
for linux, that only depend on tinyalsa.
|
It plays audio CDs directly from `/dev/sr0` (or other CD devices) with almost
|
||||||
|
no dependencies — relying only on [**tinyalsa**](https://github.com/tinyalsa/tinyalsa).
|
||||||
|
|
||||||
BUILD:
|
|
||||||
cc -ltinyalsa -o cdplayer cdplayer.c
|
|
||||||
|
|
||||||
USAGE:
|
## Features
|
||||||
./cdplayer /dev/sr0 (<card>) (<device>) // play cd
|
|
||||||
|
|
||||||
kill -USR1 <proc> // Seek a minute forward
|
- Plays standard audio CDs via CD-ROM device
|
||||||
kill -USR2 <proc> // Seek a minute backward
|
- Controlled using UNIX signals (no GUI or TUI)
|
||||||
kill -STOP <proc> // Stop
|
- Depends only on `tinyalsa` for audio playback
|
||||||
kill -CONT <proc> // Play
|
- Extremely small and hackable C codebase
|
||||||
|
|
||||||
LICENSE:
|
## Build
|
||||||
0BSD Copyright (c) 2024 by PedroEdiaz <ppedroediaz (at) gmail.com>
|
To compile the program run `make` or:
|
||||||
|
```sh
|
||||||
|
cc -Itinyalsa/include -o cdplayer cdplayer.c tinyalsa/src/pcm.c tinyalsa/src/pcm_hw.c tinyalsa/src/snd_card_plugin.c
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
```sh
|
||||||
|
./cdplayer cdrom [card=0] [device=0]
|
||||||
|
```
|
||||||
|
|
||||||
|
- `cdrom` — CD-ROM device like `/dev/sr0`
|
||||||
|
- `card` — ALSA sound card number (default: 0)
|
||||||
|
- `device` — ALSA PCM device number (default: 0)
|
||||||
|
|
||||||
|
## Controls (via `kill`)
|
||||||
|
You can control playback using UNIX signals:
|
||||||
|
|
||||||
|
Signal|Action
|
||||||
|
------|-----
|
||||||
|
`SIGUSR1`|Seek forward 1 minute
|
||||||
|
`SIGUSR2`|Seek backward 1 minute
|
||||||
|
`SIGSTOP`| Pause playback
|
||||||
|
`SIGCONT`| Resume playback
|
||||||
|
|
||||||
|
|
||||||
|
## Licence
|
||||||
|
0BSD – Zero Clause BSD License. See [LICENSE](./LICENSE) for details.
|
||||||
|
Feel free to use, modify, and share freely — no restrictions.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
Contributions are welcome! Feel free to submit issues or pull requests.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ int main( int argc, char * argv[] )
|
|||||||
{
|
{
|
||||||
weite_err( "Usage: " );
|
weite_err( "Usage: " );
|
||||||
weite_err( argv[0] );
|
weite_err( argv[0] );
|
||||||
weite_err( " /dev/sr0 (<card>) (<device>)\n" );
|
weite_err( "cdrom [card=0] [device=0]\n" );
|
||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
tinyalsa
Submodule
1
tinyalsa
Submodule
Submodule tinyalsa added at e43025bbf7
Reference in New Issue
Block a user