mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
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
3 changed files with 23 additions and 7 deletions
|
|
@ -33,12 +33,9 @@
|
||||||
#include <ardour/panner.h>
|
#include <ardour/panner.h>
|
||||||
#include <ardour/utils.h>
|
#include <ardour/utils.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
//using namespace sigc;
|
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
|
AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode mode)
|
||||||
|
|
@ -56,6 +53,9 @@ AudioTrack::AudioTrack (Session& sess, string name, Route::Flag flag, TrackMode
|
||||||
|
|
||||||
if (mode == Destructive) {
|
if (mode == Destructive) {
|
||||||
dflags = DiskStream::Flag (dflags | DiskStream::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);
|
DiskStream* ds = new DiskStream (_session, name, dflags);
|
||||||
|
|
|
||||||
|
|
@ -1062,9 +1062,11 @@ DiskStream::seek (jack_nframes_t frame, bool complete_refill)
|
||||||
(*chan).capture_buf->reset ();
|
(*chan).capture_buf->reset ();
|
||||||
if (destructive()) {
|
if (destructive()) {
|
||||||
DestructiveFileSource* dfs = dynamic_cast<DestructiveFileSource*> ((*chan).write_source);
|
DestructiveFileSource* dfs = dynamic_cast<DestructiveFileSource*> ((*chan).write_source);
|
||||||
|
if (dfs) {
|
||||||
dfs->seek (frame);
|
dfs->seek (frame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
playback_sample = frame;
|
playback_sample = frame;
|
||||||
file_frame = frame;
|
file_frame = frame;
|
||||||
|
|
@ -2007,9 +2009,22 @@ DiskStream::reset_write_sources (bool mark_write_complete, bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!force && destructive()) {
|
if (!force && destructive()) {
|
||||||
|
|
||||||
|
/* 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* some channels do not have a write source */
|
||||||
|
}
|
||||||
|
|
||||||
capturing_sources.clear ();
|
capturing_sources.clear ();
|
||||||
|
|
||||||
for (chan = channels.begin(), n = 0; chan != channels.end(); ++chan, ++n) {
|
for (chan = channels.begin(), n = 0; chan != channels.end(); ++chan, ++n) {
|
||||||
|
|
|
||||||
|
|
@ -522,6 +522,7 @@ UI::do_request (Request* req)
|
||||||
case ErrorMessage:
|
case ErrorMessage:
|
||||||
process_error_message (req->chn, req->msg);
|
process_error_message (req->chn, req->msg);
|
||||||
free (const_cast<char*>(req->msg)); /* it was strdup'ed */
|
free (const_cast<char*>(req->msg)); /* it was strdup'ed */
|
||||||
|
req->msg = 0; /* don't free it again in the destructor */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Quit:
|
case Quit:
|
||||||
|
|
@ -594,7 +595,7 @@ UI::send_request (Request *req)
|
||||||
abort ();
|
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);
|
rbuf->increment_write_ptr (1);
|
||||||
write (signal_pipe[1], &c, 1);
|
write (signal_pipe[1], &c, 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue