How to create null output effect?

111 Views Asked by At

I want to write a program just don't produce output file. How can I do that? I try to create sox_format_t with empty string or NULL string:

sox_format_t* out = sox_open_write(NULL, &signalInfo, &encodingInfo, NULL, NULL, NULL);
sox_format_t* out = sox_open_write("", &signalInfo, &encodingInfo, NULL, NULL, NULL);

I try to pass 0 args to output effect:

sox_effect_options(outputEffect, 0, args);

None of them work.

1

There are 1 best solutions below

2
desperateLord On BEST ANSWER

i try this code and it worked

sox_format_t* out = sox_open_write("", &signalInfo, &encodingInfo, "null", NULL, NULL);

but combine with 'trim' and 'noiseprof', my program print error message with no noise profile file.