sox library call main, and error is can't open input file `1', why?

262 views Asked by At

I use the sox library on android, and i use the command to change the channel of mp3 file

enter image description here

sox /storage/emulated/0/Music/Drivethrough.mp3 -c 1 /storage/emulated/0/Android/data/com.tian.xxx/cache/temp/results.mp3

when i run it, display

can't open input file `1': No such file or directory

and my code is:

int mymain(int argc, char **argv, const char *tempPath);

here is the code detail: https://github.com/pxhbug123/SoxLibInAndroid/blob/master/soxcommandlibrary/src/main/sox/src/sox.c#L2908

I do not know why ?

I use this method to call sox https://github.com/pxhbug123/SoxLibInAndroid/blob/master/soxcommandlibrary/src/main/sox/src/JniNative.c#L265

1

There are 1 answers

0
badboy_tqj On

solved it. just replace the '-c' to '--channels'