1
0
mirror of http://mpg123.de/trunk/.git synced 2025-07-03 11:22:31 +03:00
Files
mpg123/misc/equalizer-control.pl
njh a7bea0d89e Changed all occurrences of http://mpg123.de to http://mpg123.org (for consistency)
git-svn-id: svn://scm.orgis.org/mpg123/trunk@683 35dc7657-300d-0410-a2e5-dc2837fedb53
2007-06-01 00:32:13 +00:00

32 lines
615 B
Perl

#!/usr/bin/perl
# test.pl: a little demonstration code for equalizer control over generic control interface
# copyright by the mpg123 project - free software under the terms of the LGPL 2.1
# see COPYING and AUTHORS files in distribution or http://mpg123.org
open(FH, "|-", "./mpg123 -R -");
select FH; $| = 1;
$e0 = 0;
$e1 = 0;
while(<STDIN>)
{
if($_ =~ /pl/) { print FH "l mp3.mp3\n"; }
if($_ =~ /st/) { print FH "stop\n"; }
if($_ =~ /up/)
{
$e0 = $e0+0.1;
print FH "eq 0 0 $e0\n";
print FH "eq 1 0 $e0\n";
}
if($_ =~ /dn/)
{
$e0--;
print FH "eq 0 0 $e0\n";
print FH "eq 1 0 $e0\n";
}
}