Windows build fixes

This commit is contained in:
Jack Andersen 2018-08-25 21:58:04 -10:00
parent 19c5443e9e
commit 33d2cc9ef1
3 changed files with 266 additions and 259 deletions

View File

@ -1882,7 +1882,7 @@ QMimeData* MakeMimeData(NT* n, const QString& mimeType)
QMimeData* data = new QMimeData;
athena::io::VectorWriter vw;
athena::io::YAMLDocWriter w(nullptr);
w.writeString("name", QStringToSysString(n->name()));
w.writeString("name", n->name().toStdString());
WriteMimeYAML(w, n);
w.finish(&vw);
data->setData(mimeType, QByteArray((char*)vw.data().data(), int(vw.data().size())));

View File

@ -307,10 +307,17 @@ std::string AudioGroupDatabase::exportCHeader(std::string_view projectName, std:
ret += "\n"
" * Date: "sv;
time_t curTime = time(nullptr);
#ifndef _WIN32
struct tm curTm;
localtime_r(&curTime, &curTm);
char curTmStr[26];
asctime_r(&curTm, curTmStr);
#else
struct tm curTm;
localtime_s(&curTm, &curTime);
char curTmStr[26];
asctime_s(curTmStr, &curTm);
#endif
ret += curTmStr;
ret += "\n"
" */\n\n\n"sv;

View File

@ -6,268 +6,268 @@ namespace amuse
static const float VolumeTable[] =
{
0.000000,
0.000031,
0.000153,
0.000397,
0.000702,
0.001129,
0.001648,
0.002228,
0.002930,
0.003723,
0.004608,
0.005585,
0.006653,
0.007843,
0.009125,
0.010498,
0.011963,
0.013550,
0.015198,
0.016999,
0.018860,
0.020844,
0.022919,
0.025117,
0.027406,
0.029817,
0.032319,
0.034944,
0.037660,
0.040468,
0.043428,
0.046480,
0.049623,
0.052889,
0.056276,
0.059786,
0.063387,
0.067110,
0.070956,
0.074923,
0.078982,
0.083163,
0.087466,
0.091922,
0.096469,
0.101138,
0.105930,
0.110843,
0.115879,
0.121036,
0.126347,
0.131748,
0.137303,
0.142979,
0.148778,
0.154729,
0.160772,
0.166997,
0.173315,
0.179785,
0.186407,
0.193121,
0.200018,
0.207007,
0.214179,
0.221473,
0.228919,
0.236488,
0.244209,
0.252083,
0.260079,
0.268258,
0.276559,
0.285012,
0.293649,
0.302408,
0.311319,
0.320383,
0.329600,
0.339000,
0.348521,
0.358226,
0.368084,
0.378094,
0.388287,
0.398633,
0.409131,
0.419813,
0.430647,
0.441664,
0.452864,
0.464217,
0.475753,
0.487442,
0.499313,
0.511399,
0.523606,
0.536027,
0.548631,
0.561419,
0.574389,
0.587542,
0.600879,
0.614399,
0.628132,
0.642018,
0.656148,
0.670431,
0.684927,
0.699637,
0.714530,
0.729637,
0.744926,
0.760430,
0.776147,
0.792077,
0.808191,
0.824549,
0.841090,
0.857845,
0.874844,
0.892056,
0.909452,
0.927122,
0.945006,
0.963073,
0.981414,
1.000000,
1.000000
0.000000f,
0.000031f,
0.000153f,
0.000397f,
0.000702f,
0.001129f,
0.001648f,
0.002228f,
0.002930f,
0.003723f,
0.004608f,
0.005585f,
0.006653f,
0.007843f,
0.009125f,
0.010498f,
0.011963f,
0.013550f,
0.015198f,
0.016999f,
0.018860f,
0.020844f,
0.022919f,
0.025117f,
0.027406f,
0.029817f,
0.032319f,
0.034944f,
0.037660f,
0.040468f,
0.043428f,
0.046480f,
0.049623f,
0.052889f,
0.056276f,
0.059786f,
0.063387f,
0.067110f,
0.070956f,
0.074923f,
0.078982f,
0.083163f,
0.087466f,
0.091922f,
0.096469f,
0.101138f,
0.105930f,
0.110843f,
0.115879f,
0.121036f,
0.126347f,
0.131748f,
0.137303f,
0.142979f,
0.148778f,
0.154729f,
0.160772f,
0.166997f,
0.173315f,
0.179785f,
0.186407f,
0.193121f,
0.200018f,
0.207007f,
0.214179f,
0.221473f,
0.228919f,
0.236488f,
0.244209f,
0.252083f,
0.260079f,
0.268258f,
0.276559f,
0.285012f,
0.293649f,
0.302408f,
0.311319f,
0.320383f,
0.329600f,
0.339000f,
0.348521f,
0.358226f,
0.368084f,
0.378094f,
0.388287f,
0.398633f,
0.409131f,
0.419813f,
0.430647f,
0.441664f,
0.452864f,
0.464217f,
0.475753f,
0.487442f,
0.499313f,
0.511399f,
0.523606f,
0.536027f,
0.548631f,
0.561419f,
0.574389f,
0.587542f,
0.600879f,
0.614399f,
0.628132f,
0.642018f,
0.656148f,
0.670431f,
0.684927f,
0.699637f,
0.714530f,
0.729637f,
0.744926f,
0.760430f,
0.776147f,
0.792077f,
0.808191f,
0.824549f,
0.841090f,
0.857845f,
0.874844f,
0.892056f,
0.909452f,
0.927122f,
0.945006f,
0.963073f,
0.981414f,
1.000000f,
1.000000f
};
static const float DLSVolumeTable[] =
{
0.000000,
0.000062,
0.000248,
0.000558,
0.000992,
0.001550,
0.002232,
0.003038,
0.003968,
0.005022,
0.006200,
0.007502,
0.008928,
0.010478,
0.012152,
0.013950,
0.015872,
0.017918,
0.020088,
0.022382,
0.024800,
0.027342,
0.030008,
0.032798,
0.035712,
0.038750,
0.041912,
0.045198,
0.048608,
0.052142,
0.055800,
0.059582,
0.063488,
0.067518,
0.071672,
0.075950,
0.080352,
0.084878,
0.089528,
0.094302,
0.099200,
0.104222,
0.109368,
0.114638,
0.120032,
0.125550,
0.131192,
0.136958,
0.142848,
0.148862,
0.155000,
0.161262,
0.167648,
0.174158,
0.180792,
0.187550,
0.194432,
0.201438,
0.208568,
0.215822,
0.223200,
0.230702,
0.238328,
0.246078,
0.253953,
0.261951,
0.270073,
0.278319,
0.286689,
0.295183,
0.303801,
0.312543,
0.321409,
0.330399,
0.339513,
0.348751,
0.358113,
0.367599,
0.377209,
0.386943,
0.396801,
0.406783,
0.416889,
0.427119,
0.437473,
0.447951,
0.458553,
0.469279,
0.480129,
0.491103,
0.502201,
0.513423,
0.524769,
0.536239,
0.547833,
0.559551,
0.571393,
0.583359,
0.595449,
0.607663,
0.620001,
0.632463,
0.645049,
0.657759,
0.670593,
0.683551,
0.696633,
0.709839,
0.723169,
0.736623,
0.750202,
0.763904,
0.777730,
0.791680,
0.805754,
0.819952,
0.834274,
0.848720,
0.863290,
0.877984,
0.892802,
0.907744,
0.922810,
0.938000,
0.953314,
0.968752,
0.984314,
1.000000,
1.000000
0.000000f,
0.000062f,
0.000248f,
0.000558f,
0.000992f,
0.001550f,
0.002232f,
0.003038f,
0.003968f,
0.005022f,
0.006200f,
0.007502f,
0.008928f,
0.010478f,
0.012152f,
0.013950f,
0.015872f,
0.017918f,
0.020088f,
0.022382f,
0.024800f,
0.027342f,
0.030008f,
0.032798f,
0.035712f,
0.038750f,
0.041912f,
0.045198f,
0.048608f,
0.052142f,
0.055800f,
0.059582f,
0.063488f,
0.067518f,
0.071672f,
0.075950f,
0.080352f,
0.084878f,
0.089528f,
0.094302f,
0.099200f,
0.104222f,
0.109368f,
0.114638f,
0.120032f,
0.125550f,
0.131192f,
0.136958f,
0.142848f,
0.148862f,
0.155000f,
0.161262f,
0.167648f,
0.174158f,
0.180792f,
0.187550f,
0.194432f,
0.201438f,
0.208568f,
0.215822f,
0.223200f,
0.230702f,
0.238328f,
0.246078f,
0.253953f,
0.261951f,
0.270073f,
0.278319f,
0.286689f,
0.295183f,
0.303801f,
0.312543f,
0.321409f,
0.330399f,
0.339513f,
0.348751f,
0.358113f,
0.367599f,
0.377209f,
0.386943f,
0.396801f,
0.406783f,
0.416889f,
0.427119f,
0.437473f,
0.447951f,
0.458553f,
0.469279f,
0.480129f,
0.491103f,
0.502201f,
0.513423f,
0.524769f,
0.536239f,
0.547833f,
0.559551f,
0.571393f,
0.583359f,
0.595449f,
0.607663f,
0.620001f,
0.632463f,
0.645049f,
0.657759f,
0.670593f,
0.683551f,
0.696633f,
0.709839f,
0.723169f,
0.736623f,
0.750202f,
0.763904f,
0.777730f,
0.791680f,
0.805754f,
0.819952f,
0.834274f,
0.848720f,
0.863290f,
0.877984f,
0.892802f,
0.907744f,
0.922810f,
0.938000f,
0.953314f,
0.968752f,
0.984314f,
1.000000f,
1.000000f
};
float LookupVolume(float vol)