Re: [linux-audio-dev] reminder about Ecasound Control Interface

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] reminder about Ecasound Control Interface
From: Jan Weil (Jan.Weil_AT_web.de)
Date: Fri Dec 12 2003 - 09:09:31 EET


I can't resist (just promoting the beauty of Ruby):

--8<--
#!/usr/bin/env ruby
require 'ecasound'

e = Ecasound::ControlInterface.new()
e.command("cs-add jackmon")
e.command("c-add jacmon")
e.command("ai-add jack")
e.command("ao-add null")
e.command("cs-connect")
e.command("start")

loop do
    $stderr << "JACK system pos #{e.command('get-position')}\tsecs\r"
    sleep(0.2)
end
--8<--

(An error raises an exception)

Jan

Am Fre, den 12.12.2003 schrieb Kai Vehmanen um 03:50:
> --cut--
> #!/usr/bin/env python
> from pyeca import *
> from time import sleep
>
> e = ECA_CONTROL_INTERFACE()
> e.command("cs-add jackmon")
> e.command("c-add jacmon")
> e.command("ai-add jack")
> e.command("ao-add null")
> e.command("cs-connect")
> e.command("start")
>
> while e.last_type() != 'e':
> e.command("get-position")
> curpos = e.last_float()
> if e.last_type() == 'e': break
> sys.stderr.write('JACK system pos %6.2f secs\r' % e.last_float())
> sleep(0.2)
> --cut--


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Dec 12 2003 - 09:06:35 EET