diff options
author | Jan Holthuis <jholthuis@mixxx.org> | 2021-07-01 12:50:52 +0200 |
---|---|---|
committer | Jan Holthuis <jholthuis@mixxx.org> | 2021-07-01 17:19:25 +0200 |
commit | 4db7cb2483f36d0e199078ce4fd6cd657064c3d9 (patch) | |
tree | 30ec33da91cdb30d9007f54254b8465bec0a43c5 /src/audio | |
parent | f79e90799739add27f6e596900780c9bdbf2ab9c (diff) |
FramePos: Add isValid method to check if the position is valid
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/frame.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/audio/frame.h b/src/audio/frame.h index 1c31397d9e..8cbab7cbc2 100644 --- a/src/audio/frame.h +++ b/src/audio/frame.h @@ -1,6 +1,7 @@ #pragma once #include <QDebug> +#include <cmath> #include <limits> namespace mixxx { @@ -25,6 +26,10 @@ class FramePos final { : m_framePosition(framePosition) { } + bool isValid() const { + return !std::isnan(m_framePosition); + } + void setValue(value_t framePosition) { m_framePosition = framePosition; } |