diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-27 14:41:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-27 14:41:24 +0000 |
commit | 5e8b3f08328424299c264d70bba307dcea1f2b17 (patch) | |
tree | 488cc97ada729f0b4cf3d11f694aa00db7a87f69 /libs/ardour/ardour | |
parent | 4be50fc81bf5db91113c4e87f867163e738a0919 (diff) |
part one of hiding Diskstreams and making them a private object of a Track
git-svn-id: svn://localhost/ardour2/branches/3.0@6802 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/audio_diskstream.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/audio_track.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/diskstream.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_diskstream.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/midi_track.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/route.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 7 | ||||
-rw-r--r-- | libs/ardour/ardour/track.h | 12 |
8 files changed, 19 insertions, 22 deletions
diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index 4d2209d79b..b19da7eec4 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -174,7 +174,7 @@ class AudioDiskstream : public Diskstream protected: friend class AudioTrack; - int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input); + int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler); bool commit (nframes_t nframes); private: diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index 11c1090a63..0c4f29ee86 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -38,8 +38,8 @@ class AudioTrack : public Track int set_mode (TrackMode m); bool can_use_mode (TrackMode m, bool& bounce_required); - int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, - int declick, bool can_record, bool rec_monitors_input); + int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, + int declick, bool can_record, bool rec_monitors_input, bool& need_butler); boost::shared_ptr<AudioDiskstream> audio_diskstream() const; diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 48a9c2776b..7ac3d79e4e 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -180,10 +180,8 @@ class Diskstream : public SessionObject protected: friend class Track; - virtual void prepare (); - virtual int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input) = 0; + virtual int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler) = 0; virtual bool commit (nframes_t nframes) = 0; - virtual void recover (); /* called if commit will not be called, but process was */ //private: @@ -273,7 +271,6 @@ class Diskstream : public SessionObject AlignStyle _alignment_style; bool _scrubbing; bool _slaved; - bool _processed; Location* loop_location; nframes_t overwrite_frame; off_t overwrite_offset; @@ -289,7 +286,6 @@ class Diskstream : public SessionObject nframes_t file_frame; nframes_t playback_sample; nframes_t playback_distance; - bool commit_should_unlock; uint32_t _read_data_count; uint32_t _write_data_count; diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h index 72667ca662..5cb4a322f7 100644 --- a/libs/ardour/ardour/midi_diskstream.h +++ b/libs/ardour/ardour/midi_diskstream.h @@ -136,7 +136,7 @@ class MidiDiskstream : public Diskstream protected: friend class MidiTrack; - int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input); + int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input, bool& need_butler); bool commit (nframes_t nframes); static nframes_t midi_readahead; diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h index 133db881fb..f4f29398b2 100644 --- a/libs/ardour/ardour/midi_track.h +++ b/libs/ardour/ardour/midi_track.h @@ -38,8 +38,8 @@ public: MidiTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); ~MidiTrack (); - int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, - int declick, bool can_record, bool rec_monitors_input); + int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, + int declick, bool can_record, bool rec_monitors_input, bool& need_butler); void handle_transport_stopped (bool abort, bool did_locate, bool flush_processors); diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 2696b500ac..f971e44a7a 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -99,13 +99,13 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou /* these are the core of the API of a Route. see the protected sections as well */ virtual int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, - int declick, bool can_record, bool rec_monitors_input); + int declick, bool can_record, bool rec_monitors_input, bool& need_butler); virtual int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, bool state_changing, bool can_record, bool rec_monitors_input); virtual int silent_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, - bool can_record, bool rec_monitors_input); + bool can_record, bool rec_monitors_input, bool& need_butler); virtual void toggle_monitor_input (); virtual bool can_record() { return false; } diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 10ffe903f1..36687d5cf1 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -934,10 +934,9 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi PBD::ScopedConnection export_freewheel_connection; - void prepare_diskstreams (); - void commit_diskstreams (nframes_t, bool& session_requires_butler); - int process_routes (nframes_t); - int silent_process_routes (nframes_t); + void get_diskstream_statistics (); + int process_routes (nframes_t, bool& need_butler); + int silent_process_routes (nframes_t, bool& need_butler); bool get_rec_monitors_input () { if (actively_recording()) { diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index 21428f4d21..59f2c9bea2 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -46,15 +46,16 @@ class Track : public Route virtual bool can_use_mode (TrackMode /*m*/, bool& /*bounce_required*/) { return false; } PBD::Signal0<void> TrackModeChanged; - virtual int no_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, + virtual int no_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, bool state_changing, bool can_record, bool rec_monitors_input); - int silent_roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, - bool can_record, bool rec_monitors_input); + int silent_roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, + bool can_record, bool rec_monitors_input, bool& need_butler); - virtual int roll (nframes_t nframes, sframes_t start_frame, sframes_t end_frame, - int declick, bool can_record, bool rec_monitors_input) = 0; + virtual int roll (nframes_t nframes, framepos_t start_frame, framepos_t end_frame, + int declick, bool can_record, bool rec_monitors_input, bool& need_butler) = 0; + bool needs_butler() const { return _needs_butler; } void toggle_monitor_input (); bool can_record(); @@ -100,6 +101,7 @@ class Track : public Route boost::shared_ptr<Diskstream> _diskstream; MeterPoint _saved_meter_point; TrackMode _mode; + bool _needs_butler; ChanCount input_streams () const; |