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