Skip to content

Class AudioAnalyzer

ClassList > AudioAnalyzer

This class analyzes the peaks of audio clips and generate a list of bars that can be used to visualize the audio's overall texture.

  • #include <audioanalyzer.h>

Inherits the following classes: QObject

Public Properties

Type Name
property int barCount

Public Signals

Type Name
signal void barCountChanged
signal void ready (const QList< qreal > & bars)

Public Functions

Type Name
AudioAnalyzer (QObject * parent=nullptr)
Q_INVOKABLE void analyze (const QUrl & source)
int barCount () const
void setBarCount (int barCount)

Public Properties Documentation

property barCount [1/2]

int AudioAnalyzer::barCount;

Public Signals Documentation

signal barCountChanged

void AudioAnalyzer::barCountChanged;

Emitted when the bar count property has changed.


signal ready

void AudioAnalyzer::ready;

Emitted when an analysis is over.

Note:

If the analysis failed, the list will be empty.


Public Functions Documentation

function AudioAnalyzer

explicit AudioAnalyzer::AudioAnalyzer (
    QObject * parent=nullptr
) 

function analyze

Q_INVOKABLE void AudioAnalyzer::analyze (
    const QUrl & source
) 

Run an analysis of the audio source.


function barCount [2/2]

inline int AudioAnalyzer::barCount () const

Returns the bar count that will be returned upon successful audio clip analysis.


function setBarCount

void AudioAnalyzer::setBarCount (
    int barCount
) 

Sets the bar count that will be returned upon successful audio clip analysis.



The documentation for this class was generated from the following file src/core/audioanalyzer.h