4#include "libmythbase/mythconfig.h"
31 m_lastTime = nowAsDuration<std::chrono::milliseconds>();
40 QMutexLocker locker(
mutex());
43 if (
m_area.isEmpty() || !node)
46 float y = (
static_cast<float>(
m_area.height()) / 2.0F) +
m_area.top();
51 double const step =
static_cast<double>(node->m_length) /
NUM_SAMPLES;
54 auto indexTo =
static_cast<long>(index + step);
55 if (indexTo ==
static_cast<long>(index))
56 indexTo =
static_cast<long>(index + 1);
59 for (
auto s =
static_cast<long>(index); s < indexTo && s < node->m_length; s++)
61 double temp = (
static_cast<double>(node->m_left[s]) +
62 (node->m_right ?
static_cast<double>(node->m_right[s]) : 0.0) *
63 (
static_cast<double>(
m_area.height())) ) / 65536.0;
64 value = temp > 0.0 ? std::max(temp, value) : std::min(temp, value);
69 Buffer[(i * 2) + 1] = y +
static_cast<float>(value);
78 auto timenow = nowAsDuration<std::chrono::milliseconds>();
89 const QString&
name()
const override
121 const QString&
name()
const override
VideoVisual * Create(AudioPlayer *Audio, MythRender *Render) const override
bool SupportedRenderer(RenderType Type) override
const QString & name() const override
bool UpdateVertices(float *Buffer)
void InitCommon(QRect Area)
VideoVisualMonoScope(AudioPlayer *Audio, MythRender *Render, bool Fade)
std::chrono::milliseconds m_lastTime
const QString & name() const override
VideoVisual * Create(AudioPlayer *Audio, MythRender *Render) const override
bool SupportedRenderer(RenderType Type) override
VisualNode * GetNode(void)
VideoVisualSimpleScopeFactory VideoVisualSimpleScopeFactory
VideoVisualMonoScopeFactory VideoVisualMonoScopeFactory
static constexpr size_t NUM_SAMPLES