important bug fix in handling GUI messages; destructive tracks now operational (lots of GUI stuff to fix for them)
git-svn-id: svn://localhost/trunk/ardour2@302 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4e2d99fd21
commit
9ca089d20d
@ -33,12 +33,9 @@
|
||||
#include <ardour/panner.h>
|
||||
#include <ardour/utils.h>
|
||||
|
||||
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace std;
|
||||
//using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
|
||||
AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
|
||||
@ -56,7 +53,10 @@ AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode
|
||||
|
||||
if (mode == Destructive) {
|
||||
dflags = DiskStream::Flag (dflags | DiskStream::Destructive);
|
||||
}
|
||||
cerr << "Creating a new audio track, destructive mode\n";
|
||||
} else {
|
||||
cerr << "Creating a new audio track, NOT destructive mode\n";
|
||||
}
|
||||
|
||||
DiskStream* ds = new DiskStream (_session, name, dflags);
|
||||
|
||||
|
@ -1062,7 +1062,9 @@ DiskStream::seek (jack_nframes_t frame, bool complete_refill)
|
||||
(*chan).capture_buf->reset ();
|
||||
if (destructive()) {
|
||||
DestructiveFileSource* dfs = dynamic_cast<DestructiveFileSource*> ((*chan).write_source);
|
||||
dfs->seek (frame);
|
||||
if (dfs) {
|
||||
dfs->seek (frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2007,7 +2009,20 @@ DiskStream::reset_write_sources (bool mark_write_complete, bool force)
|
||||
}
|
||||
|
||||
if (!force && destructive()) {
|
||||
return;
|
||||
|
||||
/* make sure we always have enough sources for the current channel count */
|
||||
|
||||
for (chan = channels.begin(), n = 0; chan != channels.end(); ++chan, ++n) {
|
||||
if ((*chan).write_source == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (chan == channels.end()) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* some channels do not have a write source */
|
||||
}
|
||||
|
||||
capturing_sources.clear ();
|
||||
|
@ -522,6 +522,7 @@ UI::do_request (Request* req)
|
||||
case ErrorMessage:
|
||||
process_error_message (req->chn, req->msg);
|
||||
free (const_cast<char*>(req->msg)); /* it was strdup'ed */
|
||||
req->msg = 0; /* don't free it again in the destructor */
|
||||
break;
|
||||
|
||||
case Quit:
|
||||
@ -594,7 +595,7 @@ UI::send_request (Request *req)
|
||||
abort ();
|
||||
}
|
||||
|
||||
// cerr << "thread " << pthread_self() << " sent request " << req << " type = " << req->type << endl;
|
||||
cerr << "thread " << pthread_self() << " sent request " << req << " type = " << req->type << endl;
|
||||
rbuf->increment_write_ptr (1);
|
||||
write (signal_pipe[1], &c, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user