Re: [ecasound] problems with cs-set-position

From: Pedro Antonio Fructuoso Merino <pfructuoso@email-addr-hidden>
Date: Tue Sep 06 2005 - 19:14:44 EEST
Kai Vehmanen escribió:
Unfortunately this is also expected. Seeking mp3 files with Ecasound is limited to the mp3 frame size (usually 1152 samples per frame). This could be improved, but would require more integrated support for mp3 decoding/encoding, and due to various issues (adding extra library dependencies, licensing issues. etc), I'm not too enthusiastic about doing this.

ok, please, help me with that:
I have a mp3 file, with 128 kb/s, 44100 Hz, stereo, 15201791 sample-length and 344.712 seconds ¿ok?
With this I have 38.28125 frames per second so i must can do a cs-set-position or cs-set-position-samples every second (or less, exactly every 0,026 seconds) but i can't do it every 5 seconds (or more) because don't work fine, too. Why??

Thinking what is the best way to make you understand what is my problem, I made a little program, which source code is behind this. Please, try it.

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

int main(int argc, char *argv[])
{
 

    ECA_CONTROL_INTERFACE e;
    e.command("cs-add play_chainsetup");
    e.command("c-add 1st_chain");
    e.command("cs-set-param -z:nodb");
    e.command("ai-add /home/pfructuoso/Musica/Musica_Tecno/BonGarcon.mp3");
    e.command("ao-add arts");
    e.command("cs-select play_chainsetup");
    e.command("cs-connect");
    e.command("start");
    sleep(1);

    for (int i = 0; i<= 5; i++)
    {
        e.command("get-position");
        float pos = e.last_float();
        e.command("cs-set-position 100");
        std::cout << "Position: " << pos << std::endl;
        sleep(5);
    }

    e.command("stop");
    e.command("cs-select play_chainsetup");
//     e.command("cs-disconnect");
//     sleep(30);

    std::cout << "END" << std::endl;

    return(0);
}


------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Ecasound-list mailing list Ecasound-list@email-addr-hidden https://lists.sourceforge.net/lists/listinfo/ecasound-list Received on Tue Sep 6 20:15:07 2005

This archive was generated by hypermail 2.1.8 : Tue Sep 06 2005 - 20:15:07 EEST