summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-12-21 14:48:25 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-12-21 14:48:25 +0000
commit2315c433e276110d8c1ac7cc5c8935c31b6f5879 (patch)
treee588fa9f1be957f6e9995c142b94911718378ff9 /libs/ardour/ardour
parent1fca71fd283c912bbb0d88fcb95fb8e3b330c09e (diff)
new tempo handling from drmoore; don't follow playhead when doing requested_return stuff; if selected marker is end of range, do the right thing when computing edit point
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2806 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/session.h30
-rw-r--r--libs/ardour/ardour/tempo.h20
2 files changed, 26 insertions, 24 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 42ad79f3c0..8aea492910 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -966,35 +966,35 @@ class Session : public PBD::StatefulDestructible
typedef void (Session::*process_function_type)(nframes_t);
- AudioEngine &_engine;
- mutable gint processing_prohibited;
+ AudioEngine& _engine;
+ mutable gint processing_prohibited;
process_function_type process_function;
process_function_type last_process_function;
bool waiting_for_sync_offset;
- nframes_t _base_frame_rate;
- nframes_t _current_frame_rate; //this includes video pullup offset
+ nframes_t _base_frame_rate;
+ nframes_t _current_frame_rate; //this includes video pullup offset
int transport_sub_state;
- mutable gint _record_status;
- nframes_t _transport_frame;
+ mutable gint _record_status;
+ volatile nframes_t _transport_frame;
Location* end_location;
Location* start_location;
- Slave *_slave;
+ Slave* _slave;
bool _silent;
volatile float _transport_speed;
volatile float _desired_transport_speed;
float _last_transport_speed;
bool auto_play_legal;
- nframes_t _last_slave_transport_frame;
- nframes_t maximum_output_latency;
- nframes_t last_stop_frame;
- nframes64_t _requested_return_frame;
+ nframes_t _last_slave_transport_frame;
+ nframes_t maximum_output_latency;
+ nframes_t last_stop_frame;
+ volatile nframes64_t _requested_return_frame;
vector<Sample *> _passthru_buffers;
vector<Sample *> _silent_buffers;
vector<Sample *> _send_buffers;
- nframes_t current_block_size;
- nframes_t _worst_output_latency;
- nframes_t _worst_input_latency;
- nframes_t _worst_track_latency;
+ nframes_t current_block_size;
+ nframes_t _worst_output_latency;
+ nframes_t _worst_input_latency;
+ nframes_t _worst_track_latency;
bool _have_captured;
float _meter_hold;
float _meter_falloff;
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index 5e3e93e48b..fcd42734b0 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -40,27 +40,29 @@ using std::list;
using std::vector;
namespace ARDOUR {
-
+class Meter;
class Tempo {
public:
- Tempo (double bpm)
- : _beats_per_minute (bpm) {}
+ Tempo (double bpm, double type=4.0) // defaulting to quarter note
+ : _beats_per_minute (bpm), _note_type(type) {}
Tempo (const Tempo& other) {
_beats_per_minute = other._beats_per_minute;
+ _note_type = other._note_type;
}
void operator= (const Tempo& other) {
if (&other != this) {
_beats_per_minute = other._beats_per_minute;
+ _note_type = other._note_type;
}
}
- double beats_per_minute () const { return _beats_per_minute; }
- double frames_per_beat (nframes_t sr) const {
- return ((60.0 * sr) / _beats_per_minute);
- }
+ double beats_per_minute () const { return _beats_per_minute;}
+ double note_type () const { return _note_type;}
+ double frames_per_beat (nframes_t sr, const Meter& meter) const;
protected:
double _beats_per_minute;
+ double _note_type;
};
class Meter {
@@ -149,8 +151,8 @@ class MeterSection : public MetricSection, public Meter {
class TempoSection : public MetricSection, public Tempo {
public:
- TempoSection (const BBT_Time& start, double qpm)
- : MetricSection (start), Tempo (qpm) {}
+ TempoSection (const BBT_Time& start, double qpm, double note_type)
+ : MetricSection (start), Tempo (qpm, note_type) {}
TempoSection (const XMLNode&);
static const string xml_state_node_name;