diff options
Diffstat (limited to 'libs/canvas/canvas/wave_view.h')
-rw-r--r-- | libs/canvas/canvas/wave_view.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/libs/canvas/canvas/wave_view.h b/libs/canvas/canvas/wave_view.h index 55d82022af..c4e19ec7bb 100644 --- a/libs/canvas/canvas/wave_view.h +++ b/libs/canvas/canvas/wave_view.h @@ -56,7 +56,7 @@ struct LIBCANVAS_API WaveViewThreadRequest WaveViewThreadRequest () : stop (0) {} - bool should_stop () const { return (bool) g_atomic_int_get (&stop); } + bool should_stop () const { return (bool) g_atomic_int_get (const_cast<gint*>(&stop)); } void cancel() { g_atomic_int_set (&stop, 1); } RequestType type; @@ -66,7 +66,7 @@ struct LIBCANVAS_API WaveViewThreadRequest double height; double samples_per_pixel; uint16_t channel; - double region_amplitude; + double amplitude; Color fill_color; boost::weak_ptr<const ARDOUR::Region> region; @@ -164,7 +164,6 @@ class LIBCANVAS_API WaveViewCache */ typedef std::pair<boost::shared_ptr<ARDOUR::AudioSource>,boost::shared_ptr<Entry> > ListEntry; typedef std::vector<ListEntry> CacheList; - CacheList cache_list; struct SortByTimestamp { bool operator() (const WaveViewCache::ListEntry& a, const WaveViewCache::ListEntry& b) { @@ -276,6 +275,8 @@ public: static void start_drawing_thread (); static void stop_drawing_thread (); + static void set_image_cache_size (uint64_t); + #ifdef CANVAS_COMPATIBILITY void*& property_gain_src () { return _foo_void; @@ -310,7 +311,6 @@ public: double _amplitude_above_axis; float _region_amplitude; double _start_shift; - mutable bool idle_queued; /** The `start' value to use for the region; we can't use the region's * value as the crossfade editor needs to alter it. @@ -364,7 +364,21 @@ public: boost::shared_ptr<WaveViewCache::Entry> get_image (framepos_t start, framepos_t end, bool& full_image) const; boost::shared_ptr<WaveViewCache::Entry> get_image_from_cache (framepos_t start, framepos_t end, bool& full_image) const; - ArdourCanvas::Coord y_extent (double, bool) const; + struct LineTips { + double top; + double bot; + double spread; + bool clip_max; + bool clip_min; + + LineTips() : top (0.0), bot (0.0), clip_max (false), clip_min (false) {} + }; + + ArdourCanvas::Coord y_extent (double) const; + void compute_tips (ARDOUR::PeakData const & peak, LineTips& tips) const; + + ARDOUR::framecnt_t desired_image_width () const; + void draw_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int n_peaks, boost::shared_ptr<WaveViewThreadRequest>) const; void draw_absent_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int) const; @@ -379,7 +393,6 @@ public: mutable boost::shared_ptr<WaveViewCache::Entry> _current_image; mutable boost::shared_ptr<WaveViewThreadRequest> current_request; - bool idle_send_request () const; static WaveViewCache* images; |