| 1 |
/* |
| 2 |
* Audacity: A Digital Audio Editor |
| 3 |
*/ |
| 4 |
#include "timecodeformatter.h" |
| 5 |
|
| 6 |
using namespace au::playback; |
| 7 |
|
| 8 |
TimecodeFormatter::TimecodeFormatter(const QString& formatStr) |
| 9 |
: m_format(formatStr) |
| 10 |
{ |
| 11 |
} |
| 12 |
|
| 13 |
void TimecodeFormatter::init() |
| 14 |
{ |
| 15 |
} |
| 16 |
|
| 17 |
TimecodeFormatter::ConversionResult TimecodeFormatter::valueToString(double, bool) const |
| 18 |
{ |
| 19 |
return TimecodeFormatter::ConversionResult(); |
| 20 |
} |
| 21 |
|
| 22 |
std::optional<double> TimecodeFormatter::stringToValue(const QString&) const |
| 23 |
{ |
| 24 |
return {}; |
| 25 |
} |
| 26 |
|
| 27 |
double TimecodeFormatter::singleStep(double value, int, bool) |
| 28 |
{ |
| 29 |
return value; |
| 30 |
} |
| 31 |
|
| 32 |
double TimecodeFormatter::singleStep(const QString& valueStr, int digitIndex, bool upwards) |
| 33 |
{ |
| 34 |
return singleStep(stringToValue(valueStr).value(), digitIndex, upwards); |
| 35 |
} |
| 36 |
|
| 37 |
void TimecodeFormatter::setSampleRate(double sampleRate) |
| 38 |
{ |
| 39 |
m_sampleRate = sampleRate; |
| 40 |
} |
| 41 |
|
| 42 |
void TimecodeFormatter::setTempo(double tempo) |
| 43 |
{ |
| 44 |
m_tempo = tempo; |
| 45 |
} |
| 46 |
|
| 47 |
void TimecodeFormatter::setUpperTimeSignature(int timeSig) |
| 48 |
{ |
| 49 |
m_upperTimeSignature = timeSig; |
| 50 |
} |
| 51 |
|
| 52 |
void TimecodeFormatter::setLowerTimeSignature(int timeSig) |
| 53 |
{ |
| 54 |
m_lowerTimeSignature = timeSig; |
| 55 |
} |