Based on the analysis in the first three articles, you only need to write a MAKEFILE file to compile main. cpp and aaccodechelper. cpp, as shown below:
Makefile:
Cxx = g ++
Objects = Main. O aaccodechelper. o
Libs =-L/usr/local/lib-lfaac-wl,-rpath,/usr/local/lib-I/usr
Wavtoaac: $ (objects)
$ (Cxx) $ (objects)-O darling $ (libs)
Aaccodechelper. O: aaccodechelper. cpp aaccodechelper. h typedef. h
$ (Cxx)-C aaccodechelper. cpp $ (libs)
Main. O: Main. cpp aaccodechelper. h
$ (Cxx)-C main. cpp $ (libs)
Clean:
Rm-RF $ (objects)
Go to the current directory and run the following command:
Make
After the make command is executed, wavtoaac is generated, and then the following command is executed:
./Wavtoaac input.wav out. AAC
Input.wav is the source audio file, and out. AAC is the generated AAC file.
Listen to out. AAC and feel the effect!
PS: I wrote an article at the beginning. Please forgive me. If you have any questions or communication, you can add your YY: 301558660
Reprinted please indicate the source: zhujian blog, http://blog.csdn.net/linyanwen99/article/details/7554900