1 /***************************************************************************
2 * Copyright (C) 2012 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 AUDIOENVELOPE_H
12 #define AUDIOENVELOPE_H
14 #include "audioInfo.h"
15 #include <mlt++/Mlt.h>
21 AudioEnvelope(Mlt::Producer *producer);
24 /// Returns the envelope, calculates it if necessary.
25 int64_t const* envelope();
26 int envelopeSize() const;
30 void normalizeEnvelope(bool clampTo0 = false);
32 QImage drawEnvelope();
34 void dumpInfo() const;
38 Mlt::Producer *m_producer;
42 int64_t m_envelopeMax;
43 int64_t m_envelopeMean;
44 int64_t m_envelopeStdDev;
46 bool m_envelopeStdDevCalculated;
47 bool m_envelopeIsNormalized;
50 #endif // AUDIOENVELOPE_H