2017-09-24 12:03:54 -04:00
|
|
|
/*
|
2019-08-02 23:10:55 -04:00
|
|
|
* Copyright (C) 2014-2015 David Robillard <d@drobilla.net>
|
2014-01-12 12:40:25 -05:00
|
|
|
*
|
2019-08-02 23:10:55 -04:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-01-12 12:40:25 -05:00
|
|
|
*
|
2019-08-02 23:10:55 -04:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2014-01-12 12:40:25 -05:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
2019-08-02 23:10:55 -04:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2014-01-12 12:40:25 -05:00
|
|
|
*/
|
|
|
|
|
2014-01-12 20:01:12 -05:00
|
|
|
#include <stdint.h>
|
2014-11-23 16:30:09 -05:00
|
|
|
|
2017-09-24 12:03:54 -04:00
|
|
|
#include "temporal/beats.h"
|
|
|
|
#include "temporal/types.h"
|
|
|
|
|
2019-10-25 15:13:51 -04:00
|
|
|
#include "evoral/TimeConverter.h"
|
|
|
|
#include "evoral/types.h"
|
2014-01-12 12:40:25 -05:00
|
|
|
|
|
|
|
namespace Evoral {
|
|
|
|
|
2014-11-23 16:30:09 -05:00
|
|
|
template<typename A, typename B>
|
|
|
|
TimeConverter<A,B>::~TimeConverter()
|
|
|
|
{}
|
|
|
|
|
2014-01-12 12:40:25 -05:00
|
|
|
template<typename A, typename B>
|
|
|
|
B
|
2014-11-23 16:30:09 -05:00
|
|
|
IdentityConverter<A,B>::to(A a) const
|
2014-01-12 12:40:25 -05:00
|
|
|
{
|
|
|
|
return static_cast<B>(a);
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename A, typename B>
|
|
|
|
A
|
|
|
|
IdentityConverter<A,B>::from(B b) const
|
|
|
|
{
|
|
|
|
return static_cast<A>(b);
|
|
|
|
}
|
|
|
|
|
2017-09-24 12:03:54 -04:00
|
|
|
template class IdentityConverter<double, Temporal::samplepos_t>;
|
|
|
|
template class TimeConverter<double, Temporal::samplepos_t>;
|
|
|
|
template class TimeConverter<Temporal::Beats, Temporal::samplepos_t>;
|
2014-01-12 12:40:25 -05:00
|
|
|
|
|
|
|
} // namespace Evoral
|