OpenShot Library | libopenshot  0.5.0
Public Member Functions | Public Attributes | List of all members
openshot::AudioWaveformData Struct Reference

This struct holds the extracted waveform data (both the RMS root-mean-squared average, and the max values) More...

#include <AudioWaveformer.h>

Public Member Functions

void clear ()
 Clear and free memory of both datasets. More...
 
void resize (int total_samples)
 Resize both datasets. More...
 
void scale (int total_samples, float factor)
 Scale # of values by some factor. More...
 
std::vector< std::vector< float > > vectors ()
 Return a vector of vectors (containing both datasets) More...
 
void zero (int total_samples)
 Zero out # of values in both datasets. More...
 

Public Attributes

std::vector< float > max_samples
 
std::vector< float > rms_samples
 

Detailed Description

This struct holds the extracted waveform data (both the RMS root-mean-squared average, and the max values)

Because we extract 2 different datasets from the audio, we return this struct with access to both sets of data, the average root mean squared values, and the max sample values.

Definition at line 33 of file AudioWaveformer.h.

Member Function Documentation

◆ clear()

void openshot::AudioWaveformData::clear ( )
inline

Clear and free memory of both datasets.

Definition at line 59 of file AudioWaveformer.h.

◆ resize()

void openshot::AudioWaveformData::resize ( int  total_samples)
inline

Resize both datasets.

Definition at line 39 of file AudioWaveformer.h.

Referenced by openshot::AudioWaveformer::ApplyKeyframes().

◆ scale()

void openshot::AudioWaveformData::scale ( int  total_samples,
float  factor 
)
inline

Scale # of values by some factor.

Definition at line 51 of file AudioWaveformer.h.

Referenced by openshot::AudioWaveformer::ApplyKeyframes(), and openshot::AudioWaveformer::ExtractSamples().

◆ vectors()

std::vector<std::vector<float> > openshot::AudioWaveformData::vectors ( )
inline

Return a vector of vectors (containing both datasets)

Definition at line 67 of file AudioWaveformer.h.

◆ zero()

void openshot::AudioWaveformData::zero ( int  total_samples)
inline

Zero out # of values in both datasets.

Definition at line 45 of file AudioWaveformer.h.

Referenced by openshot::AudioWaveformer::ApplyKeyframes().

Member Data Documentation

◆ max_samples

std::vector<float> openshot::AudioWaveformData::max_samples

◆ rms_samples

std::vector<float> openshot::AudioWaveformData::rms_samples

The documentation for this struct was generated from the following file: