mirror of https://github.com/AxioDL/amuse.git
Update fmtlib
This commit is contained in:
parent
40efdcc38c
commit
5112228abd
|
@ -39,9 +39,9 @@ struct AudioGroupDataCollection {
|
|||
uint32_t absOffs;
|
||||
uint32_t active;
|
||||
MetaData(amuse::DataFormat fmtIn, uint32_t absOffsIn, uint32_t activeIn)
|
||||
: fmt(fmtIn), absOffs(absOffsIn), active(activeIn) {}
|
||||
: FMT_STRING(fmtIn), absOffs(absOffsIn), active(activeIn) {}
|
||||
MetaData(athena::io::FileReader& r)
|
||||
: fmt(amuse::DataFormat(r.readUint32Little())), absOffs(r.readUint32Little()), active(r.readUint32Little()) {}
|
||||
: FMT_STRING(amuse::DataFormat(r.readUint32Little())), absOffs(r.readUint32Little()), active(r.readUint32Little()) {}
|
||||
};
|
||||
std::optional<MetaData> m_metaData;
|
||||
|
||||
|
|
|
@ -167,6 +167,7 @@ bool AudioGroupCollection::doSearch(std::string_view str)
|
|||
m_filterGroups.clear();
|
||||
m_filterGroups.reserve(m_groups.size());
|
||||
for (auto it = m_groups.begin() ; it != m_groups.end() ; ++it)
|
||||
// TODO: Heterogeneous lookup when C++20 available
|
||||
if (str.empty() || StrToLower(it->first).find(str.data()) != std::string::npos)
|
||||
{
|
||||
m_filterGroups.push_back(it);
|
||||
|
|
|
@ -198,7 +198,7 @@ MainWindow::MainWindow(QWidget* parent)
|
|||
MainWindow::~MainWindow() {
|
||||
m_backgroundThread.quit();
|
||||
m_backgroundThread.wait();
|
||||
fmt::print(fmt("IM DYING\n"));
|
||||
fmt::print(FMT_STRING("IM DYING\n"));
|
||||
}
|
||||
|
||||
void MainWindow::connectMessenger(UIMessenger* messenger, Qt::ConnectionType type) {
|
||||
|
|
|
@ -655,7 +655,7 @@ void ProjectModel::saveSongsIndex() {
|
|||
QFileInfo songsFile(m_dir, QStringLiteral("!songs.yaml"));
|
||||
athena::io::YAMLDocWriter dw("amuse::Songs");
|
||||
for (auto& p : amuse::SortUnorderedMap(m_midiFiles))
|
||||
dw.writeString(fmt::format(fmt("{}"), p.first), p.second.get().m_path.toUtf8().data());
|
||||
dw.writeString(fmt::format(FMT_STRING("{}"), p.first), p.second.get().m_path.toUtf8().data());
|
||||
athena::io::FileWriter w(QStringToSysString(songsFile.filePath()));
|
||||
if (!w.hasError())
|
||||
dw.finish(&w);
|
||||
|
@ -2102,6 +2102,7 @@ void ProjectModel::deallocateSongId(amuse::SongId oldId) {
|
|||
amuse::SongId ProjectModel::exchangeSongId(amuse::SongId oldId, std::string_view newName) {
|
||||
m_projectDatabase.setIdDatabases();
|
||||
amuse::SongId newId;
|
||||
// TODO: Heterogeneous lookup when C++20 available
|
||||
auto search = amuse::SongId::CurNameDB->m_stringToId.find(newName.data());
|
||||
if (search == amuse::SongId::CurNameDB->m_stringToId.cend()) {
|
||||
newId = amuse::SongId::CurNameDB->generateId(amuse::NameDB::Type::Song);
|
||||
|
|
|
@ -875,6 +875,7 @@ bool SetupListModel::setData(const QModelIndex& index, const QVariant& value, in
|
|||
g_MainWindow->projectModel()->setIdDatabases(m_node.get());
|
||||
auto utf8key = value.toString().toUtf8();
|
||||
std::unordered_map<std::string, amuse::ObjectId>::iterator idIt;
|
||||
// TODO: Heterogeneous lookup when C++20 available
|
||||
if ((idIt = amuse::SongId::CurNameDB->m_stringToId.find(utf8key.data())) !=
|
||||
amuse::SongId::CurNameDB->m_stringToId.cend()) {
|
||||
if (idIt->second == entry->first)
|
||||
|
|
|
@ -272,6 +272,7 @@ bool SFXModel::setData(const QModelIndex& index, const QVariant& value, int role
|
|||
g_MainWindow->projectModel()->setIdDatabases(m_node.get());
|
||||
auto utf8key = value.toString().toUtf8();
|
||||
std::unordered_map<std::string, amuse::ObjectId>::iterator idIt;
|
||||
// TODO: Heterogeneous lookup when C++20 available
|
||||
if ((idIt = amuse::SFXId::CurNameDB->m_stringToId.find(utf8key.data())) !=
|
||||
amuse::SFXId::CurNameDB->m_stringToId.cend()) {
|
||||
if (idIt->second == entry->first)
|
||||
|
|
|
@ -427,23 +427,23 @@
|
|||
<context>
|
||||
<name>MIDIPlayerWidget</name>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1330"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1331"/>
|
||||
<source>Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1334"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1335"/>
|
||||
<source>Bad Song Data</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1334"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1335"/>
|
||||
<source>Unable to load song data at %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1344"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1375"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1345"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1376"/>
|
||||
<source>Play</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1202,12 +1202,12 @@
|
|||
<context>
|
||||
<name>PageTableView</name>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1181"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1182"/>
|
||||
<source>Delete Page Entries</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1181"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1182"/>
|
||||
<source>Delete Page Entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1594,57 +1594,57 @@
|
|||
<context>
|
||||
<name>SFXModel</name>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="279"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="280"/>
|
||||
<source>SFX Conflict</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="280"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="281"/>
|
||||
<source>SFX %1 is already defined in project</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="286"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="287"/>
|
||||
<source>Change SFX Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="319"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="320"/>
|
||||
<source>Change %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="330"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="331"/>
|
||||
<source>SFX</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="332"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="333"/>
|
||||
<source>Object</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="334"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="335"/>
|
||||
<source>Priority</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="336"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="337"/>
|
||||
<source>Max Voices</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="338"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="339"/>
|
||||
<source>Velocity</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="340"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="341"/>
|
||||
<source>Panning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="342"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="343"/>
|
||||
<source>Key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1660,13 +1660,13 @@
|
|||
<context>
|
||||
<name>SFXPlayerWidget</name>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="520"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="521"/>
|
||||
<source>Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="531"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="560"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="532"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="561"/>
|
||||
<source>Play</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1674,12 +1674,12 @@
|
|||
<context>
|
||||
<name>SFXTableView</name>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="478"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="479"/>
|
||||
<source>Delete SFX Entries</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="478"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="479"/>
|
||||
<source>Delete SFX Entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1763,27 +1763,27 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="882"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="883"/>
|
||||
<source>Song Conflict</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="883"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="884"/>
|
||||
<source>Song %1 is already defined in project</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="889"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="890"/>
|
||||
<source>Change Song Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="903"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="904"/>
|
||||
<source>Song</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="905"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="906"/>
|
||||
<source>MIDI File</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1791,32 +1791,32 @@
|
|||
<context>
|
||||
<name>SetupModel</name>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1124"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1125"/>
|
||||
<source>Change %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1137"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1138"/>
|
||||
<source>Program</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1139"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1140"/>
|
||||
<source>Volume</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1141"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1142"/>
|
||||
<source>Panning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1143"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1144"/>
|
||||
<source>Reverb</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1145"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1146"/>
|
||||
<source>Chorus</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1824,12 +1824,12 @@
|
|||
<context>
|
||||
<name>SetupTableView</name>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1241"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1242"/>
|
||||
<source>Delete Setup Entries</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1241"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1242"/>
|
||||
<source>Delete Setup Entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1837,37 +1837,37 @@
|
|||
<context>
|
||||
<name>SongGroupEditor</name>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1438"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1439"/>
|
||||
<source>Add Page Entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1448"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1449"/>
|
||||
<source>Add Setup Entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1572"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1573"/>
|
||||
<source>Normal Pages</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1573"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1574"/>
|
||||
<source>Drum Pages</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1574"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1575"/>
|
||||
<source>MIDI Setups</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1603"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1604"/>
|
||||
<source>Add new page entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SongGroupEditor.cpp" line="1605"/>
|
||||
<location filename="../SongGroupEditor.cpp" line="1606"/>
|
||||
<source>Remove selected page entries</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -1875,17 +1875,17 @@
|
|||
<context>
|
||||
<name>SoundGroupEditor</name>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="592"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="593"/>
|
||||
<source>Add SFX Entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="638"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="639"/>
|
||||
<source>Add new SFX entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../SoundGroupEditor.cpp" line="640"/>
|
||||
<location filename="../SoundGroupEditor.cpp" line="641"/>
|
||||
<source>Remove selected SFX entries</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
|
@ -29,9 +29,9 @@ struct AudioGroupDataCollection {
|
|||
uint32_t absOffs;
|
||||
uint32_t active;
|
||||
MetaData(amuse::DataFormat fmtIn, uint32_t absOffsIn, uint32_t activeIn)
|
||||
: fmt(fmtIn), absOffs(absOffsIn), active(activeIn) {}
|
||||
: FMT_STRING(fmtIn), absOffs(absOffsIn), active(activeIn) {}
|
||||
MetaData(athena::io::FileReader& r)
|
||||
: fmt(amuse::DataFormat(r.readUint32Little())), absOffs(r.readUint32Little()), active(r.readUint32Little()) {}
|
||||
: FMT_STRING(amuse::DataFormat(r.readUint32Little())), absOffs(r.readUint32Little()), active(r.readUint32Little()) {}
|
||||
};
|
||||
std::optional<MetaData> m_metaData;
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@ enum ConvType { ConvN64, ConvGCN, ConvPC };
|
|||
static void ReportConvType(ConvType tp) {
|
||||
switch (tp) {
|
||||
case ConvN64:
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("using N64 format")));
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("using N64 format")));
|
||||
break;
|
||||
case ConvPC:
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("using PC format")));
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("using PC format")));
|
||||
break;
|
||||
case ConvGCN:
|
||||
default:
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("using GameCube format")));
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("using GameCube format")));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -31,13 +31,13 @@ static bool ExtractAudioGroup(amuse::SystemStringView inPath, amuse::SystemStrin
|
|||
auto groups = amuse::ContainerRegistry::LoadContainer(inPath.data(), type);
|
||||
|
||||
if (groups.size()) {
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("Found '{}'")), amuse::ContainerRegistry::TypeToName(type));
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Found '{}'")), amuse::ContainerRegistry::TypeToName(type));
|
||||
|
||||
amuse::Mkdir(targetPath.data(), 0755);
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("Established directory at {}")), targetPath);
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Established directory at {}")), targetPath);
|
||||
|
||||
for (auto& group : groups) {
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("Extracting {}")), group.first);
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Extracting {}")), group.first);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ static bool ExtractAudioGroup(amuse::SystemStringView inPath, amuse::SystemStrin
|
|||
amuse::SystemString songPath = songsDir + _SYS_STR('/') + pair.first + _SYS_STR(".mid");
|
||||
FILE* fp = amuse::FOpen(songPath.c_str(), _SYS_STR("wb"));
|
||||
if (fp) {
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("Extracting {}")), pair.first);
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Extracting {}")), pair.first);
|
||||
int extractedVersion;
|
||||
bool isBig;
|
||||
std::vector<uint8_t> mid = amuse::SongConverter::SongToMIDI(pair.second.m_data.get(), extractedVersion, isBig);
|
||||
|
@ -123,7 +123,7 @@ int main(int argc, const amuse::SystemChar** argv)
|
|||
logvisor::RegisterConsoleLogger();
|
||||
|
||||
if (argc < 3) {
|
||||
fmt::print(fmt("Usage: amuseconv <in-file> <out-file> [n64|pc|gcn]\n"));
|
||||
fmt::print(FMT_STRING("Usage: amuseconv <in-file> <out-file> [n64|pc|gcn]\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ int main(int argc, const amuse::SystemChar** argv)
|
|||
else if (!amuse::CompareCaseInsensitive(argv[3], _SYS_STR("pc")))
|
||||
type = ConvPC;
|
||||
else {
|
||||
Log.report(logvisor::Error, fmt(_SYS_STR("unrecognized format: {}")), argv[3]);
|
||||
Log.report(logvisor::Error, FMT_STRING(_SYS_STR("unrecognized format: {}")), argv[3]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ int main(int argc, const amuse::SystemChar** argv)
|
|||
}
|
||||
|
||||
if (!good) {
|
||||
Log.report(logvisor::Error, fmt(_SYS_STR("unable to convert {} to {}")), argv[1], argv[2]);
|
||||
Log.report(logvisor::Error, FMT_STRING(_SYS_STR("unable to convert {} to {}")), argv[1], argv[2]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
voxCount = m_seq->getVoiceCount();
|
||||
program = m_seq->getChanProgram(m_chanId);
|
||||
}
|
||||
fmt::print(fmt(
|
||||
fmt::print(FMT_STRING(
|
||||
"\r "
|
||||
"\r {} Setup {}, Chan {}, Prog {}, Octave: {}, Vel: {}, VOL: {}%\r"),
|
||||
voxCount, m_setupId, m_chanId, program, m_octave, m_velocity, int(std::rint(m_volume * 100)));
|
||||
|
@ -107,7 +107,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
}
|
||||
|
||||
void SongLoop(const amuse::SongGroupIndex& index) {
|
||||
fmt::print(fmt(
|
||||
fmt::print(FMT_STRING(
|
||||
"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░\n"
|
||||
"░░░ ████ ████ ┃ ████ ████ ████ ┃ ████ ████ ░░░\n"
|
||||
"░░░ ████ ████ ┃ ████ ████ ████ ┃ ████ ████ ░░░\n"
|
||||
|
@ -206,7 +206,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
"\r %c SFX %d, VOL: %d%% POS: (%f,%f)\r",
|
||||
playing ? '>' : ' ', m_sfxId, int(std::rint(m_volume * 100)), m_pos[0], m_pos[1]);
|
||||
#else
|
||||
fmt::print(fmt(
|
||||
fmt::print(FMT_STRING(
|
||||
"\r "
|
||||
"\r {:c} SFX {}, VOL: {}%\r"),
|
||||
playing ? '>' : ' ', m_sfxId, int(std::rint(m_volume * 100)));
|
||||
|
@ -234,7 +234,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
}
|
||||
|
||||
void SFXLoop(const amuse::SFXGroupIndex& index) {
|
||||
fmt::print(fmt("<space>: keyon/keyoff, <left/right>: cycle SFX, <up/down>: volume, <Q>: quit\n"));
|
||||
fmt::print(FMT_STRING("<space>: keyon/keyoff, <left/right>: cycle SFX, <up/down>: volume, <Q>: quit\n"));
|
||||
|
||||
m_seq = m_engine->seqPlay(m_groupId, 0, nullptr);
|
||||
|
||||
|
@ -578,21 +578,21 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
|
||||
/* Load data */
|
||||
if (m_argc < 2) {
|
||||
Log.report(logvisor::Error, fmt("needs group path argument"));
|
||||
Log.report(logvisor::Error, FMT_STRING("needs group path argument"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
amuse::ContainerRegistry::Type cType = amuse::ContainerRegistry::DetectContainerType(m_argv[1]);
|
||||
if (cType == amuse::ContainerRegistry::Type::Invalid) {
|
||||
Log.report(logvisor::Error, fmt("invalid/no data at path argument"));
|
||||
Log.report(logvisor::Error, FMT_STRING("invalid/no data at path argument"));
|
||||
return 1;
|
||||
}
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("Found '%s' Audio Group data")), amuse::ContainerRegistry::TypeToName(cType));
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Found '%s' Audio Group data")), amuse::ContainerRegistry::TypeToName(cType));
|
||||
|
||||
std::vector<std::pair<amuse::SystemString, amuse::IntrusiveAudioGroupData>> data =
|
||||
amuse::ContainerRegistry::LoadContainer(m_argv[1]);
|
||||
if (data.empty()) {
|
||||
Log.report(logvisor::Error, fmt("invalid/no data at path argument"));
|
||||
Log.report(logvisor::Error, FMT_STRING("invalid/no data at path argument"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -635,7 +635,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
bool prompt = true;
|
||||
while (true) {
|
||||
if (prompt) {
|
||||
fmt::print(fmt("Play Song? (Y/N): "));
|
||||
fmt::print(FMT_STRING("Play Song? (Y/N): "));
|
||||
prompt = false;
|
||||
}
|
||||
char userSel;
|
||||
|
@ -656,7 +656,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
/* Get song selection from user */
|
||||
if (songs.size() > 1) {
|
||||
/* Ask user to specify which song */
|
||||
fmt::print(fmt("Multiple Songs discovered:\n"));
|
||||
fmt::print(FMT_STRING("Multiple Songs discovered:\n"));
|
||||
int idx = 0;
|
||||
for (const auto& pair : songs) {
|
||||
const amuse::ContainerRegistry::SongData& sngData = pair.second;
|
||||
|
@ -674,13 +674,13 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
break;
|
||||
}
|
||||
}
|
||||
fmt::print(fmt(_SYS_STR(" {} {} (Group {}, Setup {})\n")), idx++, pair.first, grpId, setupId);
|
||||
fmt::print(FMT_STRING(_SYS_STR(" {} {} (Group {}, Setup {})\n")), idx++, pair.first, grpId, setupId);
|
||||
}
|
||||
|
||||
int userSel = 0;
|
||||
fmt::print(fmt("Enter Song Number: "));
|
||||
fmt::print(FMT_STRING("Enter Song Number: "));
|
||||
if (scanf("%d", &userSel) <= 0) {
|
||||
Log.report(logvisor::Error, fmt("unable to parse prompt"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to parse prompt"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -689,7 +689,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
m_groupId = m_arrData->m_groupId;
|
||||
m_setupId = m_arrData->m_setupId;
|
||||
} else {
|
||||
Log.report(logvisor::Error, fmt("unable to find Song {}"), userSel);
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to find Song {}"), userSel);
|
||||
return 1;
|
||||
}
|
||||
} else if (songs.size() == 1) {
|
||||
|
@ -721,26 +721,26 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
else if (allSFXGroups.find(m_groupId) != allSFXGroups.end())
|
||||
m_sfxGroup = true;
|
||||
else {
|
||||
Log.report(logvisor::Error, fmt("unable to find Group {}"), m_groupId);
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to find Group {}"), m_groupId);
|
||||
return 1;
|
||||
}
|
||||
} else if (totalGroups > 1) {
|
||||
/* Ask user to specify which group in project */
|
||||
fmt::print(fmt("Multiple Audio Groups discovered:\n"));
|
||||
fmt::print(FMT_STRING("Multiple Audio Groups discovered:\n"));
|
||||
for (const auto& pair : allSFXGroups) {
|
||||
fmt::print(fmt(_SYS_STR(" {} {} (SFXGroup) {} sfx-entries\n")), pair.first,
|
||||
fmt::print(FMT_STRING(_SYS_STR(" {} {} (SFXGroup) {} sfx-entries\n")), pair.first,
|
||||
pair.second.first->first, pair.second.second->m_sfxEntries.size());
|
||||
}
|
||||
for (const auto& pair : allSongGroups) {
|
||||
fmt::print(fmt(_SYS_STR(" {} {} (SongGroup) {} normal-pages, {} drum-pages, {} MIDI-setups\n")),
|
||||
fmt::print(FMT_STRING(_SYS_STR(" {} {} (SongGroup) {} normal-pages, {} drum-pages, {} MIDI-setups\n")),
|
||||
pair.first, pair.second.first->first, pair.second.second->m_normPages.size(),
|
||||
pair.second.second->m_drumPages.size(), pair.second.second->m_midiSetups.size());
|
||||
}
|
||||
|
||||
int userSel = 0;
|
||||
fmt::print(fmt("Enter Group Number: "));
|
||||
fmt::print(FMT_STRING("Enter Group Number: "));
|
||||
if (scanf("%d", &userSel) <= 0) {
|
||||
Log.report(logvisor::Error, fmt("unable to parse prompt"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to parse prompt"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -751,7 +751,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
m_groupId = userSel;
|
||||
m_sfxGroup = true;
|
||||
} else {
|
||||
Log.report(logvisor::Error, fmt("unable to find Group {}"), userSel);
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to find Group {}"), userSel);
|
||||
return 1;
|
||||
}
|
||||
} else if (totalGroups == 1) {
|
||||
|
@ -766,7 +766,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
m_sfxGroup = true;
|
||||
}
|
||||
} else {
|
||||
Log.report(logvisor::Error, fmt("empty project"));
|
||||
Log.report(logvisor::Error, FMT_STRING("empty project"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
}
|
||||
|
||||
if (!selData) {
|
||||
Log.report(logvisor::Error, fmt("unable to select audio group data"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to select audio group data"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -799,7 +799,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
/* Load group into engine */
|
||||
const amuse::AudioGroup* group = m_engine->addAudioGroup(*selData);
|
||||
if (!group) {
|
||||
Log.report(logvisor::Error, fmt("unable to add audio group"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to add audio group"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -813,7 +813,7 @@ struct AppCallback : boo::IApplicationCallback {
|
|||
m_seq.reset();
|
||||
m_engine.reset();
|
||||
m_booBackend.reset();
|
||||
fmt::print(fmt("\n\n"));
|
||||
fmt::print(FMT_STRING("\n\n"));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -909,7 +909,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
AppCallback app(argc, argv);
|
||||
int ret = boo::ApplicationRun(boo::IApplication::EPlatformType::Auto, app, _SYS_STR("amuseplay"),
|
||||
_SYS_STR("Amuse Player"), argc, argv, {}, 1, 1, false);
|
||||
fmt::print(fmt("IM DYING!!\n"));
|
||||
fmt::print(FMT_STRING("IM DYING!!\n"));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,22 +136,22 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
/* Load data */
|
||||
if (m_args.size() < 1) {
|
||||
Log.report(logvisor::Error,
|
||||
fmt("Usage: amuserender <group-file> [<songs-file>] [-r <sample-rate>] [-c <channel-count>] [-v <volume "
|
||||
FMT_STRING("Usage: amuserender <group-file> [<songs-file>] [-r <sample-rate>] [-c <channel-count>] [-v <volume "
|
||||
"0.0-1.0>]"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
amuse::ContainerRegistry::Type cType = amuse::ContainerRegistry::DetectContainerType(m_args[0].c_str());
|
||||
if (cType == amuse::ContainerRegistry::Type::Invalid) {
|
||||
Log.report(logvisor::Error, fmt("invalid/no data at path argument"));
|
||||
Log.report(logvisor::Error, FMT_STRING("invalid/no data at path argument"));
|
||||
return 1;
|
||||
}
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("Found '{}' Audio Group data")), amuse::ContainerRegistry::TypeToName(cType));
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Found '{}' Audio Group data")), amuse::ContainerRegistry::TypeToName(cType));
|
||||
|
||||
std::vector<std::pair<amuse::SystemString, amuse::IntrusiveAudioGroupData>> data =
|
||||
amuse::ContainerRegistry::LoadContainer(m_args[0].c_str());
|
||||
if (data.empty()) {
|
||||
Log.report(logvisor::Error, fmt("invalid/no data at path argument"));
|
||||
Log.report(logvisor::Error, FMT_STRING("invalid/no data at path argument"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
bool prompt = true;
|
||||
while (true) {
|
||||
if (prompt) {
|
||||
fmt::print(fmt("Render Song? (Y/N): "));
|
||||
fmt::print(FMT_STRING("Render Song? (Y/N): "));
|
||||
prompt = false;
|
||||
}
|
||||
char userSel;
|
||||
|
@ -218,7 +218,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
/* Get song selection from user */
|
||||
if (songs.size() > 1) {
|
||||
/* Ask user to specify which song */
|
||||
fmt::print(fmt("Multiple Songs discovered:\n"));
|
||||
fmt::print(FMT_STRING("Multiple Songs discovered:\n"));
|
||||
int idx = 0;
|
||||
for (const auto& pair : songs) {
|
||||
const amuse::ContainerRegistry::SongData& sngData = pair.second;
|
||||
|
@ -236,13 +236,13 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
break;
|
||||
}
|
||||
}
|
||||
fmt::print(fmt(_SYS_STR(" {} {} (Group {}, Setup {})\n")), idx++, pair.first, grpId, setupId);
|
||||
fmt::print(FMT_STRING(_SYS_STR(" {} {} (Group {}, Setup {})\n")), idx++, pair.first, grpId, setupId);
|
||||
}
|
||||
|
||||
int userSel = 0;
|
||||
fmt::print(fmt("Enter Song Number: "));
|
||||
fmt::print(FMT_STRING("Enter Song Number: "));
|
||||
if (scanf("%d", &userSel) <= 0) {
|
||||
Log.report(logvisor::Error, fmt("unable to parse prompt"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to parse prompt"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
m_setupId = m_arrData->m_setupId;
|
||||
m_songName = &songs[userSel].first;
|
||||
} else {
|
||||
Log.report(logvisor::Error, fmt("unable to find Song {}"), userSel);
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to find Song {}"), userSel);
|
||||
return 1;
|
||||
}
|
||||
} else if (songs.size() == 1) {
|
||||
|
@ -290,26 +290,26 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
m_sfxGroup = true;
|
||||
m_groupName = &sfxSearch->second.first->first;
|
||||
} else {
|
||||
Log.report(logvisor::Error, fmt("unable to find Group {}"), m_groupId);
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to find Group {}"), m_groupId);
|
||||
return 1;
|
||||
}
|
||||
} else if (totalGroups > 1) {
|
||||
/* Ask user to specify which group in project */
|
||||
fmt::print(fmt("Multiple Audio Groups discovered:\n"));
|
||||
fmt::print(FMT_STRING("Multiple Audio Groups discovered:\n"));
|
||||
for (const auto& pair : allSFXGroups) {
|
||||
fmt::print(fmt(_SYS_STR(" {} {} (SFXGroup) {} sfx-entries\n")), pair.first,
|
||||
fmt::print(FMT_STRING(_SYS_STR(" {} {} (SFXGroup) {} sfx-entries\n")), pair.first,
|
||||
pair.second.first->first, pair.second.second->m_sfxEntries.size());
|
||||
}
|
||||
for (const auto& pair : allSongGroups) {
|
||||
fmt::print(fmt(_SYS_STR(" {} {} (SongGroup) {} normal-pages, {} drum-pages, {} MIDI-setups\n")),
|
||||
fmt::print(FMT_STRING(_SYS_STR(" {} {} (SongGroup) {} normal-pages, {} drum-pages, {} MIDI-setups\n")),
|
||||
pair.first, pair.second.first->first, pair.second.second->m_normPages.size(),
|
||||
pair.second.second->m_drumPages.size(), pair.second.second->m_midiSetups.size());
|
||||
}
|
||||
|
||||
int userSel = 0;
|
||||
fmt::print(fmt("Enter Group Number: "));
|
||||
fmt::print(FMT_STRING("Enter Group Number: "));
|
||||
if (scanf("%d", &userSel) <= 0) {
|
||||
Log.report(logvisor::Error, fmt("unable to parse prompt"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to parse prompt"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
m_groupName = &sfxSearch->second.first->first;
|
||||
m_sfxGroup = true;
|
||||
} else {
|
||||
Log.report(logvisor::Error, fmt("unable to find Group {}"), userSel);
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to find Group {}"), userSel);
|
||||
return 1;
|
||||
}
|
||||
} else if (totalGroups == 1) {
|
||||
|
@ -341,7 +341,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
m_sfxGroup = true;
|
||||
}
|
||||
} else {
|
||||
Log.report(logvisor::Error, fmt("empty project"));
|
||||
Log.report(logvisor::Error, FMT_STRING("empty project"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -358,19 +358,19 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
sortSetups.insert(pair.first);
|
||||
if (m_setupId == -1) {
|
||||
/* Ask user to specify which group in project */
|
||||
fmt::print(fmt("Multiple MIDI Setups:\n"));
|
||||
fmt::print(FMT_STRING("Multiple MIDI Setups:\n"));
|
||||
for (auto setup : sortSetups)
|
||||
fmt::print(fmt(" {}\n"), setup);
|
||||
fmt::print(FMT_STRING(" {}\n"), setup);
|
||||
int userSel = 0;
|
||||
fmt::print(fmt("Enter Setup Number: "));
|
||||
fmt::print(FMT_STRING("Enter Setup Number: "));
|
||||
if (scanf("%d", &userSel) <= 0) {
|
||||
Log.report(logvisor::Error, fmt("unable to parse prompt"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to parse prompt"));
|
||||
return 1;
|
||||
}
|
||||
m_setupId = userSel;
|
||||
}
|
||||
if (sortSetups.find(m_setupId) == sortSetups.cend()) {
|
||||
Log.report(logvisor::Error, fmt("unable to find setup {}"), m_setupId);
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to find setup {}"), m_setupId);
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -382,18 +382,18 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
}
|
||||
|
||||
if (!selData) {
|
||||
Log.report(logvisor::Error, fmt("unable to select audio group data"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to select audio group data"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (m_sfxGroup) {
|
||||
Log.report(logvisor::Error, fmt("amuserender is currently only able to render SongGroups"));
|
||||
Log.report(logvisor::Error, FMT_STRING("amuserender is currently only able to render SongGroups"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* WAV out path */
|
||||
amuse::SystemString pathOut = fmt::format(fmt(_SYS_STR("{}-{}.wav")), *m_groupName, *m_songName);
|
||||
Log.report(logvisor::Info, fmt(_SYS_STR("Writing to {}")), pathOut);
|
||||
amuse::SystemString pathOut = fmt::format(FMT_STRING(_SYS_STR("{}-{}.wav")), *m_groupName, *m_songName);
|
||||
Log.report(logvisor::Info, FMT_STRING(_SYS_STR("Writing to {}")), pathOut);
|
||||
|
||||
/* Build voice engine */
|
||||
std::unique_ptr<boo::IAudioVoiceEngine> voxEngine = boo::NewWAVAudioVoiceEngine(pathOut.c_str(), rate, chCount);
|
||||
|
@ -404,7 +404,7 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
/* Load group into engine */
|
||||
const amuse::AudioGroup* group = engine.addAudioGroup(*selData);
|
||||
if (!group) {
|
||||
Log.report(logvisor::Error, fmt("unable to add audio group"));
|
||||
Log.report(logvisor::Error, FMT_STRING("unable to add audio group"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -415,11 +415,11 @@ int main(int argc, const boo::SystemChar** argv)
|
|||
do {
|
||||
voxEngine->pumpAndMixVoices();
|
||||
wroteFrames += voxEngine->get5MsFrames();
|
||||
fmt::print(fmt("\rFrame {}"), wroteFrames);
|
||||
fmt::print(FMT_STRING("\rFrame {}"), wroteFrames);
|
||||
fflush(stdout);
|
||||
} while (!g_BreakLoop && (seq->state() == amuse::SequencerState::Playing || seq->getVoiceCount() != 0));
|
||||
|
||||
fmt::print(fmt("\n"));
|
||||
fmt::print(FMT_STRING("\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void AudioGroupDatabase::_recursiveRenameMacro(SoundMacroId id, std::string_view
|
|||
if (!strncmp(SoundMacroId::CurNameDB->resolveNameFromId(id).data(), "macro", 5)) {
|
||||
std::string macroName("macro"sv);
|
||||
if (macroIdx)
|
||||
macroName += fmt::format(fmt("{}"), macroIdx);
|
||||
macroName += fmt::format(FMT_STRING("{}"), macroIdx);
|
||||
macroName += '_';
|
||||
macroName += str;
|
||||
++macroIdx;
|
||||
|
@ -134,7 +134,7 @@ void AudioGroupDatabase::_recursiveRenameMacro(SoundMacroId id, std::string_view
|
|||
if (!strncmp(SampleId::CurNameDB->resolveNameFromId(ss->sample.id).data(), "sample", 6)) {
|
||||
std::string sampleName("sample"sv);
|
||||
if (sampleIdx)
|
||||
sampleName += fmt::format(fmt("{}"), sampleIdx);
|
||||
sampleName += fmt::format(FMT_STRING("{}"), sampleIdx);
|
||||
sampleName += '_';
|
||||
sampleName += macroName;
|
||||
++sampleIdx;
|
||||
|
@ -237,7 +237,7 @@ void AudioGroupDatabase::importCHeader(std::string_view header) {
|
|||
}
|
||||
|
||||
static void WriteDefineLine(std::stringstream& ret, std::string_view typeStr, std::string_view name, ObjectId id) {
|
||||
fmt::print(ret, fmt("#define {}{} 0x{}\n"), typeStr, name, id);
|
||||
fmt::print(ret, FMT_STRING("#define {}{} 0x{}\n"), typeStr, name, id);
|
||||
}
|
||||
|
||||
std::string AudioGroupDatabase::exportCHeader(std::string_view projectName, std::string_view groupName) const {
|
||||
|
|
|
@ -323,7 +323,7 @@ int SoundMacro::assertPC(int pc) const {
|
|||
if (pc < 0)
|
||||
return -1;
|
||||
if (size_t(pc) >= m_cmds.size()) {
|
||||
fmt::print(stderr, fmt("SoundMacro PC bounds exceeded [{}/{}]\n"), pc, int(m_cmds.size()));
|
||||
fmt::print(stderr, FMT_STRING("SoundMacro PC bounds exceeded [{}/{}]\n"), pc, int(m_cmds.size()));
|
||||
abort();
|
||||
}
|
||||
return pc;
|
||||
|
@ -1107,17 +1107,17 @@ template std::vector<uint8_t> AudioGroupPool::toData<athena::Endian::Little>() c
|
|||
|
||||
template <>
|
||||
void amuse::Curve::Enumerate<LittleDNA::Read>(athena::io::IStreamReader& r) {
|
||||
Log.report(logvisor::Fatal, fmt("Curve binary DNA read not supported"));
|
||||
Log.report(logvisor::Fatal, FMT_STRING("Curve binary DNA read not supported"));
|
||||
}
|
||||
|
||||
template <>
|
||||
void amuse::Curve::Enumerate<LittleDNA::Write>(athena::io::IStreamWriter& w) {
|
||||
Log.report(logvisor::Fatal, fmt("Curve binary DNA write not supported"));
|
||||
Log.report(logvisor::Fatal, FMT_STRING("Curve binary DNA write not supported"));
|
||||
}
|
||||
|
||||
template <>
|
||||
void amuse::Curve::Enumerate<LittleDNA::BinarySize>(size_t& sz) {
|
||||
Log.report(logvisor::Fatal, fmt("Curve binary DNA size not supported"));
|
||||
Log.report(logvisor::Fatal, FMT_STRING("Curve binary DNA size not supported"));
|
||||
}
|
||||
|
||||
template <>
|
||||
|
|
|
@ -433,7 +433,7 @@ static ObjectId RegisterDedupedName(ObjectId origId, amuse::NameDB* db, NameDB::
|
|||
std::string useName = dupeName;
|
||||
int dupeIdx = 1;
|
||||
while (db->m_stringToId.find(useName) != db->m_stringToId.cend())
|
||||
useName = fmt::format(fmt("{}{}"), dupeName, dupeIdx++);
|
||||
useName = fmt::format(FMT_STRING("{}{}"), dupeName, dupeIdx++);
|
||||
ObjectId ret = db->generateId(tp);
|
||||
db->registerPair(useName, ret);
|
||||
return ret;
|
||||
|
@ -632,7 +632,7 @@ void SongGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
|
|||
if (!m_normPages.empty()) {
|
||||
if (auto __v2 = w.enterSubRecord("normPages")) {
|
||||
for (const auto& pg : SortUnorderedMap(m_normPages)) {
|
||||
if (auto __r2 = w.enterSubRecord(fmt::format(fmt("{}"), pg.first))) {
|
||||
if (auto __r2 = w.enterSubRecord(fmt::format(FMT_STRING("{}"), pg.first))) {
|
||||
w.setStyle(athena::io::YAMLNodeStyle::Flow);
|
||||
pg.second.get().write(w);
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ void SongGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
|
|||
if (!m_drumPages.empty()) {
|
||||
if (auto __v2 = w.enterSubRecord("drumPages")) {
|
||||
for (const auto& pg : SortUnorderedMap(m_drumPages)) {
|
||||
if (auto __r2 = w.enterSubRecord(fmt::format(fmt("{}"), pg.first))) {
|
||||
if (auto __r2 = w.enterSubRecord(fmt::format(FMT_STRING("{}"), pg.first))) {
|
||||
w.setStyle(athena::io::YAMLNodeStyle::Flow);
|
||||
pg.second.get().write(w);
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ void SongGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
|
|||
if (!m_midiSetups.empty()) {
|
||||
if (auto __v2 = w.enterSubRecord("songs")) {
|
||||
for (const auto& song : SortUnorderedMap(m_midiSetups)) {
|
||||
std::string songString = fmt::format(fmt("{}/0x{}"),
|
||||
std::string songString = fmt::format(FMT_STRING("{}/0x{}"),
|
||||
SongId::CurNameDB->resolveNameFromId(song.first), song.first);
|
||||
if (auto __v3 = w.enterSubVector(songString))
|
||||
for (int i = 0; i < 16; ++i)
|
||||
|
@ -667,7 +667,7 @@ void SongGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
|
|||
|
||||
void SFXGroupIndex::toYAML(athena::io::YAMLDocWriter& w) const {
|
||||
for (const auto& sfx : SortUnorderedMap(m_sfxEntries)) {
|
||||
std::string sfxString = fmt::format(fmt("{}/0x{}"),
|
||||
std::string sfxString = fmt::format(FMT_STRING("{}/0x{}"),
|
||||
SFXId::CurNameDB->resolveNameFromId(sfx.first), sfx.first);
|
||||
if (auto __r2 = w.enterSubRecord(sfxString)) {
|
||||
w.setStyle(athena::io::YAMLNodeStyle::Flow);
|
||||
|
@ -682,7 +682,7 @@ std::vector<uint8_t> AudioGroupProject::toYAML() const {
|
|||
if (!m_songGroups.empty()) {
|
||||
if (auto __v = w.enterSubRecord("songGroups")) {
|
||||
for (const auto& p : SortUnorderedMap(m_songGroups)) {
|
||||
std::string groupString = fmt::format(fmt("{}/0x{}"),
|
||||
std::string groupString = fmt::format(FMT_STRING("{}/0x{}"),
|
||||
GroupId::CurNameDB->resolveNameFromId(p.first), p.first);
|
||||
if (auto __r = w.enterSubRecord(groupString)) {
|
||||
p.second.get()->toYAML(w);
|
||||
|
@ -694,7 +694,7 @@ std::vector<uint8_t> AudioGroupProject::toYAML() const {
|
|||
if (!m_sfxGroups.empty()) {
|
||||
if (auto __v = w.enterSubRecord("sfxGroups")) {
|
||||
for (const auto& p : SortUnorderedMap(m_sfxGroups)) {
|
||||
std::string groupString = fmt::format(fmt("{}/0x{}"),
|
||||
std::string groupString = fmt::format(FMT_STRING("{}/0x{}"),
|
||||
GroupId::CurNameDB->resolveNameFromId(p.first), p.first);
|
||||
if (auto __r = w.enterSubRecord(groupString)) {
|
||||
p.second.get()->toYAML(w);
|
||||
|
|
|
@ -101,7 +101,7 @@ bool Copy(const SystemChar* from, const SystemChar* to) {
|
|||
void type##DNA<DNAE>::_read(athena::io::YAMLDocReader& r) { \
|
||||
std::string name = r.readString(); \
|
||||
if (!type::CurNameDB) \
|
||||
Log.report(logvisor::Fatal, fmt("Unable to resolve " typeName " name {}, no database present"), name); \
|
||||
Log.report(logvisor::Fatal, FMT_STRING("Unable to resolve " typeName " name {}, no database present"), name); \
|
||||
if (name.empty()) { \
|
||||
id.id = 0xffff; \
|
||||
return; \
|
||||
|
@ -111,7 +111,7 @@ bool Copy(const SystemChar* from, const SystemChar* to) {
|
|||
template <athena::Endian DNAE> \
|
||||
void type##DNA<DNAE>::_write(athena::io::YAMLDocWriter& w) { \
|
||||
if (!type::CurNameDB) \
|
||||
Log.report(logvisor::Fatal, fmt("Unable to resolve " typeName " ID {}, no database present"), id); \
|
||||
Log.report(logvisor::Fatal, FMT_STRING("Unable to resolve " typeName " ID {}, no database present"), id); \
|
||||
if (id.id == 0xffff) \
|
||||
return; \
|
||||
std::string_view name = type::CurNameDB->resolveNameFromId(id); \
|
||||
|
@ -189,7 +189,7 @@ template <athena::Endian DNAE>
|
|||
void PageObjectIdDNA<DNAE>::_read(athena::io::YAMLDocReader& r) {
|
||||
std::string name = r.readString();
|
||||
if (!KeymapId::CurNameDB || !LayersId::CurNameDB)
|
||||
Log.report(logvisor::Fatal, fmt("Unable to resolve keymap or layers name {}, no database present"), name);
|
||||
Log.report(logvisor::Fatal, FMT_STRING("Unable to resolve keymap or layers name {}, no database present"), name);
|
||||
if (name.empty()) {
|
||||
id.id = 0xffff;
|
||||
return;
|
||||
|
@ -200,7 +200,7 @@ void PageObjectIdDNA<DNAE>::_read(athena::io::YAMLDocReader& r) {
|
|||
if (search == LayersId::CurNameDB->m_stringToId.cend()) {
|
||||
search = SoundMacroId::CurNameDB->m_stringToId.find(name);
|
||||
if (search == SoundMacroId::CurNameDB->m_stringToId.cend()) {
|
||||
Log.report(logvisor::Error, fmt("Unable to resolve name {}"), name);
|
||||
Log.report(logvisor::Error, FMT_STRING("Unable to resolve name {}"), name);
|
||||
id.id = 0xffff;
|
||||
return;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ void PageObjectIdDNA<DNAE>::_read(athena::io::YAMLDocReader& r) {
|
|||
template <athena::Endian DNAE>
|
||||
void PageObjectIdDNA<DNAE>::_write(athena::io::YAMLDocWriter& w) {
|
||||
if (!KeymapId::CurNameDB || !LayersId::CurNameDB)
|
||||
Log.report(logvisor::Fatal, fmt("Unable to resolve keymap or layers ID {}, no database present"), id);
|
||||
Log.report(logvisor::Fatal, FMT_STRING("Unable to resolve keymap or layers ID {}, no database present"), id);
|
||||
if (id.id == 0xffff)
|
||||
return;
|
||||
if (id.id & 0x8000) {
|
||||
|
@ -307,23 +307,23 @@ ObjectId NameDB::generateId(Type tp) const {
|
|||
std::string NameDB::generateName(ObjectId id, Type tp) {
|
||||
switch (tp) {
|
||||
case Type::SoundMacro:
|
||||
return fmt::format(fmt("macro{}"), id);
|
||||
return fmt::format(FMT_STRING("macro{}"), id);
|
||||
case Type::Table:
|
||||
return fmt::format(fmt("table{}"), id);
|
||||
return fmt::format(FMT_STRING("table{}"), id);
|
||||
case Type::Keymap:
|
||||
return fmt::format(fmt("keymap{}"), id);
|
||||
return fmt::format(FMT_STRING("keymap{}"), id);
|
||||
case Type::Layer:
|
||||
return fmt::format(fmt("layers{}"), id);
|
||||
return fmt::format(FMT_STRING("layers{}"), id);
|
||||
case Type::Song:
|
||||
return fmt::format(fmt("song{}"), id);
|
||||
return fmt::format(FMT_STRING("song{}"), id);
|
||||
case Type::SFX:
|
||||
return fmt::format(fmt("sfx{}"), id);
|
||||
return fmt::format(FMT_STRING("sfx{}"), id);
|
||||
case Type::Group:
|
||||
return fmt::format(fmt("group{}"), id);
|
||||
return fmt::format(FMT_STRING("group{}"), id);
|
||||
case Type::Sample:
|
||||
return fmt::format(fmt("sample{}"), id);
|
||||
return fmt::format(FMT_STRING("sample{}"), id);
|
||||
default:
|
||||
return fmt::format(fmt("obj{}"), id);
|
||||
return fmt::format(FMT_STRING("obj{}"), id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,7 +338,7 @@ std::string_view NameDB::registerPair(std::string_view str, ObjectId id) {
|
|||
std::string_view NameDB::resolveNameFromId(ObjectId id) const {
|
||||
auto search = m_idToString.find(id);
|
||||
if (search == m_idToString.cend()) {
|
||||
Log.report(logvisor::Error, fmt("Unable to resolve ID {}"), id);
|
||||
Log.report(logvisor::Error, FMT_STRING("Unable to resolve ID {}"), id);
|
||||
return ""sv;
|
||||
}
|
||||
return search->second;
|
||||
|
@ -347,7 +347,7 @@ std::string_view NameDB::resolveNameFromId(ObjectId id) const {
|
|||
ObjectId NameDB::resolveIdFromName(std::string_view str) const {
|
||||
auto search = m_stringToId.find(std::string(str));
|
||||
if (search == m_stringToId.cend()) {
|
||||
Log.report(logvisor::Error, fmt("Unable to resolve name {}"), str);
|
||||
Log.report(logvisor::Error, FMT_STRING("Unable to resolve name {}"), str);
|
||||
return {};
|
||||
}
|
||||
return search->second;
|
||||
|
|
|
@ -428,7 +428,7 @@ static std::vector<std::pair<SystemString, ContainerRegistry::SongData>> LoadMP1
|
|||
ret.emplace_back(std::move(search->second),
|
||||
ContainerRegistry::SongData(std::move(song), sonLength, groupId, midiSetup));
|
||||
else {
|
||||
SystemString name = fmt::format(fmt(_SYS_STR("{:08X}")), id);
|
||||
SystemString name = fmt::format(FMT_STRING(_SYS_STR("{:08X}")), id);
|
||||
ret.emplace_back(std::move(name), ContainerRegistry::SongData(std::move(song), sonLength, groupId, midiSetup));
|
||||
}
|
||||
|
||||
|
@ -1347,7 +1347,7 @@ static std::vector<std::pair<SystemString, IntrusiveAudioGroupData>> LoadRS2(FIL
|
|||
memmove(samp.get(), audData.get() + head.sampOff, head.sampLen);
|
||||
|
||||
if (head.projLen && head.poolLen && head.sdirLen && head.sampLen) {
|
||||
SystemString name = fmt::format(fmt(_SYS_STR("GroupFile{:02d}")), j);
|
||||
SystemString name = fmt::format(FMT_STRING(_SYS_STR("GroupFile{:02d}")), j);
|
||||
ret.emplace_back(std::move(name),
|
||||
IntrusiveAudioGroupData{proj.release(), head.projLen, pool.release(), head.poolLen,
|
||||
sdir.release(), head.sdirLen, samp.release(), head.sampLen,
|
||||
|
@ -1403,7 +1403,7 @@ static std::vector<std::pair<SystemString, ContainerRegistry::SongData>> LoadRS2
|
|||
RS23SONHead sonHead = sonData[s];
|
||||
sonHead.swapBig();
|
||||
|
||||
SystemString name = fmt::format(fmt(_SYS_STR("GroupFile{:02d}-{}")), j, s);
|
||||
SystemString name = fmt::format(FMT_STRING(_SYS_STR("GroupFile{:02d}-{}")), j, s);
|
||||
std::unique_ptr<uint8_t[]> song(new uint8_t[sonHead.length]);
|
||||
memmove(song.get(), audData.get() + sonHead.offset, sonHead.length);
|
||||
ret.emplace_back(std::move(name),
|
||||
|
@ -1506,7 +1506,7 @@ static std::vector<std::pair<SystemString, IntrusiveAudioGroupData>> LoadRS3(FIL
|
|||
memmove(samp.get(), audData.get() + head.sampOff, head.sampLen);
|
||||
|
||||
if (head.projLen && head.poolLen && head.sdirLen && head.sampLen) {
|
||||
SystemString name = fmt::format(fmt(_SYS_STR("GroupFile{:02d}")), j);
|
||||
SystemString name = fmt::format(FMT_STRING(_SYS_STR("GroupFile{:02d}")), j);
|
||||
ret.emplace_back(std::move(name),
|
||||
IntrusiveAudioGroupData{proj.release(), head.projLen, pool.release(), head.poolLen,
|
||||
sdir.release(), head.sdirLen, samp.release(), head.sampLen,
|
||||
|
@ -1569,7 +1569,7 @@ static std::vector<std::pair<SystemString, ContainerRegistry::SongData>> LoadSta
|
|||
if (len == 0)
|
||||
break;
|
||||
|
||||
SystemString name = fmt::format(fmt(_SYS_STR("Song{}")), unsigned(i));
|
||||
SystemString name = fmt::format(FMT_STRING(_SYS_STR("Song{}")), unsigned(i));
|
||||
std::unique_ptr<uint8_t[]> song(new uint8_t[len]);
|
||||
memmove(song.get(), data.get() + cur, len);
|
||||
ret.emplace_back(std::move(name), ContainerRegistry::SongData(std::move(song), len, -1, i));
|
||||
|
@ -1651,10 +1651,10 @@ ContainerRegistry::Type ContainerRegistry::DetectContainerType(const SystemChar*
|
|||
SystemString newpath;
|
||||
|
||||
/* Project */
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.pro")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.pro")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.proj")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.proj")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return Type::Invalid;
|
||||
|
@ -1662,10 +1662,10 @@ ContainerRegistry::Type ContainerRegistry::DetectContainerType(const SystemChar*
|
|||
fclose(fp);
|
||||
|
||||
/* Pool */
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.poo")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.poo")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.pool")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.pool")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return Type::Invalid;
|
||||
|
@ -1673,10 +1673,10 @@ ContainerRegistry::Type ContainerRegistry::DetectContainerType(const SystemChar*
|
|||
fclose(fp);
|
||||
|
||||
/* Sample Directory */
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.sdi")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.sdi")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.sdir")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.sdir")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return Type::Invalid;
|
||||
|
@ -1684,10 +1684,10 @@ ContainerRegistry::Type ContainerRegistry::DetectContainerType(const SystemChar*
|
|||
fclose(fp);
|
||||
|
||||
/* Sample */
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.sam")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.sam")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
newpath = fmt::format(fmt(_SYS_STR("{:.{}}.samp")), path, int(dot - path));
|
||||
newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.samp")), path, int(dot - path));
|
||||
fp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return Type::Invalid;
|
||||
|
@ -1764,10 +1764,10 @@ std::vector<std::pair<SystemString, IntrusiveAudioGroupData>> ContainerRegistry:
|
|||
|
||||
/* Project */
|
||||
SystemString projPath;
|
||||
projPath = fmt::format(fmt(_SYS_STR("{:.{}}.pro")), path, int(dot - path));
|
||||
projPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.pro")), path, int(dot - path));
|
||||
fp = FOpen(projPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
projPath = fmt::format(fmt(_SYS_STR("{:.{}}.proj")), path, int(dot - path));
|
||||
projPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.proj")), path, int(dot - path));
|
||||
fp = FOpen(projPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return ret;
|
||||
|
@ -1776,10 +1776,10 @@ std::vector<std::pair<SystemString, IntrusiveAudioGroupData>> ContainerRegistry:
|
|||
|
||||
/* Pool */
|
||||
SystemString poolPath;
|
||||
poolPath = fmt::format(fmt(_SYS_STR("{:.{}}.poo")), path, int(dot - path));
|
||||
poolPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.poo")), path, int(dot - path));
|
||||
fp = FOpen(poolPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
poolPath = fmt::format(fmt(_SYS_STR("{:.{}}.pool")), path, int(dot - path));
|
||||
poolPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.pool")), path, int(dot - path));
|
||||
fp = FOpen(poolPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return ret;
|
||||
|
@ -1788,10 +1788,10 @@ std::vector<std::pair<SystemString, IntrusiveAudioGroupData>> ContainerRegistry:
|
|||
|
||||
/* Sample Directory */
|
||||
SystemString sdirPath;
|
||||
sdirPath = fmt::format(fmt(_SYS_STR("{:.{}}.sdi")), path, int(dot - path));
|
||||
sdirPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.sdi")), path, int(dot - path));
|
||||
fp = FOpen(sdirPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
sdirPath = fmt::format(fmt(_SYS_STR("{:.{}}.sdir")), path, int(dot - path));
|
||||
sdirPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.sdir")), path, int(dot - path));
|
||||
fp = FOpen(sdirPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return ret;
|
||||
|
@ -1800,10 +1800,10 @@ std::vector<std::pair<SystemString, IntrusiveAudioGroupData>> ContainerRegistry:
|
|||
|
||||
/* Sample */
|
||||
SystemString sampPath;
|
||||
sampPath = fmt::format(fmt(_SYS_STR("{:.{}}.sam")), path, int(dot - path));
|
||||
sampPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.sam")), path, int(dot - path));
|
||||
fp = FOpen(sampPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp) {
|
||||
sampPath = fmt::format(fmt(_SYS_STR("{:.{}}.samp")), path, int(dot - path));
|
||||
sampPath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.samp")), path, int(dot - path));
|
||||
fp = FOpen(sampPath.c_str(), _SYS_STR("rb"));
|
||||
if (!fp)
|
||||
return ret;
|
||||
|
@ -1979,7 +1979,7 @@ std::vector<std::pair<SystemString, ContainerRegistry::SongData>> ContainerRegis
|
|||
if (ValidatePaperMarioTTYDSongs(fp)) {
|
||||
/* Song Description */
|
||||
dot = StrRChr(path, _SYS_STR('.'));
|
||||
SystemString newpath = fmt::format(fmt(_SYS_STR("{:.{}}.stbl")), path, int(dot - path));
|
||||
SystemString newpath = fmt::format(FMT_STRING(_SYS_STR("{:.{}}.stbl")), path, int(dot - path));
|
||||
FILE* descFp = FOpen(newpath.c_str(), _SYS_STR("rb"));
|
||||
if (descFp) {
|
||||
auto ret = LoadPaperMarioTTYDSongs(fp, descFp);
|
||||
|
|
|
@ -359,9 +359,9 @@ void Sequencer::setCtrlValue(uint8_t chan, uint8_t ctrl, int8_t val) {
|
|||
}
|
||||
|
||||
if (ctrl == 0x66) {
|
||||
fmt::print(fmt("Loop Start\n"));
|
||||
fmt::print(FMT_STRING("Loop Start\n"));
|
||||
} else if (ctrl == 0x67) {
|
||||
fmt::print(fmt("Loop End\n"));
|
||||
fmt::print(FMT_STRING("Loop End\n"));
|
||||
}
|
||||
|
||||
if (!m_chanStates[chan]) {
|
||||
|
|
Loading…
Reference in New Issue