OpenShot Library | libopenshot  0.3.2
Public Member Functions | List of all members
openshot::AudioWaveformer Class Reference

This class is used to extra audio data used for generating waveforms. More...

#include <AudioWaveformer.h>

Public Member Functions

 AudioWaveformer (ReaderBase *reader)
 Default constructor. More...
AudioWaveformData ExtractSamples (int channel, int num_per_second, bool normalize)
 Extract audio samples from any ReaderBase class. More...
 ~AudioWaveformer ()
 Destructor. More...

Detailed Description

This class is used to extra audio data used for generating waveforms.

Pass in a ReaderBase* with audio data, and this class will iterate the reader, and sample down the dataset to a much smaller set - more useful for generating waveforms. For example, take 44100 samples per second, and reduce it to 20 "max" or "average" samples per second - much easier to graph.

Definition at line 79 of file AudioWaveformer.h.

Constructor & Destructor Documentation

◆ AudioWaveformer()

AudioWaveformer::AudioWaveformer ( ReaderBase reader)

Default constructor.

Definition at line 21 of file AudioWaveformer.cpp.

◆ ~AudioWaveformer()

AudioWaveformer::~AudioWaveformer ( )


Definition at line 27 of file AudioWaveformer.cpp.

Member Function Documentation

◆ ExtractSamples()

AudioWaveformData AudioWaveformer::ExtractSamples ( int  channel,
int  num_per_second,
bool  normalize 

Extract audio samples from any ReaderBase class.

channelWhich audio channel should we extract data from (-1 == all channels)
num_per_secondHow many samples per second to return
normalizeShould we scale the data range so the largest value is 1.0

Definition at line 33 of file AudioWaveformer.cpp.

The documentation for this class was generated from the following files: