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 #ifndef AUDIOSPECTRUM_H
12 #define AUDIOSPECTRUM_H
16 #include "abstractaudioscopewidget.h"
17 #include "ui_audiospectrum_ui.h"
18 #include "tools/kiss_fftr.h"
20 class AudioSpectrum_UI;
22 class AudioSpectrum : public AbstractAudioScopeWidget {
26 AudioSpectrum(QWidget *parent = 0);
29 // Implemented virtual methods
30 QString widgetName() const;
33 ///// Implemented methods /////
35 QImage renderHUD(uint accelerationFactor);
36 QImage renderAudioScope(uint accelerationFactor, const QVector<int16_t> audioFrame, const int freq, const int num_channels, const int num_samples);
37 QImage renderBackground(uint accelerationFactor);
38 bool isHUDDependingOnInput() const;
39 bool isScopeDependingOnInput() const;
40 bool isBackgroundDependingOnInput() const;
41 virtual void readConfig();
45 Ui::AudioSpectrum_UI *ui;
50 QActionGroup *m_agScale;
54 /** Lower bound for the dB value to display */
56 /** Upper bound (max: 0) */
66 #endif // AUDIOSPECTRUM_H