NO-OP: whitespace, indent

This commit is contained in:
Robin Gareus 2019-09-30 19:06:00 +02:00
parent 0a6f517230
commit bfec73b8c3
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
9 changed files with 155 additions and 153 deletions

View file

@ -19,10 +19,10 @@
#ifndef __CANVAS_ARC_H__ #ifndef __CANVAS_ARC_H__
#define __CANVAS_ARC_H__ #define __CANVAS_ARC_H__
#include "canvas/visibility.h" #include "canvas/fill.h"
#include "canvas/item.h" #include "canvas/item.h"
#include "canvas/outline.h" #include "canvas/outline.h"
#include "canvas/fill.h" #include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
@ -37,12 +37,12 @@ public:
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const; void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const; void compute_bounding_box () const;
void set_center (Duple const &); void set_center (Duple const &);
void set_radius (Coord); void set_radius (Coord);
void set_arc (double degrees); void set_arc (double degrees);
void set_start (double degrees); void set_start (double degrees);
Duple center() const { Duple center() const {
return _center; return _center;
} }
Coord radius () const { Coord radius () const {
@ -51,17 +51,17 @@ public:
double arc_degrees () const { double arc_degrees () const {
return _arc_degrees; return _arc_degrees;
} }
double start_degrees () const { double start_degrees () const {
return _start_degrees; return _start_degrees;
} }
bool covers (Duple const &) const; bool covers (Duple const &) const;
private: private:
Duple _center; Duple _center;
Coord _radius; Coord _radius;
double _arc_degrees; double _arc_degrees;
double _start_degrees; double _start_degrees;
}; };
} }

View file

@ -29,18 +29,19 @@
#include <set> #include <set>
#include <gdkmm/window.h>
#include <gtkmm/eventbox.h>
#include <gtkmm/alignment.h> #include <gtkmm/alignment.h>
#include <cairomm/surface.h> #include <gtkmm/eventbox.h>
#include <gdkmm/window.h>
#include <cairomm/context.h> #include <cairomm/context.h>
#include <cairomm/surface.h>
#include "pbd/signals.h" #include "pbd/signals.h"
#include "gtkmm2ext/cairo_canvas.h" #include "gtkmm2ext/cairo_canvas.h"
#include "canvas/visibility.h"
#include "canvas/root_group.h" #include "canvas/root_group.h"
#include "canvas/visibility.h"
namespace Gtk { namespace Gtk {
class Window; class Window;
@ -107,7 +108,7 @@ public:
/** Called when an item is being destroyed */ /** Called when an item is being destroyed */
virtual void item_going_away (Item *, Rect) {} virtual void item_going_away (Item *, Rect) {}
virtual void item_shown_or_hidden (Item *); virtual void item_shown_or_hidden (Item *);
void item_visual_property_changed (Item*); void item_visual_property_changed (Item*);
void item_changed (Item *, Rect); void item_changed (Item *, Rect);
void item_moved (Item *, Rect); void item_moved (Item *, Rect);
@ -134,22 +135,22 @@ public:
virtual Coord height () const = 0; virtual Coord height () const = 0;
/** Store the coordinates of the mouse pointer in window coordinates in /** Store the coordinates of the mouse pointer in window coordinates in
@param winpos. Return true if the position was within the window, * @param winpos. Return true if the position was within the window,
false otherwise. * false otherwise.
*/ */
virtual bool get_mouse_position (Duple& winpos) const = 0; virtual bool get_mouse_position (Duple& winpos) const = 0;
/** Signal to be used by items that need to track the mouse position /** Signal to be used by items that need to track the mouse position
within the window. * within the window.
*/ */
sigc::signal<void,Duple const&> MouseMotion; sigc::signal<void,Duple const&> MouseMotion;
sigc::signal<void> PreRender; sigc::signal<void> PreRender;
/** Ensures that the position given by @param winpos (in window /** Ensures that the position given by @param winpos (in window
coordinates) is within the current window area, possibly reduced by * coordinates) is within the current window area, possibly reduced by
@param border. * @param border.
*/ */
Duple clamp_to_window (Duple const& winpos, Duple border = Duple()); Duple clamp_to_window (Duple const& winpos, Duple border = Duple());
void zoomed(); void zoomed();
@ -159,15 +160,15 @@ public:
void dump (std::ostream&) const; void dump (std::ostream&) const;
/** Ask the canvas to pick the current item again, and generate /** Ask the canvas to pick the current item again, and generate
an enter event for it. * an enter event for it.
*/ */
virtual void re_enter () = 0; virtual void re_enter () = 0;
virtual void start_tooltip_timeout (Item*) {} virtual void start_tooltip_timeout (Item*) {}
virtual void stop_tooltip_timeout () {} virtual void stop_tooltip_timeout () {}
/** Set the timeout used to display tooltips, in milliseconds /** Set the timeout used to display tooltips, in milliseconds
*/ */
static void set_tooltip_timeout (uint32_t msecs); static void set_tooltip_timeout (uint32_t msecs);
virtual Glib::RefPtr<Pango::Context> get_pango_context() = 0; virtual Glib::RefPtr<Pango::Context> get_pango_context() = 0;
@ -269,7 +270,7 @@ private:
Item * _new_current_item; Item * _new_current_item;
/** the item that is currently grabbed, or 0 */ /** the item that is currently grabbed, or 0 */
Item * _grabbed_item; Item * _grabbed_item;
/** the item that currently has key focus or 0 */ /** the item that currently has key focus or 0 */
Item * _focused_item; Item * _focused_item;
bool _single_exposure; bool _single_exposure;

View file

@ -19,18 +19,18 @@
#ifndef __CANVAS_INTERPOLATED_CURVE_H__ #ifndef __CANVAS_INTERPOLATED_CURVE_H__
#define __CANVAS_INTERPOLATED_CURVE_H__ #define __CANVAS_INTERPOLATED_CURVE_H__
#include "canvas/visibility.h"
#include "canvas/types.h" #include "canvas/types.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
class LIBCANVAS_API InterpolatedCurve class LIBCANVAS_API InterpolatedCurve
{ {
public: public:
enum SplineType { enum SplineType {
CatmullRomUniform, CatmullRomUniform,
CatmullRomCentripetal, CatmullRomCentripetal,
}; };
protected: protected:
@ -51,7 +51,7 @@ protected:
* points_per_segment is less than 2. * points_per_segment is less than 2.
*/ */
static void static void
interpolate (const Points& coordinates, uint32_t points_per_segment, SplineType curve_type, bool closed, Points& results) interpolate (const Points& coordinates, uint32_t points_per_segment, SplineType curve_type, bool closed, Points& results)
{ {
if (points_per_segment < 2) { if (points_per_segment < 2) {
return; return;
@ -150,7 +150,7 @@ private:
* position between p1 and p2 to interpolate the value. * position between p1 and p2 to interpolate the value.
*/ */
static double static double
__interpolate (double p[4], double time[4], double t) __interpolate (double p[4], double time[4], double t)
{ {
const double L01 = p[0] * (time[1] - t) / (time[1] - time[0]) + p[1] * (t - time[0]) / (time[1] - time[0]); const double L01 = p[0] * (time[1] - t) / (time[1] - time[0]) + p[1] * (t - time[0]) / (time[1] - time[0]);
const double L12 = p[1] * (time[2] - t) / (time[2] - time[1]) + p[2] * (t - time[1]) / (time[2] - time[1]); const double L12 = p[1] * (time[2] - t) / (time[2] - time[1]) + p[2] * (t - time[1]) / (time[2] - time[1]);
@ -180,7 +180,7 @@ private:
* between the points defined by index+1 and index+2. * between the points defined by index+1 and index+2.
*/ */
static void static void
_interpolate (const Points& points, Points::size_type index, int points_per_segment, SplineType curve_type, Points& results) _interpolate (const Points& points, Points::size_type index, int points_per_segment, SplineType curve_type, Points& results)
{ {
double x[4]; double x[4];
double y[4]; double y[4];

View file

@ -29,11 +29,11 @@
#include "pbd/signals.h" #include "pbd/signals.h"
#include "canvas/visibility.h"
#include "canvas/types.h"
#include "canvas/fill.h" #include "canvas/fill.h"
#include "canvas/outline.h"
#include "canvas/lookup_table.h" #include "canvas/lookup_table.h"
#include "canvas/outline.h"
#include "canvas/types.h"
#include "canvas/visibility.h"
namespace ArdourCanvas namespace ArdourCanvas
{ {
@ -61,7 +61,7 @@ public:
Item (Item *, Duple const& p); Item (Item *, Duple const& p);
virtual ~Item (); virtual ~Item ();
void redraw () const; void redraw () const;
/** Render this item to a Cairo context. /** Render this item to a Cairo context.
* @param area Area to draw, in **window** coordinates * @param area Area to draw, in **window** coordinates
@ -94,11 +94,11 @@ public:
*/ */
virtual void add_items_at_point (Duple /*point*/, std::vector<Item const *>& items) const; virtual void add_items_at_point (Duple /*point*/, std::vector<Item const *>& items) const;
/** Return true if the item covers @param point, false otherwise. /** Return true if the item covers @param point, false otherwise.
* *
* The point is in window coordinates * The point is in window coordinates
*/ */
virtual bool covers (Duple const &) const; virtual bool covers (Duple const &) const;
/** Update _bounding_box and _bounding_box_dirty */ /** Update _bounding_box and _bounding_box_dirty */
virtual void compute_bounding_box () const = 0; virtual void compute_bounding_box () const = 0;
@ -114,20 +114,20 @@ public:
return _parent; return _parent;
} }
uint32_t depth() const; uint32_t depth() const;
const Item* closest_ancestor_with (const Item& other) const; const Item* closest_ancestor_with (const Item& other) const;
bool common_ancestor_within (uint32_t, const Item& other) const; bool common_ancestor_within (uint32_t, const Item& other) const;
/** returns true if this item is an ancestor of @param candidate, /** returns true if this item is an ancestor of @param candidate,
* and false otherwise. * and false otherwise.
*/ */
bool is_ancestor_of (const Item& candidate) const { bool is_ancestor_of (const Item& candidate) const {
return candidate.is_descendant_of (*this); return candidate.is_descendant_of (*this);
} }
/** returns true if this Item is a descendant of @param candidate, /** returns true if this Item is a descendant of @param candidate,
* and false otherwise. * and false otherwise.
*/ */
bool is_descendant_of (const Item& candidate) const; bool is_descendant_of (const Item& candidate) const;
void set_position (Duple); void set_position (Duple);
void set_x_position (Coord); void set_x_position (Coord);
@ -149,15 +149,15 @@ public:
void size_allocate (Rect const&); void size_allocate (Rect const&);
/** bounding box is the public API to get the size of the item. /** bounding box is the public API to get the size of the item.
If @param for_own_purposes is false, then it will return the * If @param for_own_purposes is false, then it will return the
allocated bounding box (if there is one) in preference to the * allocated bounding box (if there is one) in preference to the
one that would naturally be computed by the item. * one that would naturally be computed by the item.
*/ */
Rect bounding_box (bool for_own_purposes = false) const; Rect bounding_box (bool for_own_purposes = false) const;
Rect allocation() const { return _allocation; } Rect allocation() const { return _allocation; }
Coord height() const; Coord height() const;
Coord width() const; Coord width() const;
Duple item_to_parent (Duple const &) const; Duple item_to_parent (Duple const &) const;
Rect item_to_parent (Rect const &) const; Rect item_to_parent (Rect const &) const;
@ -165,27 +165,27 @@ public:
Rect parent_to_item (Rect const &) const; Rect parent_to_item (Rect const &) const;
/* XXX: it's a pity these two aren't the same form as item_to_parent etc., /* XXX: it's a pity these two aren't the same form as item_to_parent etc.,
but it makes a bit of a mess in the rest of the code if they are not. * but it makes a bit of a mess in the rest of the code if they are not.
*/ */
void canvas_to_item (Coord &, Coord &) const; void canvas_to_item (Coord &, Coord &) const;
void item_to_canvas (Coord &, Coord &) const; void item_to_canvas (Coord &, Coord &) const;
Duple canvas_to_item (Duple const&) const; Duple canvas_to_item (Duple const&) const;
Rect item_to_canvas (Rect const&) const; Rect item_to_canvas (Rect const&) const;
Duple item_to_canvas (Duple const&) const; Duple item_to_canvas (Duple const&) const;
Rect canvas_to_item (Rect const&) const; Rect canvas_to_item (Rect const&) const;
Duple item_to_window (Duple const&, bool rounded = true) const; Duple item_to_window (Duple const&, bool rounded = true) const;
Duple window_to_item (Duple const&) const; Duple window_to_item (Duple const&) const;
Rect item_to_window (Rect const&, bool rounded = true) const; Rect item_to_window (Rect const&, bool rounded = true) const;
Rect window_to_item (Rect const&) const; Rect window_to_item (Rect const&) const;
void raise_to_top (); void raise_to_top ();
void raise (int); void raise (int);
void lower_to_bottom (); void lower_to_bottom ();
virtual void hide (); virtual void hide ();
virtual void show (); virtual void show ();
/** @return true if this item is visible (ie it will be rendered), /** @return true if this item is visible (ie it will be rendered),
* otherwise false * otherwise false
@ -213,7 +213,7 @@ public:
void add (Item *); void add (Item *);
void add_front (Item *); void add_front (Item *);
void remove (Item *); void remove (Item *);
void clear (bool with_delete = false); void clear (bool with_delete = false);
std::list<Item*> const & items () const { std::list<Item*> const & items () const {
return _items; return _items;
} }
@ -226,25 +226,25 @@ public:
/* This is a sigc++ signal because it is solely /* This is a sigc++ signal because it is solely
concerned with GUI stuff and is thus single-threaded concerned with GUI stuff and is thus single-threaded
*/ */
template <class T> template <class T>
struct EventAccumulator { struct EventAccumulator {
typedef T result_type; typedef T result_type;
template <class U> template <class U>
result_type operator () (U first, U last) { result_type operator () (U first, U last) {
while (first != last) { while (first != last) {
if (*first) { if (*first) {
return true; return true;
}
++first;
}
return false;
} }
++first; };
}
return false;
}
};
sigc::signal1<bool, GdkEvent*, EventAccumulator<bool> > Event; sigc::signal1<bool, GdkEvent*, EventAccumulator<bool> > Event;
#ifdef CANVAS_DEBUG #ifdef CANVAS_DEBUG
std::string name; std::string name;
@ -260,26 +260,26 @@ public:
void start_tooltip_timeout (); void start_tooltip_timeout ();
void stop_tooltip_timeout (); void stop_tooltip_timeout ();
virtual void dump (std::ostream&) const; virtual void dump (std::ostream&) const;
std::string whatami() const; std::string whatami() const;
protected: protected:
friend class Fill; friend class Fill;
friend class Outline; friend class Outline;
/** To be called at the beginning of any property change that /** To be called at the beginning of any property change that
* may alter the bounding box of this item * may alter the bounding box of this item
*/ */
void begin_change (); void begin_change ();
/** To be called at the endof any property change that /** To be called at the endof any property change that
* may alter the bounding box of this item * may alter the bounding box of this item
*/ */
void end_change (); void end_change ();
/** To be called at the beginning of any property change that /** To be called at the beginning of any property change that
* does NOT alter the bounding box of this item * does NOT alter the bounding box of this item
*/ */
void begin_visual_change (); void begin_visual_change ();
/** To be called at the endof any property change that /** To be called at the endof any property change that
* does NOT alter the bounding box of this item * does NOT alter the bounding box of this item
*/ */
void end_visual_change (); void end_visual_change ();
@ -336,5 +336,4 @@ extern LIBCANVAS_API std::ostream& operator<< (std::ostream&, const ArdourCanvas
} }
#endif #endif

View file

@ -20,29 +20,29 @@
#ifndef __CANVAS_LINE_H__ #ifndef __CANVAS_LINE_H__
#define __CANVAS_LINE_H__ #define __CANVAS_LINE_H__
#include "canvas/visibility.h"
#include "canvas/item.h" #include "canvas/item.h"
#include "canvas/outline.h" #include "canvas/outline.h"
#include "canvas/poly_line.h" #include "canvas/poly_line.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
class LIBCANVAS_API Line : public Item class LIBCANVAS_API Line : public Item
{ {
public: public:
Line (Canvas*); Line (Canvas*);
Line (Item*); Line (Item*);
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const; void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const; void compute_bounding_box () const;
bool covers (Duple const &) const; bool covers (Duple const &) const;
void set (Duple, Duple); void set (Duple, Duple);
void set_x0 (Coord); void set_x0 (Coord);
void set_y0 (Coord); void set_y0 (Coord);
void set_x1 (Coord); void set_x1 (Coord);
void set_y1 (Coord); void set_y1 (Coord);
void set_x (Coord, Coord); void set_x (Coord, Coord);
Coord x0 () const { Coord x0 () const {
return _points[0].x; return _points[0].x;

View file

@ -23,8 +23,8 @@
#include <vector> #include <vector>
#include "canvas/visibility.h"
#include "canvas/item.h" #include "canvas/item.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {

View file

@ -21,9 +21,9 @@
#ifndef __CANVAS_POLY_LINE_H__ #ifndef __CANVAS_POLY_LINE_H__
#define __CANVAS_POLY_LINE_H__ #define __CANVAS_POLY_LINE_H__
#include "canvas/visibility.h"
#include "canvas/poly_item.h"
#include "canvas/outline.h" #include "canvas/outline.h"
#include "canvas/poly_item.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
@ -39,10 +39,11 @@ public:
virtual void compute_bounding_box () const; virtual void compute_bounding_box () const;
bool covers (Duple const &) const; bool covers (Duple const &) const;
/** /**
* Set the distance at which a point will be considered to be covered * Set the distance at which a point will be considered to be covered
* by the line. For the definition of "distance" see * by the line. For the definition of "distance" see
* utils.cc:distance_to_segment_squared() * utils.cc \ref distance_to_segment_squared()
*/ */
void set_covers_threshold (double); void set_covers_threshold (double);

View file

@ -20,10 +20,10 @@
#ifndef __CANVAS_POLYGON_H__ #ifndef __CANVAS_POLYGON_H__
#define __CANVAS_POLYGON_H__ #define __CANVAS_POLYGON_H__
#include "canvas/visibility.h"
#include "canvas/poly_item.h"
#include "canvas/outline.h"
#include "canvas/fill.h" #include "canvas/fill.h"
#include "canvas/outline.h"
#include "canvas/poly_item.h"
#include "canvas/visibility.h"
namespace ArdourCanvas { namespace ArdourCanvas {
@ -32,18 +32,18 @@ class LIBCANVAS_API Polygon : public PolyItem
public: public:
Polygon (Canvas*); Polygon (Canvas*);
Polygon (Item*); Polygon (Item*);
virtual ~Polygon(); virtual ~Polygon();
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const; void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;
void compute_bounding_box () const; void compute_bounding_box () const;
bool covers (Duple const &) const; bool covers (Duple const &) const;
protected: protected:
mutable float* multiple; mutable float* multiple;
mutable float* constant; mutable float* constant;
mutable Points::size_type cached_size; mutable Points::size_type cached_size;
void cache_shape_computation () const; void cache_shape_computation () const;
}; };
} }

View file

@ -20,12 +20,13 @@
#define __timecode_time_h__ #define __timecode_time_h__
#include <cmath> #include <cmath>
#include <ostream>
#include <inttypes.h> #include <inttypes.h>
#include <ostream>
#include "temporal/visibility.h" #include "temporal/visibility.h"
namespace Timecode { namespace Timecode
{
enum Wrap { enum Wrap {
NONE = 0, NONE = 0,
@ -55,31 +56,34 @@ struct LIBTEMPORAL_API Time {
uint32_t hours; uint32_t hours;
uint32_t minutes; uint32_t minutes;
uint32_t seconds; uint32_t seconds;
uint32_t frames; ///< Timecode frames (not audio frames) uint32_t frames; ///< Timecode frames (not audio frames)
uint32_t subframes; ///< Typically unused uint32_t subframes; ///< Typically unused
double rate; ///< Frame rate of this Time double rate; ///< Frame rate of this Time
static double default_rate; ///< Rate to use for default constructor static double default_rate; ///< Rate to use for default constructor
bool drop; ///< Whether this Time uses dropframe Timecode bool drop; ///< Whether this Time uses dropframe Timecode
Time (double a_rate = default_rate) { Time (double a_rate = default_rate)
negative = false; {
hours = 0; negative = false;
minutes = 0; hours = 0;
seconds = 0; minutes = 0;
frames = 0; seconds = 0;
frames = 0;
subframes = 0; subframes = 0;
rate = a_rate; rate = a_rate;
drop = (lrintf(100.f * (float)a_rate) == (long)2997); drop = (lrintf (100.f * (float)a_rate) == (long)2997);
} }
bool operator== (const Time& other) const { bool operator== (const Time& other) const
{
return negative == other.negative && hours == other.hours && return negative == other.negative && hours == other.hours &&
minutes == other.minutes && seconds == other.seconds && minutes == other.minutes && seconds == other.seconds &&
frames == other.frames && subframes == other.subframes && frames == other.frames && subframes == other.subframes &&
rate == other.rate && drop == other.drop; rate == other.rate && drop == other.drop;
} }
std::ostream& print (std::ostream& ostr) const { std::ostream& print (std::ostream& ostr) const
{
if (negative) { if (negative) {
ostr << '-'; ostr << '-';
} }
@ -88,7 +92,6 @@ struct LIBTEMPORAL_API Time {
<< " @" << rate << (drop ? " drop" : " nondrop"); << " @" << rate << (drop ? " drop" : " nondrop");
return ostr; return ostr;
} }
}; };
Wrap LIBTEMPORAL_API increment (Time& timecode, uint32_t); Wrap LIBTEMPORAL_API increment (Time& timecode, uint32_t);
@ -103,46 +106,44 @@ void LIBTEMPORAL_API seconds_floor (Time& timecode);
void LIBTEMPORAL_API minutes_floor (Time& timecode); void LIBTEMPORAL_API minutes_floor (Time& timecode);
void LIBTEMPORAL_API hours_floor (Time& timecode); void LIBTEMPORAL_API hours_floor (Time& timecode);
double LIBTEMPORAL_API timecode_to_frames_per_second(TimecodeFormat const t); double LIBTEMPORAL_API timecode_to_frames_per_second (TimecodeFormat const t);
bool LIBTEMPORAL_API timecode_has_drop_frames(TimecodeFormat const t); bool LIBTEMPORAL_API timecode_has_drop_frames (TimecodeFormat const t);
std::string LIBTEMPORAL_API timecode_format_name (TimecodeFormat const t); std::string LIBTEMPORAL_API timecode_format_name (TimecodeFormat const t);
std::string LIBTEMPORAL_API timecode_format_time (Timecode::Time const timecode); std::string LIBTEMPORAL_API timecode_format_time (Timecode::Time const timecode);
std::string LIBTEMPORAL_API timecode_format_sampletime ( bool LIBTEMPORAL_API parse_timecode_format (std::string tc, Timecode::Time& TC);
int64_t sample,
double sample_sample_rate,
double timecode_frames_per_second, bool timecode_drop_frames
);
bool LIBTEMPORAL_API parse_timecode_format(std::string tc, Timecode::Time &TC); std::string LIBTEMPORAL_API
timecode_format_sampletime (
int64_t sample,
double sample_sample_rate,
double timecode_frames_per_second, bool timecode_drop_frames);
void LIBTEMPORAL_API timecode_to_sample( void LIBTEMPORAL_API
Timecode::Time& timecode, int64_t& sample, timecode_to_sample (
bool use_offset, bool use_subframes, Timecode::Time& timecode, int64_t& sample,
bool use_offset, bool use_subframes,
/* Note - framerate info is taken from Timecode::Time& */ /* Note - framerate info is taken from Timecode::Time& */
double sample_sample_rate /**< may include pull up/down */, double sample_sample_rate /**< may include pull up/down */,
uint32_t subframes_per_frame /**< must not be 0 if use_subframes==true */, uint32_t subframes_per_frame /**< must not be 0 if use_subframes==true */,
/* optional offset - can be improved: function pointer to lazily query this*/ /* optional offset - can be improved: function pointer to lazily query this*/
bool offset_is_negative, int64_t offset_samples bool offset_is_negative, int64_t offset_samples);
);
void LIBTEMPORAL_API sample_to_timecode ( void LIBTEMPORAL_API
int64_t sample, Timecode::Time& timecode, sample_to_timecode (
bool use_offset, bool use_subframes, int64_t sample, Timecode::Time& timecode,
bool use_offset, bool use_subframes,
/* framerate info */ /* framerate info */
double timecode_frames_per_second, double timecode_frames_per_second,
bool timecode_drop_frames, bool timecode_drop_frames,
double sample_sample_rate/**< can include pull up/down */, double sample_sample_rate /**< can include pull up/down */,
uint32_t subframes_per_frame, uint32_t subframes_per_frame,
/* optional offset - can be improved: function pointer to lazily query this*/ /* optional offset - can be improved: function pointer to lazily query this*/
bool offset_is_negative, int64_t offset_samples bool offset_is_negative, int64_t offset_samples);
);
} // namespace Timecode } // namespace Timecode
extern LIBTEMPORAL_API std::ostream& operator<< (std::ostream& ostr, const Timecode::Time& t); extern LIBTEMPORAL_API std::ostream& operator<< (std::ostream& ostr, const Timecode::Time& t);
#endif // __timecode_time_h__ #endif // __timecode_time_h__