mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Add some assertions.
git-svn-id: svn://localhost/ardour2/branches/3.0@9411 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a7a6bd1256
commit
1d5cc25d94
2 changed files with 5 additions and 0 deletions
|
|
@ -27,6 +27,8 @@ namespace ARDOUR {
|
|||
framecnt_t
|
||||
BeatsFramesConverter::to (double beats) const
|
||||
{
|
||||
assert (beats >= 0);
|
||||
|
||||
return _tempo_map.framepos_plus_bbt (_origin_b, Timecode::BBT_Time(beats)) - _origin_b;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#include <cmath>
|
||||
#include <cassert>
|
||||
|
||||
#include "timecode/bbt_time.h"
|
||||
|
||||
|
|
@ -31,6 +32,8 @@ BBT_Time::BBT_Time (double dbeats)
|
|||
always be zero.
|
||||
*/
|
||||
|
||||
assert (dbeats >= 0);
|
||||
|
||||
bars = 0;
|
||||
beats = rint (floor (dbeats));
|
||||
ticks = rint (floor (BBT_Time::ticks_per_beat * fmod (dbeats, 1.0)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue