|
From: TJF <tjf...@we...> - 2010-05-17 15:42:40
|
Hi,
the commands are the same (batch/libsox). Do the same as shown in the
vol-example. May be you want to have this (not tested):
e = sox_create_effect(sox_find_effect("vol"));
args[0] = "-10db", assert(sox_effect_options(e, 1, args) ==
SOX_SUCCESS);
assert(sox_add_effect(chain, e, &in->signal, &out->signal) ==
SOX_SUCCESS);
e = sox_create_effect(sox_find_effect("stat"));
args[0] = "-v", assert(sox_effect_options(e, 1, args) == SOX_SUCCESS);
assert(sox_add_effect(chain, e, &in->signal, &out->signal) ==
SOX_SUCCESS);
Hope this helps.
Regards
Thomas
xl...@so... schrieb:
>
> Hi TJF,
>
>
>
> I'm sorry that I think I didn't describe my question clearly. In fact,
> I don't want to change the volume, I only want to get the volume
> adjustment info, such as executing the command: sox a.wav -n stat
> -v. If execute that command, sox will return the volume adjustment
> value. I want to get that value in my application using libsox.lib not
> using batch commands. I think maybe I should add a 'stat' effect to
> the effect chain, but I don't know how to set the options for 'stat'
> effect and how to get the result. Could you give me some suggestion?
>
>
>
> Best regards,
>
>
>
> Xldelg
>
>
> ------------------------------------------------------------------------
>
> 你的1G网络U盘真好用!
> <http://goto.mail.sohu.com/goto.php?code=udisk_zhujiao>
> 换个工作,工资翻两倍!
> <http://sohu.ad-plus.cn/event.ng/Type=click&FlightID=201004&TargetID=sohu&Values=df789d86,92d3d91d,277177cc,c2935d8d&AdID=54157>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Sox-users mailing list
> Sox...@li...
> https://lists.sourceforge.net/lists/listinfo/sox-users
>
|