1 /***************************************************************************
2 * Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com) *
3 * This file is part of kdenlive. See www.kdenlive.org. *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
11 #include "qtconcurrentrun.h"
13 #include "abstractaudioscopewidget.h"
21 #include <QMouseEvent>
24 AbstractAudioScopeWidget::AbstractAudioScopeWidget(Monitor *projMonitor, Monitor *clipMonitor, bool trackMouse, QWidget *parent) :
25 AbstractScopeWidget(projMonitor, clipMonitor, trackMouse, parent)
29 void AbstractAudioScopeWidget::slotReceiveAudio(const QVector<int16_t>& sampleData, int freq, int num_channels, int num_samples)
31 m_audioFrame = sampleData;
33 m_nChannels = num_channels;
34 m_nSamples = num_samples;
35 AbstractScopeWidget::slotRenderZoneUpdated();
39 AbstractAudioScopeWidget::~AbstractAudioScopeWidget() {}
41 QImage AbstractAudioScopeWidget::renderScope(uint accelerationFactor)
43 return renderAudioScope(accelerationFactor, m_audioFrame, m_freq, m_nChannels, m_nSamples);