mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Large nasty commit in the form of a 5000 line patch chock-full of completely
unecessary changes. (Sorry, doing a "sprint" based thing, this is the end of the first one) Achieved MIDI track and bus creation, associated Jack port and diskstream creation, and minimal GUI stuff for creating them. Should be set to start work on actually recording and playing midi to/from disk now. Relevant (significant) changes: - Creation of a Buffer class. Base class is type agnostic so things can point to a buffer but not care what kind it is (otherwise it'd be a template). Derived into AudioBuffer and MidiBuffer, with a type tag because checking type is necessary in parts of the code where dynamic_cast wouldn't be wise. Originally I considered this a hack, but passing around a type proved to be a very good solution to all the other problems (below). There is a 1:1 mapping between jack port data types and ardour Buffer types (with a conversion function), but that's easily removed if it ever becomes necessary. Having the type scoped in the Buffer class is maybe not the best spot for it, but whatever (this is proof of concept kinda stuff right now...) - IO now has a "default" port type (passed to the constructor and stored as a member), used by ensure_io (and similar) to create n ports. IO::register_***_port has a type argument that defaults to the default type if not passed. Rationale: previous IO API is identical, no changes needed to existing code, but path is paved for multiple port types in one IO, which we will need for eg synth plugin inserts, among other things. This is not quite ideal (best would be to only have the two port register functions and have them take a type), but the alternative is a lot of work (namely destroying the 'ensure' functions and everything that uses them) for very little gain. (I am convinced after quite a few tries at the whiteboard that subclassing IO in any way is not a feasible option, look at it's inheritance diagram in Doxygen and you can see why) - AudioEngine::register_audio_input_port is now register_input_port and takes a type argument. Ditto for output. - (Most significant change) AudioDiskstream abstracted into Distream, and sibling MidiDiskstream created. Very much still a work in progress, but Diskstream is there to switch references over to (most already are), which is the important part. It is still unclear what the MIDI diskstream's relation to channels is, but I'm pretty sure they will be single channel only (so SMF Type 0) since noone can come up with a reason otherwise. - MidiTrack creation. Same thing as AudioTrack but with a different default type basically. No big deal here. - Random cleanups and variable renamings etc. because I have OCD and can't help myself. :) Known broken: Loading of sessions containing MIDI tracks. git-svn-id: svn://localhost/ardour2/branches/midi@641 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
13532c8500
commit
fe13d08874
194 changed files with 2354 additions and 903 deletions
24
SConstruct
24
SConstruct
|
|
@ -8,6 +8,7 @@ import glob
|
|||
import errno
|
||||
import time
|
||||
import platform
|
||||
import string
|
||||
from sets import Set
|
||||
import SCons.Node.FS
|
||||
|
||||
|
|
@ -345,6 +346,21 @@ tarball_bld = Builder (action = tarballer,
|
|||
env.Append (BUILDERS = {'Distribute' : dist_bld})
|
||||
env.Append (BUILDERS = {'Tarball' : tarball_bld})
|
||||
|
||||
#
|
||||
# Make sure they know what they are doing
|
||||
#
|
||||
|
||||
if env['VST']:
|
||||
sys.stdout.write ("Are you building Ardour for personal use (rather than distributiont to others)? [no]: ")
|
||||
answer = sys.stdin.readline ()
|
||||
answer = answer.rstrip().strip()
|
||||
if answer != "yes" and answer != "y":
|
||||
print 'You cannot build Ardour with VST support for distribution to others.\nIt is a violation of several different licenses. VST support disabled.'
|
||||
env['VST'] = 0;
|
||||
else:
|
||||
print "OK, VST support will be enabled"
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Construction environment setup
|
||||
# ----------------------------------------------------------------------
|
||||
|
|
@ -650,6 +666,14 @@ else:
|
|||
|
||||
config_prefix = '$DESTDIR' + final_config_prefix
|
||||
|
||||
# For colorgcc ( so says the wiki, but it's still not working :/ anyone? )
|
||||
if os.environ.has_key('PATH'):
|
||||
env['PATH'] = os.environ['PATH']
|
||||
if os.environ.has_key('TERM'):
|
||||
env['TERM'] = os.environ['TERM']
|
||||
if os.environ.has_key('HOME'):
|
||||
env['HOME'] = os.environ['HOME']
|
||||
|
||||
|
||||
# SCons should really do this for us
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ gtkardour.Merge ([
|
|||
libraries['ardour'],
|
||||
libraries['ardour_cp'],
|
||||
libraries['gtkmm2ext'],
|
||||
# libraries['flowcanvas'],
|
||||
libraries['midi++2'],
|
||||
libraries['pbd3'],
|
||||
libraries['gtkmm2'],
|
||||
|
|
@ -62,6 +61,7 @@ skipped_files=Split("""
|
|||
connection_editor.cc
|
||||
""")
|
||||
|
||||
|
||||
gtkardour_files=Split("""
|
||||
about.cc
|
||||
actions.cc
|
||||
|
|
@ -181,6 +181,7 @@ visual_time_axis.cc
|
|||
waveview.cc
|
||||
""")
|
||||
|
||||
|
||||
fft_analysis_files=Split("""
|
||||
analysis_window.cc
|
||||
fft_graph.cc
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ using namespace Gdk;
|
|||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
#ifdef WITH_PAYMENT_OPTIONS
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ using namespace std;
|
|||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using namespace sigc;
|
||||
using namespace PBD;
|
||||
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::session_sensitive_actions;
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::region_list_selection_sensitive_actions;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ using namespace Gtk;
|
|||
using namespace Gtkmm2ext;
|
||||
using namespace sigc;
|
||||
using namespace std;
|
||||
using namespace PBD;
|
||||
|
||||
static const char* channel_setup_names[] = {
|
||||
"Mono",
|
||||
|
|
@ -44,6 +45,7 @@ static const char* channel_setup_names[] = {
|
|||
"6 Channels",
|
||||
"8 Channels",
|
||||
"Manual Setup",
|
||||
"MIDI",
|
||||
0
|
||||
};
|
||||
|
||||
|
|
@ -157,6 +159,13 @@ AddRouteDialog::track ()
|
|||
return track_button.get_active ();
|
||||
}
|
||||
|
||||
bool
|
||||
AddRouteDialog::midi ()
|
||||
{
|
||||
const string str = channel_combo.get_active_text();
|
||||
return (str == _("MIDI"));
|
||||
}
|
||||
|
||||
string
|
||||
AddRouteDialog::name_template ()
|
||||
{
|
||||
|
|
@ -192,7 +201,7 @@ AddRouteDialog::channels ()
|
|||
string str = channel_combo.get_active_text();
|
||||
int chns;
|
||||
|
||||
if (str == _("Mono")) {
|
||||
if (str == _("Mono") || str == _("MIDI")) {
|
||||
return 1;
|
||||
} else if (str == _("Stereo")) {
|
||||
return 2;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class AddRouteDialog : public Gtk::Dialog
|
|||
~AddRouteDialog ();
|
||||
|
||||
bool track ();
|
||||
bool midi ();
|
||||
std::string name_template ();
|
||||
int channels ();
|
||||
int count ();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <gtkmm/treeiter.h>
|
||||
|
||||
#include <ardour/audioregion.h>
|
||||
#include <ardour/playlist.h>
|
||||
#include <ardour/audioplaylist.h>
|
||||
#include <ardour/types.h>
|
||||
|
||||
#include "analysis_window.h"
|
||||
|
|
@ -40,6 +40,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
AnalysisWindow::AnalysisWindow()
|
||||
: ArdourDialog(_("analysis window")),
|
||||
|
|
@ -229,7 +230,12 @@ AnalysisWindow::analyze_data (Gtk::Button *button)
|
|||
|
||||
|
||||
for (TrackSelection::iterator i = s.tracks.begin(); i != s.tracks.end(); ++i) {
|
||||
ARDOUR::Playlist *pl = (*i)->playlist();
|
||||
ARDOUR::AudioPlaylist *pl
|
||||
= dynamic_cast<ARDOUR::AudioPlaylist*>((*i)->playlist());
|
||||
|
||||
if (!pl)
|
||||
continue;
|
||||
|
||||
RouteUI *rui = dynamic_cast<RouteUI *>(*i);
|
||||
|
||||
// Busses don't have playlists, so we need to check that we actually are working with a playlist
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
#include <ardour/session_diskstream.h>
|
||||
#include <ardour/port.h>
|
||||
#include <ardour/audio_track.h>
|
||||
#include <ardour/midi_track.h>
|
||||
|
||||
#include "actions.h"
|
||||
#include "ardour_ui.h"
|
||||
|
|
@ -76,6 +77,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
|
@ -867,11 +869,51 @@ ARDOUR_UI::open_session ()
|
|||
|
||||
|
||||
void
|
||||
ARDOUR_UI::session_add_midi_track ()
|
||||
ARDOUR_UI::session_add_midi_route (bool disk)
|
||||
{
|
||||
cerr << _("Patience is a virtue.\n");
|
||||
Route* route;
|
||||
|
||||
if (session == 0) {
|
||||
warning << _("You cannot add a track without a session already loaded.") << endmsg;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (disk) {
|
||||
if ((route = session->new_midi_track ()) == 0) {
|
||||
error << _("could not create new MIDI track") << endmsg;
|
||||
}
|
||||
} else {
|
||||
if ((route = session->new_midi_route ()) == 0) {
|
||||
error << _("could not create new MIDI bus") << endmsg;
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
#if CONTROLOUTS
|
||||
if (need_control_room_outs) {
|
||||
pan_t pans[2];
|
||||
|
||||
pans[0] = 0.5;
|
||||
pans[1] = 0.5;
|
||||
|
||||
route->set_stereo_control_outs (control_lr_channels);
|
||||
route->control_outs()->set_stereo_pan (pans, this);
|
||||
}
|
||||
#endif /* CONTROLOUTS */
|
||||
#endif
|
||||
}
|
||||
|
||||
catch (...) {
|
||||
MessageDialog msg (*editor,
|
||||
_("There are insufficient JACK ports available\n\
|
||||
to create a new track or bus.\n\
|
||||
You should save Ardour, exit and\n\
|
||||
restart JACK with more ports."));
|
||||
msg.run ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ARDOUR_UI::session_add_audio_route (bool disk, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode)
|
||||
{
|
||||
|
|
@ -917,7 +959,7 @@ restart JACK with more ports."));
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::diskstream_added (AudioDiskstream* ds)
|
||||
ARDOUR_UI::diskstream_added (Diskstream* ds)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -1164,12 +1206,15 @@ ARDOUR_UI::toggle_monitor_enable (guint32 dstream)
|
|||
return;
|
||||
}
|
||||
|
||||
AudioDiskstream *ds;
|
||||
Diskstream *ds;
|
||||
|
||||
if ((ds = session->diskstream_by_id (dstream)) != 0) {
|
||||
AudioDiskstream *ads = dynamic_cast<AudioDiskstream*>(ds);
|
||||
if (ads) {
|
||||
Port *port = ds->io()->input (0);
|
||||
port->request_monitor_input (!port->monitoring_input());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1179,7 +1224,7 @@ ARDOUR_UI::toggle_record_enable (guint32 dstream)
|
|||
return;
|
||||
}
|
||||
|
||||
AudioDiskstream *ds;
|
||||
Diskstream *ds;
|
||||
|
||||
if ((ds = session->diskstream_by_id (dstream)) != 0) {
|
||||
ds->set_record_enabled (!ds->record_enabled(), this);
|
||||
|
|
@ -2144,7 +2189,11 @@ ARDOUR_UI::add_route ()
|
|||
/* XXX do something with name template */
|
||||
|
||||
while (count) {
|
||||
if (track) {
|
||||
if (track && add_route_dialog->midi()) {
|
||||
session_add_midi_track();
|
||||
} else if (add_route_dialog->midi()) {
|
||||
session_add_midi_bus();
|
||||
} else if (track) {
|
||||
session_add_audio_track (input_chan, output_chan, add_route_dialog->mode());
|
||||
} else {
|
||||
session_add_audio_bus (input_chan, output_chan);
|
||||
|
|
|
|||
|
|
@ -199,7 +199,13 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal);
|
||||
}
|
||||
|
||||
void session_add_midi_track ();
|
||||
void session_add_midi_track () {
|
||||
session_add_midi_route (true);
|
||||
}
|
||||
|
||||
void session_add_midi_bus () {
|
||||
session_add_midi_route (false);
|
||||
}
|
||||
|
||||
void set_engine (ARDOUR::AudioEngine&);
|
||||
|
||||
|
|
@ -522,7 +528,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
sigc::connection point_one_second_connection;
|
||||
sigc::connection point_zero_one_second_connection;
|
||||
|
||||
void diskstream_added (ARDOUR::AudioDiskstream*);
|
||||
void diskstream_added (ARDOUR::Diskstream*);
|
||||
|
||||
gint session_menu (GdkEventButton *);
|
||||
|
||||
|
|
@ -538,6 +544,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
|
|||
|
||||
|
||||
void session_add_audio_route (bool disk, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode);
|
||||
void session_add_midi_route (bool disk);
|
||||
|
||||
void add_diskstream_to_menu (ARDOUR::AudioDiskstream&);
|
||||
void diskstream_selected (gint32);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
using namespace PBD;
|
||||
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Glib;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
|
|
@ -76,7 +77,7 @@ ARDOUR_UI::connect_to_session (Session *s)
|
|||
shuttle_box.set_sensitive (true);
|
||||
|
||||
if (session->n_audio_diskstreams() == 0) {
|
||||
session->AudioDiskstreamAdded.connect (mem_fun(*this, &ARDOUR_UI::diskstream_added));
|
||||
session->DiskstreamAdded.connect (mem_fun(*this, &ARDOUR_UI::diskstream_added));
|
||||
}
|
||||
|
||||
if (connection_editor) {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
|
|
@ -190,13 +191,17 @@ ARDOUR_UI::install_actions ()
|
|||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_toggle_action (common_actions, X_("ToggleBigClock"), _("Big Clock"), mem_fun(*this, &ARDOUR_UI::toggle_big_clock_window));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::register_action (common_actions, X_("About"), _("About"), mem_fun(*this, &ARDOUR_UI::show_splash));
|
||||
act = ActionManager::register_action (common_actions, X_("About"), _("About"), mem_fun(*this, &ARDOUR_UI::show_splash));
|
||||
act = ActionManager::register_toggle_action (common_actions, X_("ToggleColorManager"), _("Colors"), mem_fun(*this, &ARDOUR_UI::toggle_color_manager));
|
||||
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, X_("AddAudioTrack"), _("Add Audio Track"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_track), 1, 1, ARDOUR::Normal));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, X_("AddAudioBus"), _("Add Audio Bus"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_bus), 1, 1));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, X_("AddMIDITrack"), _("Add MIDI Track"), (mem_fun(*this, &ARDOUR_UI::session_add_midi_track)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, X_("AddMidiBus"), _("Add Midi Bus"), mem_fun(*this, &ARDOUR_UI::session_add_midi_bus));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, X_("Save"), _("Save"), bind (mem_fun(*this, &ARDOUR_UI::save_state), string("")));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
act = ActionManager::register_action (common_actions, X_("RemoveLastCapture"), _("Remove Last Capture"), mem_fun(*this, &ARDOUR_UI::remove_last_capture));
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "mixer_ui.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
int
|
||||
ARDOUR_UI::create_mixer ()
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
void
|
||||
ARDOUR_UI::setup_config_options ()
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ if [ gprofhelper.c -nt gprofhelper.so ] ; then
|
|||
fi
|
||||
|
||||
export LD_LIBRARY_PATH=../libs/ardour/.libs
|
||||
LDPRELOAD=./gprofhelper.so ./ardour $*
|
||||
LDPRELOAD=./gprofhelper.so ./ardev $*
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace LADSPA;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
|
@ -378,7 +379,7 @@ AudioTimeAxisView::playlist_changed ()
|
|||
label_view ();
|
||||
|
||||
if (is_audio_track()) {
|
||||
set_playlist (get_diskstream()->playlist());
|
||||
set_playlist (dynamic_cast<AudioPlaylist*>(get_diskstream()->playlist()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -825,7 +826,8 @@ AudioTimeAxisView::rename_current_playlist ()
|
|||
AudioPlaylist *pl;
|
||||
AudioDiskstream *ds;
|
||||
|
||||
if (((ds = get_diskstream()) == 0) || ds->destructive() || ((pl = ds->playlist()) == 0)) {
|
||||
if (((ds = get_diskstream()) == 0) || ds->destructive()
|
||||
|| ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -854,7 +856,8 @@ AudioTimeAxisView::use_copy_playlist (bool prompt)
|
|||
AudioDiskstream *ds;
|
||||
string name;
|
||||
|
||||
if (((ds = get_diskstream()) == 0) || ds->destructive() || ((pl = ds->playlist()) == 0)) {
|
||||
if (((ds = get_diskstream()) == 0) || ds->destructive()
|
||||
|| ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -882,7 +885,7 @@ AudioTimeAxisView::use_copy_playlist (bool prompt)
|
|||
|
||||
if (name.length()) {
|
||||
ds->use_copy_playlist ();
|
||||
pl = ds->playlist();
|
||||
pl = dynamic_cast<AudioPlaylist*>(ds->playlist());
|
||||
pl->set_name (name);
|
||||
}
|
||||
}
|
||||
|
|
@ -894,7 +897,8 @@ AudioTimeAxisView::use_new_playlist (bool prompt)
|
|||
AudioDiskstream *ds;
|
||||
string name;
|
||||
|
||||
if (((ds = get_diskstream()) == 0) || ds->destructive() || ((pl = ds->playlist()) == 0)) {
|
||||
if (((ds = get_diskstream()) == 0) || ds->destructive()
|
||||
|| ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -921,7 +925,7 @@ AudioTimeAxisView::use_new_playlist (bool prompt)
|
|||
|
||||
if (name.length()) {
|
||||
ds->use_new_playlist ();
|
||||
pl = ds->playlist();
|
||||
pl = dynamic_cast<AudioPlaylist*>(ds->playlist());
|
||||
pl->set_name (name);
|
||||
}
|
||||
}
|
||||
|
|
@ -933,7 +937,7 @@ AudioTimeAxisView::clear_playlist ()
|
|||
AudioDiskstream *ds;
|
||||
|
||||
if ((ds = get_diskstream()) != 0) {
|
||||
if ((pl = ds->playlist()) != 0) {
|
||||
if ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) != 0) {
|
||||
editor.clear_playlist (*pl);
|
||||
}
|
||||
}
|
||||
|
|
@ -991,7 +995,7 @@ AudioTimeAxisView::update_diskstream_display ()
|
|||
AudioDiskstream *ds;
|
||||
|
||||
if ((ds = get_diskstream()) != 0) {
|
||||
set_playlist (ds->playlist ());
|
||||
set_playlist (dynamic_cast<AudioPlaylist*> (ds->playlist ()));
|
||||
}
|
||||
|
||||
map_frozen ();
|
||||
|
|
@ -1143,7 +1147,7 @@ Region*
|
|||
AudioTimeAxisView::find_next_region (jack_nframes_t pos, RegionPoint point, int32_t dir)
|
||||
{
|
||||
AudioDiskstream *stream;
|
||||
AudioPlaylist *playlist;
|
||||
Playlist *playlist;
|
||||
|
||||
if ((stream = get_diskstream()) != 0 && (playlist = stream->playlist()) != 0) {
|
||||
return playlist->find_next_region (pos, point, dir);
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
AutomationGainLine::AutomationGainLine (const string & name, Session& s, TimeAxisView& tv, ArdourCanvas::Group& parent, Curve& c)
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
using namespace Gnome; // for Canvas
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <ardour/session.h>
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
AutomationPanLine::AutomationPanLine (const string & name, Session& s, TimeAxisView& tv, ArdourCanvas::Group& parent, Curve& c)
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace Gtk;
|
||||
using namespace PBD;
|
||||
|
||||
/* the global color map */
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
using namespace Editing;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
using namespace Gnome;
|
||||
using namespace Canvas;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
int
|
||||
curvetest (string filename)
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using namespace Gtkmm2ext;
|
||||
|
|
@ -3120,7 +3121,7 @@ Editor::mapped_set_selected_regionview_from_click (AudioTimeAxisView& atv, uint3
|
|||
}
|
||||
|
||||
|
||||
if ((pl = ds->playlist()) != 0) {
|
||||
if ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) != 0) {
|
||||
pl->get_equivalent_regions (basis->region, results);
|
||||
}
|
||||
|
||||
|
|
@ -3345,7 +3346,7 @@ Editor::set_selected_regionview_from_region_list (Region& r, Selection::Operatio
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((pl = ds->playlist()) != 0) {
|
||||
if ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) != 0) {
|
||||
pl->get_region_list_equivalent_regions (*region, results);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ namespace ARDOUR {
|
|||
class AudioDiskstream;
|
||||
class RouteGroup;
|
||||
class Playlist;
|
||||
class AudioPlaylist;
|
||||
class Region;
|
||||
class Location;
|
||||
class TempoSection;
|
||||
|
|
@ -1600,7 +1601,7 @@ class Editor : public PublicEditor
|
|||
void external_edit_region ();
|
||||
|
||||
int write_audio_selection (TimeSelection&);
|
||||
bool write_audio_range (ARDOUR::Playlist&, uint32_t channels, list<ARDOUR::AudioRange>&);
|
||||
bool write_audio_range (ARDOUR::AudioPlaylist&, uint32_t channels, list<ARDOUR::AudioRange>&);
|
||||
|
||||
void write_selection ();
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ using namespace Glib;
|
|||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "selection.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
void
|
||||
Editor::set_route_loop_selection ()
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using namespace Gtkmm2ext;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
bool
|
||||
|
|
@ -512,7 +513,9 @@ Editor::canvas_crossfade_view_event (GdkEvent* event, ArdourCanvas::Item* item,
|
|||
|
||||
if (atv->is_audio_track()) {
|
||||
|
||||
AudioPlaylist* pl = atv->get_diskstream()->playlist();
|
||||
AudioPlaylist* pl;
|
||||
if ((pl = dynamic_cast<AudioPlaylist*> (atv->get_diskstream()->playlist())) != 0) {
|
||||
|
||||
Playlist::RegionList* rl = pl->regions_at (event_frame (event));
|
||||
|
||||
if (!rl->empty()) {
|
||||
|
|
@ -529,6 +532,7 @@ Editor::canvas_crossfade_view_event (GdkEvent* event, ArdourCanvas::Item* item,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
Editor::Cursor::Cursor (Editor& ed, const string& color, bool (Editor::*callbck)(GdkEvent*,ArdourCanvas::Item*))
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
void
|
||||
|
|
@ -286,7 +287,7 @@ Editor::write_audio_selection (TimeSelection& ts)
|
|||
|
||||
if (atv->is_audio_track()) {
|
||||
|
||||
Playlist* playlist = atv->get_diskstream()->playlist();
|
||||
AudioPlaylist* playlist = dynamic_cast<AudioPlaylist*>(atv->get_diskstream()->playlist());
|
||||
|
||||
if (playlist && write_audio_range (*playlist, atv->get_diskstream()->n_channels(), ts) == 0) {
|
||||
ret = -1;
|
||||
|
|
@ -299,7 +300,7 @@ Editor::write_audio_selection (TimeSelection& ts)
|
|||
}
|
||||
|
||||
bool
|
||||
Editor::write_audio_range (Playlist& playlist, uint32_t channels, list<AudioRange>& range)
|
||||
Editor::write_audio_range (AudioPlaylist& playlist, uint32_t channels, list<AudioRange>& range)
|
||||
{
|
||||
AudioFileSource* fs;
|
||||
const jack_nframes_t chunk_size = 4096;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
void
|
||||
Editor::hscrollbar_allocate (Gtk::Allocation &alloc)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "public_editor.h"
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace PBD;
|
||||
|
||||
/* <CMT Additions file="editor.cc"> */
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
|
@ -3197,7 +3198,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
AudioTimeAxisView* atv = dynamic_cast<AudioTimeAxisView*> (&rv->get_time_axis_view());
|
||||
if (atv && atv->is_audio_track()) {
|
||||
AudioPlaylist* pl = atv->get_diskstream()->playlist();
|
||||
AudioPlaylist* pl = dynamic_cast<AudioPlaylist*>(atv->get_diskstream()->playlist());
|
||||
if (pl) {
|
||||
/* only freeze and capture state once */
|
||||
|
||||
|
|
|
|||
|
|
@ -27,4 +27,5 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using namespace Editing;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
using namespace std;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace Editing;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace std;
|
||||
|
||||
ExportRangeMarkersDialog::ExportRangeMarkersDialog (PublicEditor& editor)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
GainAutomationTimeAxisView::GainAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, ArdourCanvas::Canvas& canvas, const string & n, ARDOUR::Curve& c)
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ using namespace std;
|
|||
using namespace ardourvis ;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
ImageFrameSocketHandler* ImageFrameSocketHandler::_instance = 0 ;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ using namespace Gtk;
|
|||
using namespace Glib;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
IOSelectorWindow::IOSelectorWindow (Session& sess, IO& ior, bool input, bool can_cancel)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace PBD;
|
||||
|
||||
#define KBD_DEBUG 1
|
||||
bool debug_keyboard = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
using namespace Gtk;
|
||||
using namespace GTK_ARDOUR;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
|
||||
TextReceiver text_receiver ("ardour");
|
||||
|
|
@ -102,12 +103,6 @@ handler (int sig)
|
|||
shutdown (1);
|
||||
}
|
||||
|
||||
static void
|
||||
handler2 (int sig, siginfo_t* ctxt, void* ignored)
|
||||
{
|
||||
handler (sig);
|
||||
}
|
||||
|
||||
static void *
|
||||
signal_thread (void *arg)
|
||||
{
|
||||
|
|
@ -361,9 +356,17 @@ To create it from the command line, start ardour as \"ardour --new %1"), path)
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef VST_SUPPORT
|
||||
/* this is called from the entry point of a wine-compiled
|
||||
executable that is linked against gtk2_ardour built
|
||||
as a shared library.
|
||||
*/
|
||||
extern "C" {
|
||||
int ardour_main (int argc, char *argv[])
|
||||
#else
|
||||
int main (int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ARDOUR::AudioEngine *engine;
|
||||
vector<Glib::ustring> null_file_list;
|
||||
|
|
@ -443,7 +446,7 @@ main (int argc, char *argv[])
|
|||
|
||||
try {
|
||||
engine = new ARDOUR::AudioEngine (jack_client_name);
|
||||
ARDOUR::init (*engine, use_vst, try_hw_optimization, handler2);
|
||||
ARDOUR::init (*engine, use_vst, try_hw_optimization);
|
||||
ui->set_engine (*engine);
|
||||
} catch (AudioEngine::NoBackendAvailable& err) {
|
||||
gui_jack_error ();
|
||||
|
|
@ -463,6 +466,9 @@ main (int argc, char *argv[])
|
|||
ARDOUR::cleanup ();
|
||||
shutdown (0);
|
||||
|
||||
/* just another commit forcing change */
|
||||
return 0;
|
||||
}
|
||||
#ifdef VST_SUPPORT
|
||||
} // end of extern C block
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using namespace Gtkmm2ext;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Editing;
|
||||
using namespace Gtkmm2ext;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
PanAutomationTimeAxisView::PanAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ using namespace std;
|
|||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
Panner2d::Target::Target (float xa, float ya, const char *txt)
|
||||
: x (xa), y (ya), text (txt ? strdup (txt) : 0)
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ using namespace std;
|
|||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
PlaylistSelector::PlaylistSelector ()
|
||||
: ArdourDialog ("playlist selector")
|
||||
|
|
@ -115,7 +116,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
|
|||
|
||||
for (DSPL_Map::iterator x = dspl_map.begin(); x != dspl_map.end(); ++x) {
|
||||
|
||||
AudioDiskstream* ds = session->diskstream_by_id (x->first);
|
||||
Diskstream* ds = session->diskstream_by_id (x->first);
|
||||
|
||||
if (ds == 0) {
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
PluginSelector::PluginSelector (PluginManager *mgr)
|
||||
|
|
@ -149,6 +150,9 @@ PluginSelector::PluginSelector (PluginManager *mgr)
|
|||
added_list.get_selection()->signal_changed().connect (mem_fun(*this, &PluginSelector::added_list_selection_changed));
|
||||
|
||||
input_refiller ();
|
||||
#ifdef VST_SUPPORT
|
||||
vst_refiller ();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -306,6 +310,9 @@ PluginSelector::btn_update_clicked()
|
|||
{
|
||||
manager->refresh ();
|
||||
input_refiller ();
|
||||
#ifdef VST_SUPPORT
|
||||
vst_refiller ();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef VST_SUPPORT
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox
|
|||
Gtk::HBox preset_box;
|
||||
Gtk::VBox vpacker;
|
||||
|
||||
gboolean configure_handler (GdkEventConfigure*, Gtk::Socket*);
|
||||
bool configure_handler (GdkEventConfigure*, Gtk::Socket*);
|
||||
void save_plugin_setting ();
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
RedirectAutomationLine::RedirectAutomationLine (const string & name, Redirect& rd, uint32_t port, Session& s,
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
|
||||
RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n,
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Glib;
|
||||
using namespace Gtkmm2ext;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace std;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
AudioRegionGainLine::AudioRegionGainLine (const string & name, Session& s, AudioRegionView& r, ArdourCanvas::Group& parent, Curve& c)
|
||||
: AutomationLine (name, r.get_time_axis_view(), parent, c),
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include "region_selection.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
using namespace ArdourCanvas;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
|
||||
RouteRedirectSelection&
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ using namespace sigc;
|
|||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
|
||||
RouteUI::RouteUI (ARDOUR::Route& rt, ARDOUR::Session& sess, const char* m_name,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
|
||||
struct AudioRangeComparator {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "gui_thread.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
SendUI::SendUI (Send& s, Session& se)
|
||||
: _send (s),
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace std;
|
||||
|
||||
SoundFileBox::SoundFileBox ()
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "color.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
|
||||
StreamView::StreamView (AudioTimeAxisView& tv)
|
||||
|
|
@ -361,7 +362,9 @@ StreamView::playlist_changed (AudioDiskstream *ds)
|
|||
playlist_connections.push_back (ds->playlist()->RegionRemoved.connect (mem_fun (*this, &StreamView::remove_region_view)));
|
||||
playlist_connections.push_back (ds->playlist()->StateChanged.connect (mem_fun (*this, &StreamView::playlist_state_changed)));
|
||||
playlist_connections.push_back (ds->playlist()->Modified.connect (mem_fun (*this, &StreamView::playlist_modified)));
|
||||
playlist_connections.push_back (ds->playlist()->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade)));
|
||||
AudioPlaylist* apl = dynamic_cast<AudioPlaylist*>(ds->playlist());
|
||||
if (apl)
|
||||
playlist_connections.push_back (apl->NewCrossfade.connect (mem_fun (*this, &StreamView::add_crossfade)));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -454,7 +457,9 @@ StreamView::redisplay_diskstream ()
|
|||
|
||||
if (_trackview.is_audio_track()) {
|
||||
_trackview.get_diskstream()->playlist()->foreach_region (this, &StreamView::add_region_view);
|
||||
_trackview.get_diskstream()->playlist()->foreach_crossfade (this, &StreamView::add_crossfade);
|
||||
AudioPlaylist* apl = dynamic_cast<AudioPlaylist*>(_trackview.get_diskstream()->playlist());
|
||||
if (apl)
|
||||
apl->foreach_crossfade (this, &StreamView::add_crossfade);
|
||||
}
|
||||
|
||||
for (i = region_views.begin(); i != region_views.end(); ) {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
using namespace ArdourCanvas;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
TempoDialog::TempoDialog (TempoMap& map, jack_nframes_t frame, const string & action)
|
||||
: ArdourDialog ("tempo dialog"),
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ using namespace Gtk;
|
|||
using namespace Gdk;
|
||||
using namespace sigc;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace Editing;
|
||||
using namespace ArdourCanvas;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
using namespace std;
|
||||
using namespace Editing;
|
||||
using namespace Glib;
|
||||
using namespace PBD;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** Initialize const static memeber data */
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
AudioRange&
|
||||
TimeSelection::operator[] (uint32_t which)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ using namespace std;
|
|||
using namespace Gtk;
|
||||
using namespace sigc;
|
||||
using namespace Glib;
|
||||
using namespace PBD;
|
||||
|
||||
ustring
|
||||
fit_to_pixels (const ustring& str, int pixel_width, Pango::FontDescription& font, int& actual_width)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@
|
|||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
using namespace sigc;
|
||||
using namespace Gtk;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
#include <fst.h>
|
||||
|
||||
#include <gtk/gtksocket.h>
|
||||
#include <ardour/insert.h>
|
||||
#include <ardour/vst_plugin.h>
|
||||
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
using namespace Gtk;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
VSTPluginUI::VSTPluginUI (PluginInsert& pi, VSTPlugin& vp)
|
||||
: PlugUIBase (pi),
|
||||
|
|
@ -60,16 +61,12 @@ VSTPluginUI::get_preferred_height ()
|
|||
int
|
||||
VSTPluginUI::package (Gtk::Window& win)
|
||||
{
|
||||
/* for GTK+2, remove this: you cannot add to a realized socket */
|
||||
|
||||
//socket.realize ();
|
||||
|
||||
/* forward configure events to plugin window */
|
||||
|
||||
win.signal_configure_event().connect (bind (mem_fun (*this, &VSTPluginUI::configure_handler), &socket));
|
||||
win.signal_configure_event().connect (bind (mem_fun (*this, &VSTPluginUI::configure_handler), &socket), false);
|
||||
|
||||
/* XXX in GTK2, use add_id() instead of steal, although add_id()
|
||||
assumes that the window's owner understands the XEmbed protocol.
|
||||
/*
|
||||
this assumes that the window's owner understands the XEmbed protocol.
|
||||
*/
|
||||
|
||||
socket.add_id (fst_get_XID (vst.fst()));
|
||||
|
|
@ -77,45 +74,42 @@ VSTPluginUI::package (Gtk::Window& win)
|
|||
return 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
bool
|
||||
VSTPluginUI::configure_handler (GdkEventConfigure* ev, Gtk::Socket *socket)
|
||||
{
|
||||
XEvent event;
|
||||
|
||||
gint x, y;
|
||||
GdkWindow* w;
|
||||
|
||||
if (socket->gobj() == NULL) {
|
||||
return FALSE;
|
||||
if (socket == 0 || ((w = socket->gobj()->plug_window) == 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
event.xconfigure.type = ConfigureNotify;
|
||||
event.xconfigure.event = GDK_WINDOW_XWINDOW (socket->get_window()->gobj());
|
||||
event.xconfigure.window = GDK_WINDOW_XWINDOW (socket->get_window()->gobj());
|
||||
event.xconfigure.event = GDK_WINDOW_XWINDOW (w);
|
||||
event.xconfigure.window = GDK_WINDOW_XWINDOW (w);
|
||||
|
||||
/* The ICCCM says that synthetic events should have root relative
|
||||
* coordinates. We still aren't really ICCCM compliant, since
|
||||
* we don't send events when the real toplevel is moved.
|
||||
*/
|
||||
gdk_error_trap_push ();
|
||||
gdk_window_get_origin (socket->get_window()->gobj(), &x, &y);
|
||||
gdk_window_get_origin (w, &x, &y);
|
||||
gdk_error_trap_pop ();
|
||||
|
||||
event.xconfigure.x = x;
|
||||
event.xconfigure.y = y;
|
||||
event.xconfigure.width = GTK_WIDGET(socket)->allocation.width;
|
||||
event.xconfigure.height = GTK_WIDGET(socket)->allocation.height;
|
||||
event.xconfigure.width = GTK_WIDGET(socket->gobj())->allocation.width;
|
||||
event.xconfigure.height = GTK_WIDGET(socket->gobj())->allocation.height;
|
||||
|
||||
event.xconfigure.border_width = 0;
|
||||
event.xconfigure.above = None;
|
||||
event.xconfigure.override_redirect = False;
|
||||
|
||||
gdk_error_trap_push ();
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (socket->get_window()->gobj()),
|
||||
GDK_WINDOW_XWINDOW (socket->get_window()->gobj()),
|
||||
False, StructureNotifyMask, &event);
|
||||
// gdk_display_sync (GDK_WINDOW_XDISPLAY (socket->plug_window));
|
||||
XSendEvent (GDK_WINDOW_XDISPLAY (w), GDK_WINDOW_XWINDOW (w), False, StructureNotifyMask, &event);
|
||||
gdk_error_trap_pop ();
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,13 @@ audiofilesource.cc
|
|||
audiofilter.cc
|
||||
audioregion.cc
|
||||
audiosource.cc
|
||||
diskstream.cc
|
||||
midi_source.cc
|
||||
midi_diskstream.cc
|
||||
midi_playlist.cc
|
||||
midi_track.cc
|
||||
midi_region.cc
|
||||
smf_source.cc
|
||||
auditioner.cc
|
||||
automation.cc
|
||||
automation_event.cc
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace ARDOUR {
|
|||
|
||||
static const jack_nframes_t max_frames = JACK_MAX_FRAMES;
|
||||
|
||||
int init (AudioEngine&, bool with_vst, bool try_optimization, void (*sighandler)(int,siginfo_t*,void*) = 0);
|
||||
int init (AudioEngine&, bool with_vst, bool try_optimization);
|
||||
int cleanup ();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
$Id: diskstream.h 579 2006-06-12 19:56:37Z essej $
|
||||
*/
|
||||
|
||||
#ifndef __ardour_diskstream_h__
|
||||
#define __ardour_diskstream_h__
|
||||
#ifndef __ardour_audio_diskstream_h__
|
||||
#define __ardour_audio_diskstream_h__
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
|
|
@ -42,8 +42,8 @@
|
|||
#include <ardour/route.h>
|
||||
#include <ardour/port.h>
|
||||
#include <ardour/utils.h>
|
||||
#include <ardour/stateful.h>
|
||||
|
||||
#include <ardour/diskstream.h>
|
||||
#include <ardour/audioplaylist.h>
|
||||
struct tm;
|
||||
|
||||
namespace ARDOUR {
|
||||
|
|
@ -55,52 +55,23 @@ class AudioPlaylist;
|
|||
class AudioFileSource;
|
||||
class IO;
|
||||
|
||||
class AudioDiskstream : public Stateful, public sigc::trackable
|
||||
class AudioDiskstream : public Diskstream
|
||||
{
|
||||
public:
|
||||
enum Flag {
|
||||
Recordable = 0x1,
|
||||
Hidden = 0x2,
|
||||
Destructive = 0x4
|
||||
};
|
||||
|
||||
AudioDiskstream (Session &, const string& name, Flag f = Recordable);
|
||||
AudioDiskstream (Session &, const string& name, Diskstream::Flag f = Recordable);
|
||||
AudioDiskstream (Session &, const XMLNode&);
|
||||
|
||||
string name() const { return _name; }
|
||||
|
||||
ARDOUR::IO* io() const { return _io; }
|
||||
void set_io (ARDOUR::IO& io);
|
||||
|
||||
AudioDiskstream& ref() { _refcnt++; return *this; }
|
||||
void unref() { if (_refcnt) _refcnt--; if (_refcnt == 0) delete this; }
|
||||
uint32_t refcnt() const { return _refcnt; }
|
||||
//void unref() { if (_refcnt) _refcnt--; if (_refcnt == 0) delete this; }
|
||||
//uint32_t refcnt() const { return _refcnt; }
|
||||
|
||||
float playback_buffer_load() const;
|
||||
float capture_buffer_load() const;
|
||||
|
||||
void set_flag (Flag f) {
|
||||
_flags |= f;
|
||||
}
|
||||
|
||||
void unset_flag (Flag f) {
|
||||
_flags &= ~f;
|
||||
}
|
||||
|
||||
AlignStyle alignment_style() const { return _alignment_style; }
|
||||
void set_align_style (AlignStyle);
|
||||
void set_persistent_align_style (AlignStyle);
|
||||
|
||||
bool hidden() const { return _flags & Hidden; }
|
||||
bool recordable() const { return _flags & Recordable; }
|
||||
bool destructive() const { return _flags & Destructive; }
|
||||
|
||||
void set_destructive (bool yn);
|
||||
|
||||
jack_nframes_t roll_delay() const { return _roll_delay; }
|
||||
void set_roll_delay (jack_nframes_t);
|
||||
|
||||
int set_name (string str, void* src);
|
||||
//void set_align_style (AlignStyle);
|
||||
//void set_persistent_align_style (AlignStyle);
|
||||
|
||||
string input_source (uint32_t n=0) const {
|
||||
if (n < channels.size()) {
|
||||
|
|
@ -115,13 +86,7 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
}
|
||||
|
||||
void set_record_enabled (bool yn, void *src);
|
||||
bool record_enabled() const { return g_atomic_int_get (&_record_enabled); }
|
||||
void punch_in ();
|
||||
void punch_out ();
|
||||
|
||||
bool reversed() const { return _actual_speed < 0.0f; }
|
||||
double speed() const { return _visible_speed; }
|
||||
void set_speed (double);
|
||||
//void set_speed (double);
|
||||
|
||||
float peak_power(uint32_t n=0) {
|
||||
float x = channels[n].peak_power;
|
||||
|
|
@ -133,12 +98,14 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
}
|
||||
}
|
||||
|
||||
int use_playlist (AudioPlaylist *);
|
||||
int use_playlist (Playlist *);
|
||||
int use_new_playlist ();
|
||||
int use_copy_playlist ();
|
||||
|
||||
void start_scrub (jack_nframes_t where);
|
||||
void end_scrub ();
|
||||
void start_scrub (jack_nframes_t where) {} // FIXME?
|
||||
void end_scrub () {} // FIXME?
|
||||
|
||||
Playlist *playlist () { return _playlist; }
|
||||
|
||||
Sample *playback_buffer (uint32_t n=0) {
|
||||
if (n < channels.size())
|
||||
|
|
@ -152,40 +119,15 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
return 0;
|
||||
}
|
||||
|
||||
AudioPlaylist *playlist () { return _playlist; }
|
||||
|
||||
AudioFileSource *write_source (uint32_t n=0) {
|
||||
if (n < channels.size())
|
||||
return channels[n].write_source;
|
||||
return 0;
|
||||
}
|
||||
|
||||
jack_nframes_t current_capture_start() const { return capture_start_frame; }
|
||||
jack_nframes_t current_capture_end() const { return capture_start_frame + capture_captured; }
|
||||
jack_nframes_t get_capture_start_frame (uint32_t n=0);
|
||||
jack_nframes_t get_captured_frames (uint32_t n=0);
|
||||
|
||||
uint32_t n_channels() { return _n_channels; }
|
||||
|
||||
int add_channel ();
|
||||
int remove_channel ();
|
||||
|
||||
static void set_disk_io_chunk_frames (uint32_t n) {
|
||||
disk_io_chunk_frames = n;
|
||||
}
|
||||
|
||||
static jack_nframes_t disk_io_frames() { return disk_io_chunk_frames; }
|
||||
|
||||
sigc::signal<void,void*> record_enable_changed;
|
||||
sigc::signal<void> speed_changed;
|
||||
sigc::signal<void,void*> reverse_changed;
|
||||
sigc::signal<void> PlaylistChanged;
|
||||
sigc::signal<void> AlignmentStyleChanged;
|
||||
|
||||
static sigc::signal<void> DiskOverrun;
|
||||
static sigc::signal<void> DiskUnderrun;
|
||||
static sigc::signal<void,AudioDiskstream*> AudioDiskstreamCreated; // XXX use a ref with sigc2
|
||||
static sigc::signal<void,list<AudioFileSource*>*> DeleteSources;
|
||||
|
||||
/* stateful */
|
||||
|
||||
|
|
@ -194,9 +136,7 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
|
||||
void monitor_input (bool);
|
||||
|
||||
jack_nframes_t capture_offset() const { return _capture_offset; }
|
||||
void set_capture_offset ();
|
||||
|
||||
// FIXME: these don't belong here
|
||||
static void swap_by_ptr (Sample *first, Sample *last) {
|
||||
while (first < last) {
|
||||
Sample tmp = *first;
|
||||
|
|
@ -213,21 +153,12 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
}
|
||||
}
|
||||
|
||||
bool slaved() const { return _slaved; }
|
||||
void set_slaved(bool yn) { _slaved = yn; }
|
||||
//void handle_input_change (IOChange, void *src);
|
||||
|
||||
int set_loop (Location *loc);
|
||||
sigc::signal<void,Location *> LoopSet;
|
||||
|
||||
std::list<Region*>& last_capture_regions () {
|
||||
return _last_capture_regions;
|
||||
}
|
||||
|
||||
void handle_input_change (IOChange, void *src);
|
||||
|
||||
id_t id() const { return _id; }
|
||||
|
||||
XMLNode* deprecated_io_node;
|
||||
//static sigc::signal<void> DiskOverrun;
|
||||
//static sigc::signal<void> DiskUnderrun;
|
||||
//static sigc::signal<void,AudioDiskstream*> AudioDiskstreamCreated; // XXX use a ref with sigc2
|
||||
static sigc::signal<void,list<AudioFileSource*>*> DeleteSources;
|
||||
|
||||
protected:
|
||||
friend class Session;
|
||||
|
|
@ -237,9 +168,9 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
while they are called.
|
||||
*/
|
||||
|
||||
void set_pending_overwrite (bool);
|
||||
void set_pending_overwrite(bool);
|
||||
int overwrite_existing_buffers ();
|
||||
void reverse_scrub_buffer (bool to_forward);
|
||||
void reverse_scrub_buffer (bool to_forward) {} // FIXME?
|
||||
void set_block_size (jack_nframes_t);
|
||||
int internal_playback_seek (jack_nframes_t distance);
|
||||
int can_internal_playback_seek (jack_nframes_t distance);
|
||||
|
|
@ -247,9 +178,6 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
void reset_write_sources (bool, bool force = false);
|
||||
void non_realtime_input_change ();
|
||||
|
||||
uint32_t read_data_count() const { return _read_data_count; }
|
||||
uint32_t write_data_count() const { return _write_data_count; }
|
||||
|
||||
protected:
|
||||
friend class Auditioner;
|
||||
int seek (jack_nframes_t which_sample, bool complete_refill = false);
|
||||
|
|
@ -257,29 +185,14 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
protected:
|
||||
friend class AudioTrack;
|
||||
|
||||
void prepare ();
|
||||
int process (jack_nframes_t transport_frame, jack_nframes_t nframes, jack_nframes_t offset, bool can_record, bool rec_monitors_input);
|
||||
bool commit (jack_nframes_t nframes);
|
||||
void recover (); /* called if commit will not be called, but process was */
|
||||
|
||||
private:
|
||||
|
||||
/* use unref() to destroy a diskstream */
|
||||
|
||||
~AudioDiskstream();
|
||||
|
||||
enum TransitionType {
|
||||
CaptureStart = 0,
|
||||
CaptureEnd
|
||||
};
|
||||
|
||||
struct CaptureTransition {
|
||||
|
||||
TransitionType type;
|
||||
// the start or end file frame pos
|
||||
jack_nframes_t capture_val;
|
||||
};
|
||||
|
||||
struct ChannelInfo {
|
||||
|
||||
Sample *playback_wrap_buffer;
|
||||
|
|
@ -312,90 +225,25 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
|
||||
typedef vector<ChannelInfo> ChannelList;
|
||||
|
||||
|
||||
string _name;
|
||||
ARDOUR::Session& _session;
|
||||
ARDOUR::IO* _io;
|
||||
ChannelList channels;
|
||||
uint32_t _n_channels;
|
||||
id_t _id;
|
||||
|
||||
mutable gint _record_enabled;
|
||||
AudioPlaylist* _playlist;
|
||||
double _visible_speed;
|
||||
double _actual_speed;
|
||||
/* items needed for speed change logic */
|
||||
bool _buffer_reallocation_required;
|
||||
bool _seek_required;
|
||||
|
||||
bool force_refill;
|
||||
jack_nframes_t capture_start_frame;
|
||||
jack_nframes_t capture_captured;
|
||||
bool was_recording;
|
||||
jack_nframes_t adjust_capture_position;
|
||||
jack_nframes_t _capture_offset;
|
||||
jack_nframes_t _roll_delay;
|
||||
jack_nframes_t first_recordable_frame;
|
||||
jack_nframes_t last_recordable_frame;
|
||||
int last_possibly_recording;
|
||||
AlignStyle _alignment_style;
|
||||
bool _scrubbing;
|
||||
bool _slaved;
|
||||
bool _processed;
|
||||
Location* loop_location;
|
||||
jack_nframes_t overwrite_frame;
|
||||
off_t overwrite_offset;
|
||||
bool pending_overwrite;
|
||||
bool overwrite_queued;
|
||||
IOChange input_change_pending;
|
||||
jack_nframes_t wrap_buffer_size;
|
||||
jack_nframes_t speed_buffer_size;
|
||||
|
||||
uint64_t last_phase;
|
||||
uint64_t phi;
|
||||
|
||||
jack_nframes_t file_frame;
|
||||
jack_nframes_t playback_sample;
|
||||
jack_nframes_t playback_distance;
|
||||
|
||||
uint32_t _read_data_count;
|
||||
uint32_t _write_data_count;
|
||||
|
||||
bool in_set_state;
|
||||
AlignStyle _persistent_alignment_style;
|
||||
bool first_input_change;
|
||||
|
||||
Glib::Mutex state_lock;
|
||||
|
||||
jack_nframes_t scrub_start;
|
||||
jack_nframes_t scrub_buffer_size;
|
||||
jack_nframes_t scrub_offset;
|
||||
uint32_t _refcnt;
|
||||
|
||||
sigc::connection ports_created_c;
|
||||
sigc::connection plmod_connection;
|
||||
sigc::connection plstate_connection;
|
||||
sigc::connection plgone_connection;
|
||||
|
||||
/* the two central butler operations */
|
||||
|
||||
int do_flush (char * workbuf, bool force = false);
|
||||
int do_refill (Sample *mixdown_buffer, float *gain_buffer, char *workbuf);
|
||||
|
||||
virtual int non_realtime_do_refill() { return do_refill(0, 0, 0); }
|
||||
|
||||
int read (Sample* buf, Sample* mixdown_buffer, float* gain_buffer, char * workbuf, jack_nframes_t& start, jack_nframes_t cnt,
|
||||
ChannelInfo& channel_info, int channel, bool reversed);
|
||||
|
||||
uint32_t i_am_the_modifier;
|
||||
|
||||
/* XXX fix this redundancy ... */
|
||||
|
||||
void playlist_changed (Change);
|
||||
void playlist_modified ();
|
||||
//void playlist_changed (Change);
|
||||
//void playlist_modified ();
|
||||
void playlist_deleted (Playlist*);
|
||||
void session_controls_changed (Session::ControlType);
|
||||
void session_controls_changed (Session::ControlType) {} // FIXME?
|
||||
|
||||
void finish_capture (bool rec_monitors_input);
|
||||
void clean_up_capture (struct tm&, time_t, bool abort);
|
||||
void clean_up_capture (struct tm&, time_t, bool abort) {} // FIXME?
|
||||
void transport_stopped (struct tm&, time_t, bool abort);
|
||||
|
||||
struct CaptureInfo {
|
||||
|
|
@ -406,29 +254,25 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
vector<CaptureInfo*> capture_info;
|
||||
Glib::Mutex capture_info_lock;
|
||||
|
||||
void init (Flag);
|
||||
void init (Diskstream::Flag);
|
||||
|
||||
void init_channel (ChannelInfo &chan);
|
||||
void destroy_channel (ChannelInfo &chan);
|
||||
|
||||
static jack_nframes_t disk_io_chunk_frames;
|
||||
|
||||
int use_new_write_source (uint32_t n=0);
|
||||
int use_new_fade_source (uint32_t n=0);
|
||||
int use_new_fade_source (uint32_t n=0) { return 0; } // FIXME?
|
||||
|
||||
int find_and_use_playlist (const string&);
|
||||
|
||||
void allocate_temporary_buffers ();
|
||||
|
||||
unsigned char _flags;
|
||||
int create_input_port () { return 0; } // FIXME?
|
||||
int connect_input_port () { return 0; } // FIXME?
|
||||
int seek_unlocked (jack_nframes_t which_sample) { return 0; } // FIXME?
|
||||
|
||||
int create_input_port ();
|
||||
int connect_input_port ();
|
||||
int seek_unlocked (jack_nframes_t which_sample);
|
||||
int ports_created () { return 0; } // FIXME?
|
||||
|
||||
int ports_created ();
|
||||
|
||||
bool realtime_set_speed (double, bool global_change);
|
||||
//bool realtime_set_speed (double, bool global_change);
|
||||
void non_realtime_set_speed ();
|
||||
|
||||
std::list<Region*> _last_capture_regions;
|
||||
|
|
@ -440,8 +284,12 @@ class AudioDiskstream : public Stateful, public sigc::trackable
|
|||
void set_align_style_from_io();
|
||||
void setup_destructive_playlist ();
|
||||
void use_destructive_playlist ();
|
||||
|
||||
|
||||
ChannelList channels;
|
||||
AudioPlaylist* _playlist;
|
||||
};
|
||||
|
||||
}; /* namespace ARDOUR */
|
||||
|
||||
#endif /* __ardour_diskstream_h__ */
|
||||
#endif /* __ardour_audio_diskstream_h__ */
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class AudioTrack : public Route
|
|||
bool can_record() const { return true; }
|
||||
void set_record_enable (bool yn, void *src);
|
||||
|
||||
AudioDiskstream& disk_stream() const { return *diskstream; }
|
||||
AudioDiskstream& disk_stream() const { return *_diskstream; }
|
||||
int set_diskstream (AudioDiskstream&, void *);
|
||||
int use_diskstream (string name);
|
||||
int use_diskstream (id_t id);
|
||||
|
|
@ -99,7 +99,7 @@ class AudioTrack : public Route
|
|||
void set_meter_point (MeterPoint, void* src);
|
||||
|
||||
protected:
|
||||
AudioDiskstream *diskstream;
|
||||
AudioDiskstream *_diskstream;
|
||||
MeterPoint _saved_meter_point;
|
||||
TrackMode _mode;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include <ardour/ardour.h>
|
||||
#include <jack/jack.h>
|
||||
#include <jack/transport.h>
|
||||
#include <ardour/buffer.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
|
|
@ -104,8 +105,8 @@ class AudioEngine : public sigc::trackable
|
|||
virtual const char *what() const throw() { return "could not connect to engine backend"; }
|
||||
};
|
||||
|
||||
Port *register_audio_input_port (const std::string& portname);
|
||||
Port *register_audio_output_port (const std::string& portname);
|
||||
Port *register_input_port (Buffer::Type type, const std::string& portname);
|
||||
Port *register_output_port (Buffer::Type type, const std::string& portname);
|
||||
int unregister_port (Port *);
|
||||
|
||||
int connect (const std::string& source, const std::string& destination);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue