[ecasound] LADSPA plugin and get-position

From: Pedro Antonio Fructuoso Merino <pfructuoso@email-addr-hidden>
Date: Wed Feb 01 2006 - 10:13:08 EET

Hello all, it`s me again...
    I`m trying LADSPA plugins and I've problems (how not! :P). Using
ECI, if I add a LADSPA plugin and I want know the current position,
ecasound always return a integer but if get it without the LADSPA plugin
I get a double. If I try the same commands in a ecasound console I don't
have any problem. I test it with ecasound 2.4.3 and 2.4.4. I paste a
code to test the problem.
    Regards,
        Pedro

#include <iostream>
#include <unistd.h>
#include <eca-control-interface.h>

int main(int argc, char *argv[])
{
    using namespace std;

    ECA_CONTROL_INTERFACE e;
    e.command("cs-add play_chainsetup");
    e.command("c-add 1st_chain");
    e.command("ai-add song.mp3");
    e.command("ao-add /dev/dsp");
    e.command("cs-connect");
    e.command("start");
    // uncoment one of this three lines to test the problem
// e.command("cop-add -el:Eq,0,0,0,0,0,0,0,0,0,0"); // uncoment one
of this three lines
// e.command("cop-add -el:mbeq,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1");
// e.command("cop-add -el:amPitchshift,'1.3',1,1");
    while(1) {
        sleep(1);
        e.command("engine-status");
        if (e.last_string() != "running") break;
        e.command("get-position");
        double curpos = e.last_float();
        if (curpos > 15.0) break;
        cout << "Current Position " << curpos << endl;
    }

    e.command("stop");
    e.command("cs-disconnect");

  return 0;
}

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Wed Feb 1 12:15:04 2006

This archive was generated by hypermail 2.1.8 : Wed Feb 01 2006 - 12:15:04 EET