mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
Using std::string instead of std::wstring for command-line args
Turns out that even if I manage to get Unicode command line args, there still is no portable way of opening a file from a Unicode path.
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
using std::exception;
|
||||
using std::string;
|
||||
using std::wstring;
|
||||
using std::unique_ptr;
|
||||
using std::map;
|
||||
using std::chrono::duration;
|
||||
@@ -70,11 +69,10 @@ ptree createXmlTree(const path& filePath, const map<centiseconds, Phone>& phones
|
||||
int main(int argc, char *argv[]) {
|
||||
try {
|
||||
// Get sound file name
|
||||
std::vector<wstring> commandLineArgs = getCommandLineArgs(argc, argv);
|
||||
if (commandLineArgs.size() != 2) {
|
||||
if (argc != 2) {
|
||||
throw std::runtime_error("Invalid command line arguments. Call with sound file name as sole argument.");
|
||||
}
|
||||
wstring soundFileName = commandLineArgs[1];
|
||||
string soundFileName = argv[1];
|
||||
|
||||
// Create audio streams
|
||||
unique_ptr<AudioStream> audioStream = createAudioStream(soundFileName);
|
||||
|
||||
Reference in New Issue
Block a user