1 /* Copyright (C) 2006 Paul Davis
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU General Public License as published by the
5 Free Software Foundation; either version 2 of the License, or (at your
6 option) any later version.
8 This program is distributed in the hope that it will be useful, but WITHOUT
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 You should have received a copy of the GNU General Public License along
14 with this program; if not, write to the Free Software Foundation, Inc.,
15 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 #ifndef __ardour_smpte_h__
19 #define __ardour_smpte_h__
33 // FIXME: make this a float
46 uint32_t frames; ///< SMPTE frames (not audio samples)
47 uint32_t subframes; ///< Typically unused
48 FPS rate; ///< Frame rate of this Time
49 static FPS default_rate; ///< Rate to use for default constructor
51 Time(FPS a_rate = default_rate) {
62 Wrap increment( Time& smpte );
63 Wrap decrement( Time& smpte );
64 Wrap increment_subframes( Time& smpte );
65 Wrap decrement_subframes( Time& smpte );
66 Wrap increment_seconds( Time& smpte );
67 Wrap increment_minutes( Time& smpte );
68 Wrap increment_hours( Time& smpte );
69 void frames_floor( Time& smpte );
70 void seconds_floor( Time& smpte );
71 void minutes_floor( Time& smpte );
72 void hours_floor( Time& smpte );
76 #endif // __ardour_smpte_h__