diff options
Diffstat (limited to 'muse2/muse/song.cpp')
-rw-r--r-- | muse2/muse/song.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 999cfefd..4feda40f 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -1073,6 +1073,11 @@ void Song::clearTrackRec() //--------------------------------------------------------- void Song::setRecord(bool f, bool autoRecEnable) { + if (f && museProject == museProjectInitPath ) { // check that there is a project stored before commencing + // no project, we need to create one. + if (!muse->saveAs()) + return; // could not store project, won't enable record + } if (recordFlag != f) { if (f && autoRecEnable) { bool alreadyRecEnabled = false; @@ -1114,6 +1119,14 @@ void Song::setRecord(bool f, bool autoRecEnable) f = false; } } + // prepare recording of wave files for all record enabled wave tracks + for (iWaveTrack i = wtl->begin(); i != wtl->end(); ++i) { + if((*i)->recordFlag()) + { + (*i)->prepareRecording(); + } + } + #if 0 // check for midi devices suitable for recording bool portFound = false; @@ -1752,6 +1765,7 @@ void Song::setRecordFlag(Track* track, bool val) } // updateFlags |= SC_RECFLAG; update(SC_RECFLAG); + } //--------------------------------------------------------- |