You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto data = QDspx::MidiConverter::convertIntermediateToMidi(intermediateData);
92
+
QSaveFile file(path);
93
+
if (!file.open(QIODevice::WriteOnly)) {
94
+
qCCritical(lcMIDIFileExporter) << "Failed to write file:" << path << file.errorString();
95
+
SVS::MessageBox::critical(Core::RuntimeInterface::qmlEngine(), window, tr("Failed to save file"), QStringLiteral("%1\n\n%2").arg(QDir::toNativeSeparators(path), file.errorString()));
96
+
returnfalse;
97
+
}
98
+
file.write(data);
99
+
if (!file.commit()) {
100
+
qCCritical(lcMIDIFileExporter) << "Failed to commit file:" << path << file.errorString();
101
+
SVS::MessageBox::critical(Core::RuntimeInterface::qmlEngine(), window, tr("Failed to save file"), QStringLiteral("%1\n\n%2").arg(QDir::toNativeSeparators(path), file.errorString()));
qCCritical(lcMIDIFileImporter) << "Failed to read file:" << path << file.errorString();
55
+
SVS::MessageBox::critical(Core::RuntimeInterface::qmlEngine(), window, tr("Failed to open file"), QStringLiteral("%1\n\n%2").arg(QDir::toNativeSeparators(path), file.errorString()));
56
+
returnfalse;
57
+
}
58
+
auto data = file.readAll();
59
+
QDspx::MidiConverter::Error error;
60
+
auto intermediateData = QDspx::MidiConverter::convertMidiToIntermediate(data, error);
61
+
if (error == QDspx::MidiConverter::Error::InvalidMidiData) {
qCCritical(lcMIDIFileImporter) << "Failed to convert MIDI data:" << path;
104
+
SVS::MessageBox::critical(Core::RuntimeInterface::qmlEngine(), window, tr("Failed to convert MIDI data"), tr("Some meta events in this MIDI document cannot be converted to DSPX. Please try disabling import tempo/time signature."));
0 commit comments