parent
814831620c
commit
2bd7089310
2 changed files with 2 additions and 2 deletions
|
|
@ -54,7 +54,7 @@ void BeatProcessor::process() {
|
|||
m_collector->readChunk(m_in->data);
|
||||
|
||||
aubio_tempo_do(m_tempo, m_in, m_out);
|
||||
if (m_out->data[0] != 0.0f) {
|
||||
if (!qFuzzyIsNull(m_out->data[0])) {
|
||||
emit beat(aubio_tempo_get_bpm(m_tempo));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ void CUtils::saveItem(QQuickItem* target, const QUrl& path, const QRect& rect, Q
|
|||
|
||||
auto scaledRect = rect;
|
||||
const qreal scale = target->window()->devicePixelRatio();
|
||||
if (rect.isValid() && scale != 1.0) {
|
||||
if (rect.isValid() && qFuzzyCompare(scale + 1.0, 2.0)) {
|
||||
scaledRect =
|
||||
QRectF(rect.left() * scale, rect.top() * scale, rect.width() * scale, rect.height() * scale).toRect();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue