pcmprint

CLI PCM visualiser
git clone git://nsmpr.xyz/pcmprint.git
Log | Files | Refs | README

commit c16848c3c9eaa4a34593c9477e5fdfdc708509bc
parent 273e067699620adbcaede1763d2d630eacd0c8d5
Author: zavok <an2qzavok@gmail.com>
Date:   Fri,  1 Nov 2019 11:41:20 +0300

changed Makefile and README, fixed typo in man page

Diffstat:
MMakefile | 32+++++++++++++++++++++++++++++---
AREADME | 3+++
DREADME.md | 12------------
Mpcmprint.1 | 2+-
4 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,7 +1,33 @@ +.POSIX: + +PREFIX = /usr/local +MANDIR = $(PREFIX)/share/man/man1 + +BIN = pcmprint +MAN = $(BIN).1 +OBJ = $(BIN:=.o) + +all: $(BIN) + +$(BIN): $(OBJ) + $(CC) $(OBJ) $(LDFLAGS) $(LIBS) -o $@ + pcmprint: pcmprint.c cc pcmprint.c -o pcmprint -install: pcmprint - cp pcmprint /usr/local/bin/pcmprint - cp pcmprint.1 /usr/local/man/man1/pcmprint.1 +install: $(BIN) + mkdir -p $(DESTDIR)$(PREFIX)/bin/ + cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin/ + chmod 555 $(DESTDIR)$(PREFIX)/bin/$(BIN) + mkdir -p $(DESTDIR)$(MANDIR) + cp -f $(MAN) $(DESTDIR)$(MANDIR) + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) + rm -f $(DESTDIR)$(MANDIR)/$(MAN) + +clean: + rm -f $(BIN) $(OBJ) +.c.o: + $(CC) $(CFLAGS) -c $< diff --git a/README b/README @@ -0,0 +1,3 @@ +Pcmprint, as the name suggests, prints PCM data to stdout in what +could be considered human-readable form. + diff --git a/README.md b/README.md @@ -1,12 +0,0 @@ -Pcmprint, as the name suggests, prints PCM data to stdout in what -could be considered human-readable form. - -See man page for more info. - -Features considered and rejected: ---------------------------------- - -* more than 2 levels of "intensity" -* using non-ASCII characters for output -* automatic width setting -* configurable input format diff --git a/pcmprint.1 b/pcmprint.1 @@ -19,7 +19,7 @@ Input data is assumed to be RAW PCM, signed, 16-bit, little-endian, stereo, with specifies size of the sample block to operate on. Size of the block is assumed to be in sampling frames, 4 bytes per frame. Default value is 1024. -.It Fl v Ar width +.It Fl w Ar width specifies width of the printed channel on the output. Default value is 30 characters, which with 2 channels and hardcoded 10 characters of separation fits into standard 80-columns terminal with some room to play. .Sh EXIT STATUS