diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-03-05 20:32:44 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-03-05 20:32:44 +0000 |
commit | 03b22522651de83a45494a2745f05b7a19ecb3d7 (patch) | |
tree | cba211d87226e907aaf73b509246c310b4741920 /muse2/muse/songfile.cpp | |
parent | 1f615170b3519ca56951fbdd7cd86ef5f35817cc (diff) |
tweaks here and tweaks there
Diffstat (limited to 'muse2/muse/songfile.cpp')
-rw-r--r-- | muse2/muse/songfile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/muse2/muse/songfile.cpp b/muse2/muse/songfile.cpp index 973bcc57..1e8a849b 100644 --- a/muse2/muse/songfile.cpp +++ b/muse2/muse/songfile.cpp @@ -9,6 +9,7 @@ #include <assert.h> #include <uuid/uuid.h> #include <QProgressDialog> +#include <QMessageBox> #include "app.h" #include "song.h" @@ -1246,6 +1247,11 @@ void Song::read(Xml& xml) _len = xml.parseInt(); else if (tag == "follow") _follow = FollowMode(xml.parseInt()); + else if (tag == "sampleRate") { + int sRate = xml.parseInt(); + if (sRate != sampleRate) + QMessageBox::warning(muse,"Wrong sample rate", "The sample rate in this project and the current system setting differs, the project may not work as intended!"); + } else if (tag == "tempolist") { tempomap.read(xml); } @@ -1436,6 +1442,7 @@ void Song::write(int level, Xml& xml) const xml.intTag(level, "quantize", _quantize); xml.intTag(level, "len", _len); xml.intTag(level, "follow", _follow); + xml.intTag(level, "sampleRate", sampleRate); if (_globalPitchShift) xml.intTag(level, "globalPitchShift", _globalPitchShift); |