terça-feira, 1 de janeiro de 2013

"splice" effect in sox

When two input files and one output file is required for an effect such as the splice effect, how should the sox_open_read() method be called?


A typical libsox routine would look something like:

in=sox_open_read(file_path_in, NULL, NULL, NULL);
    out=sox_open_write(file_path_out, &in->signal, NULL, NULL, NULL, NULL);
    chain = sox_create_effects_chain(&in->encoding, &out->encoding);
  
    e = sox_create_effect(sox_find_effect("input"));
    args[0] = (char *)in, assert(sox_effect_options(e, 1, args) == SOX_SUCCESS);
   
    assert(sox_add_effect(chain, e, &in->signal, &in->signal) == SOX_SUCCESS);
  
        e = sox_create_effect(sox_find_effect("speed"));
        args[0] = 5,
        assert(sox_effect_options(e, 1, args) == SOX_SUCCESS);
        assert(sox_add_effect(chain, e, &in->signal, &in->signal) == SOX_SUCCESS);


I want to use the "splice" effect which requires 2 input files to combine into one output.

Any help would be appreciated.
 

Esperante

 
Kiam du enigo dosierojn kaj unu eliron dosiero estas necesa por efekto kiel la splice efekton, kiel se la sox_open_read () metodo nomi?
Tipa libsox rutino aspektus ion kiel:
 

in=sox_open_read(file_path_in, NULL, NULL, NULL);
    out=sox_open_write(file_path_out, &in->signal, NULL, NULL, NULL, NULL);
    chain = sox_create_effects_chain(&in->encoding, &out->encoding);
  
    e = sox_create_effect(sox_find_effect("input"));
    args[0] = (char *)in, assert(sox_effect_options(e, 1, args) == SOX_SUCCESS);
   
    assert(sox_add_effect(chain, e, &in->signal, &in->signal) == SOX_SUCCESS);
  
        e = sox_create_effect(sox_find_effect("speed"));
        args[0] = 5,
        assert(sox_effect_options(e, 1, args) == SOX_SUCCESS);
        assert(sox_add_effect(chain, e, &in->signal, &in->signal) == SOX_SUCCESS);


Mi volas uzi la "splice" efekto kiu postulas 2 dosieroj kombinitaj en unu eliro.
Neniu helpo estimas.

Nenhum comentário:

Postar um comentário