diff options
author | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-01-26 01:43:17 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-01-26 01:43:17 +0100 |
commit | b70a7fc963cd58445c55b1d1702e151a39e3fc07 (patch) | |
tree | 366f47092a174f481ad7311907a03b677b6ae601 /rc/bin | |
parent | 173a01ef8b43690f2f3f02d75d03d83436d8022d (diff) |
mp3dec: resample to target frequency, play: guess mp3 from filename
Diffstat (limited to 'rc/bin')
-rwxr-xr-x | rc/bin/play | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/rc/bin/play b/rc/bin/play index 3fd688de8..73fdcf6e5 100755 --- a/rc/bin/play +++ b/rc/bin/play @@ -32,13 +32,16 @@ fn play1 { case *plain* sed 's/
//g' | while(j=`{read}){ echo $"j >[1=2] + t=$typ if(~ $"j http:* https:* HTTP:* HTTPS:*){ - if(~ $#typ 0) typ=mp3 - hget -r 'Icy-MetaData: 0' $j | play1 $typ + if(~ $#t 0) t=mp3 + hget -r 'Icy-MetaData: 0' $j | play1 $t } if not { - if(test -r $"j) - play1 <$"j + if(test -r $"j){ + if(~ $#t 0 && ~ $"j *mp3*) t=mp3 + play1 $t <$"j + } if not { echo $argv0: 'can''t open file:' $"j >[1=2] } |