How to use SoxController Class In ffmpeg library In android ? Any Example -
having problems in using soxcontroller class . . can body give me example of trimaudio function in soxcontroller class . . .
let try one,, think it's perfect because tested already. works well
/** * trim file wave */ public class trimfilewave extends asynctask<string, void, void> { private progressdialogutil progressdialogutil; private context context; public trimfilewave(context context) { this.context = context; progressdialogutil = new progressdialogutil(context, r.string.progressing); } @override protected void onpreexecute() { progressdialogutil.show(); } @override protected void doinbackground(string... params) { starttrimfile(); return null; } @override protected void onpostexecute(void unused) { progressdialogutil.dismiss(); } private void starttrimfile() { file fileapproot = new file(context.getapplicationinfo().datadir); try { soxcontroller sxcon = new soxcontroller(context, fileapproot, new shellutils.shellcallback() { @override public void shellout(string shellline) { debugutil.log(new exception(), shellline); } @override public void processcomplete(int exitvalue) { debugutil.log(new exception(), exitvalue); } }); double length = sxcon.getlength(myapplication.file_name_recorded_wave); debugutil.log(new exception(), "[length]" + length); // sxcon.trimaudio(myapplication.file_merge_wave, 0, length); // type {"q", "h", "t", "l", "p"} sxcon.fadeaudio(myapplication.file_merge_wave, "t", 0, length, 1); } catch (exception e) { debugutil.loginfo(new exception(), e.tostring()); } } }
Comments
Post a Comment