This project is used to batch convert WAV files to MP3 using LAME library maximizing CPU utilization with multi-threading. It is designed to be compiled for Windows/Win32 target using Microsoft Visual Studio or Linux with standard GCC dev toolkit.
Open lametest.sln solution with Visual Studio and press F5. For VS 2015 Community you might encounter error in pthread.h. Just uncomment line in beginning of main.cpp:
#define HAVE_STRUCT_TIMESPEC
$> make
$> make clean
$> ./lametest <path>
Where path is file or directory to process.
./lametest testcase
This will encode provided test case WAV's into MP3
const bool gc_recursive = false;
To enable this option, change gc_recursive constant in main.cpp to true.
By default, VBR with standard quality is used for encoding. You can adjust settings by changing open() method of LameEnc class withing lame_enc.h file.
-
Project is designed for little endian systems (eg. Intel).
-
Only 8, 16, 24, 32-bit signed PCM WAV files are supported.
-
Tested on Ubuntu Linux, but should work on any other Linux system with make and gcc.
-
Tested on Windows using Visual Studio 2013 Express for Desktop and Visual Studio 2015 Community. If you encounter error in pthread.h, just uncomment line in main.cpp:
#define HAVE_STRUCT_TIMESPEC
This project uses following open source code:
-
pthreads-win32, version 2.9.1, precompiled, LGPL license,
-
Windows Dirent inteface, MIT license,
-
LAME, version 3.100, LGPL license,
-
Test case WAVs are excerpt based on "Divan Dan" song by E-Play band.