File: raw_int.pl

package info (click to toggle)
libaudio-ecasound-perl 1.01-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 144 kB
  • sloc: perl: 302; makefile: 3
file content (41 lines) | stat: -rwxr-xr-x 918 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl -w

use ExtUtils::testlib;

use strict;

use Audio::Ecasound ':std';

# WARNING NO ERROR CHECKING!!

command("cs-add play_chainsetup");
command("c-add 1st_chain");
command("-i:some_file.wav");
command("-o:/dev/dsp");
command("cop-add -efl:100");
command("cop-select 1");
command("copp-select 1");
command("cs-connect");
if(error()) {
    die "Setup error, you need 'some_file.wav' in the current directory\n\n"
                            . last_error();
}
command("start");
my $cutoff_inc = 500.0;
while (1) {
    sleep(1);
    command("engine-status");
    last if last_string() ne "running";

    command("get-position");
    my $curpos = last_float();
    last if $curpos > 15;

    command("copp-get");
    my $next_cutoff = $cutoff_inc + last_float();
    command_float_arg("copp-set", $next_cutoff);
}
command("stop");
command("cs-disconnect");
command("cop-status");
print last_string(), "\n";