mlc/main.cpp

30 lines
589 B
C++
Raw Normal View History

2023-07-15 19:44:29 +00:00
#include <iostream>
2023-07-16 00:15:31 +00:00
#include <string>
#include "FLAC/stream_decoder.h"
#include <lame/lame.h>
#include "help.h"
2023-07-16 23:36:25 +00:00
#include "flactomp3.h"
2023-07-15 19:44:29 +00:00
int main(int argc, char **argv) {
2023-07-16 00:15:31 +00:00
if (argc < 2) {
std::cout << "Insufficient amount of arguments, launch with \"--help\" argument to see usage" << std::endl;
return 1;
}
const std::string firstArgument(argv[1]);
if (firstArgument == "--help") {
printHelp();
return 0;
}
2023-07-16 23:36:25 +00:00
FLACtoMP3 pipe;
pipe.setInputFile(firstArgument);
pipe.setOutputFile("out.mp3");
pipe.run();
2023-07-16 00:15:31 +00:00
2023-07-15 19:44:29 +00:00
return 0;
}