[linux-audio-dev] reminder about Ecasound Control Interface
Jan Weil
Jan.Weil at web.de
Fri Dec 12 07:09:31 UTC 2003
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--
More information about the Linux-audio-dev
mailing list