shithub: rc

Download patch

ref: 2944d69fd97439729b79475d87c03849bfbb9d79
parent: 67f47b416fafba07c83099eb899f1e20a530f908
author: qwx <qwx@sciops.net>
date: Mon Oct 31 04:43:28 EDT 2022

pplay → audio/pplay

--- a/bin/chord
+++ b/bin/chord
@@ -1,7 +1,7 @@
 #!/bin/rc
 rfork n
 games/wadfs /sys/games/lib/doom/d2/doom2.wad >[2]/dev/null || exit
-cat <<! | mst | games/dmid | games/opl3 | norm 5 | pplay
+cat <<! | mst | games/dmid | games/opl3 | norm 5 | audio/pplay
 t $1
 4 0c♭3 0e♭3 0g♭3
 4 0c♭3 0e♭3 0g♭3
--- a/bin/metro
+++ b/bin/metro
@@ -1,7 +1,7 @@
 #!/bin/rc
 rfork n
 games/wadfs /sys/games/lib/doom/d2/doom2.wad >[2]/dev/null || exit
-cat <<! | mst | games/dmid | games/opl3 | pplay
+cat <<! | mst | games/dmid | games/opl3 | audio/pplay
 t $1
 i 0 127
 4 0c5
--- a/bin/pcmf
+++ b/bin/pcmf
@@ -6,5 +6,5 @@
 fn sigint{ clean }
 ramfs
 play -o /tmp/pplay.$pid $* >[2]/dev/null
-pplay -f /tmp/pplay.$pid
+audio/pplay -f /tmp/pplay.$pid
 rm -f /tmp/pplay.$pid
--- a/fn
+++ b/fn
@@ -2,9 +2,9 @@
 # playback samples from microphone (needs setup)
 fn admp{ dd -bs 4x441 </dev/audio >/dev/audio }
 # decode audio files(s) and visualize with pplay(1)
-fn pcm{ @{o=(); while(~ $1 -?) o=($o $1) && shift; play -o /fd/1 $* >[2]/dev/null | pplay $o}}
-# same, without temporary viariables (???)
-fn ppcm{ *=($*($#*) $* $#*) play -o /fd/1 $1 >[2]/dev/null | pplay $*(2-$*($#*)) }
+fn pcm{ @{o=(); while(~ $1 -?) o=($o $1) && shift; play -o /fd/1 $* >[2]/dev/null | audio/pplay $o}}
+# same, without temporary variables (???)
+fn ppcm{ *=($*($#*) $* $#*) play -o /fd/1 $1 >[2]/dev/null | audio/pplay $*(2-$*($#*)) }
 # convert a wolf3d digital audio lump
 fn wpcm{ audio/pcmconv -i u8c1r7000 -o s16c2r44100 <$1 >/dev/audio }
 
--- a/plumbing
+++ b/plumbing
@@ -24,13 +24,13 @@
 data	matches	'[a-zA-Z¡-￿0-9_\-.,/ ]+'
 data	matches	'([a-zA-Z¡-￿0-9_\-.,/ ]+)\.(mp3|MP3|ogg|OGG|flac|FLAC|wav|WAV|au|AU|mid|MID|mus|MUS|m3u|M3U|pls|PLS|opus|OPUS|aac|AAC|m4a|M4A|mod|MOD)'
 arg	isfile	$0
-plumb start window play -o /fd/1 $file >[2]/dev/null | pplay
+plumb start window play -o /fd/1 $file >[2]/dev/null | audio/pplay
 
 type is text
 data matches '[a-zA-Z¡-￿0-9_\-.,/]+'
 data matches '([a-zA-Z¡-￿0-9_\-.,/]+)\.(pcm|PCM)'
 arg isfile	$0
-plumb start window pplay $file
+plumb start window audio/pplay $file
 
 type is text
 data matches '[a-zA-Z¡-￿0-9_\-.,/]+'