Windows fixes

This commit is contained in:
Jack Andersen 2016-07-06 11:45:41 -10:00
parent 2d31313594
commit 1be5d6e821
1 changed files with 16 additions and 1 deletions

View File

@ -103,6 +103,20 @@ int main(int argc, const boo::SystemChar** argv)
double rate = 32000.0;
for (int i=1 ; i<argc ; ++i)
{
#if _WIN32
if (!wcsncmp(argv[i], L"-r", 2))
{
if (argv[i][2])
rate = wcstod(&argv[i][2], nullptr);
else if (argc > (i+1))
{
rate = wcstod(argv[i+1], nullptr);
++i;
}
}
else
m_args.push_back(argv[i]);
#else
if (!strncmp(argv[i], "-r", 2))
{
if (argv[i][2])
@ -115,6 +129,7 @@ int main(int argc, const boo::SystemChar** argv)
}
else
m_args.push_back(argv[i]);
#endif
}
/* Load data */
@ -402,7 +417,7 @@ int main(int argc, const boo::SystemChar** argv)
/* WAV out path */
amuse::SystemChar pathOut[1024];
snprintf(pathOut, 1024, _S("%s-%s.wav"), m_groupName->c_str(), m_songName->c_str());
SNPrintf(pathOut, 1024, _S("%s-%s.wav"), m_groupName->c_str(), m_songName->c_str());
Log.report(logvisor::Info, _S("Writing to %s"), pathOut);
/* Build voice engine */