diff options
author | Tim E. Real <termtech@rogers.com> | 2013-02-25 05:30:11 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2013-02-25 05:30:11 +0000 |
commit | ee6fb96475c7bd70bb54da9ccae17c56330c8e6f (patch) | |
tree | 7ffb4f8d26e392d61153c2766cc6a86e60040e63 | |
parent | 402d761f25837310da17061b56182aa3e1f4b4b9 (diff) |
Disable "adjust wave offset" in Wave Editor until fixed.
-rw-r--r-- | muse2/muse/event.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/waveedit/waveedit.cpp | 7 | ||||
-rw-r--r-- | muse2/muse/waveevent.cpp | 6 | ||||
-rw-r--r-- | muse2/muse/waveevent.h | 2 |
4 files changed, 11 insertions, 6 deletions
diff --git a/muse2/muse/event.cpp b/muse2/muse/event.cpp index 6ea1b852..1a2d3c6e 100644 --- a/muse2/muse/event.cpp +++ b/muse2/muse/event.cpp @@ -230,7 +230,7 @@ const QString Event::name() const { return ev->name(); } void Event::setName(const QString& s) { ev->setName(s); } int Event::spos() const { return ev->spos(); } void Event::setSpos(int s) { ev->setSpos(s); } -MusECore::SndFileR Event::sndFile() const { return ev->sndFile(); } +MusECore::SndFileR Event::sndFile() const { return ev->sndFile(); } void Event::setSndFile(MusECore::SndFileR& sf) { diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp index 03a4d045..a8477bbc 100644 --- a/muse2/muse/waveedit/waveedit.cpp +++ b/muse2/muse/waveedit/waveedit.cpp @@ -161,9 +161,10 @@ WaveEdit::WaveEdit(MusECore::PartList* pl, QWidget* parent, const char* name) menuEdit->addSeparator(); - adjustWaveOffsetAction = menuEdit->addAction(tr("Adjust wave offset...")); - mapper->setMapping(adjustWaveOffsetAction, WaveCanvas::CMD_ADJUST_WAVE_OFFSET); - connect(adjustWaveOffsetAction, SIGNAL(triggered()), mapper, SLOT(map())); +// REMOVE Tim. Also remove CMD_ADJUST_WAVE_OFFSET and so on... +// adjustWaveOffsetAction = menuEdit->addAction(tr("Adjust wave offset...")); +// mapper->setMapping(adjustWaveOffsetAction, WaveCanvas::CMD_ADJUST_WAVE_OFFSET); +// connect(adjustWaveOffsetAction, SIGNAL(triggered()), mapper, SLOT(map())); act = menuFunctions->addAction(tr("Mute Selection")); mapper->setMapping(act, WaveCanvas::CMD_MUTE); diff --git a/muse2/muse/waveevent.cpp b/muse2/muse/waveevent.cpp index ac984a02..38ae10c6 100644 --- a/muse2/muse/waveevent.cpp +++ b/muse2/muse/waveevent.cpp @@ -46,6 +46,7 @@ WaveEventBase::WaveEventBase(EventType t) : EventBase(t) { deleted = false; + _spos = 0; } //--------------------------------------------------------- @@ -448,7 +449,10 @@ void WaveEventBase::readAudio(WavePart* /*part*/, unsigned offset, float** buffe //sfCurFrame = f.seek(offset + _spos, 0); DELETETHIS 2 //sfCurFrame += f.read(channel, buffer, n, overwrite); - f.seek(offset + _spos, 0); + off_t e_off = offset + _spos; + if(e_off < 0) + e_off = 0; + f.seek(e_off, 0); f.read(channel, buffer, n, overwrite); return; diff --git a/muse2/muse/waveevent.h b/muse2/muse/waveevent.h index 2c1bf76d..e814fe3d 100644 --- a/muse2/muse/waveevent.h +++ b/muse2/muse/waveevent.h @@ -41,7 +41,7 @@ class WavePart; class WaveEventBase : public EventBase { QString _name; SndFileR f; - int _spos; // start sample position in WaveFile + int _spos; // start sample position in WaveFile bool deleted; virtual EventBase* clone(); |