OpenShot Library | libopenshot  0.3.3
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 29 of file AudioWaveformer.h.

Member Function Documentation

◆ clear()

void openshot::AudioWaveformData::clear ( )
inline

Clear and free memory of both datasets.

Definition at line 55 of file AudioWaveformer.h.

◆ resize()

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

Resize both datasets.

Definition at line 35 of file AudioWaveformer.h.

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

◆ scale()

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

Scale # of values by some factor.

Definition at line 47 of file AudioWaveformer.h.

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

◆ vectors()

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

Return a vector of vectors (containing both datasets)

Definition at line 63 of file AudioWaveformer.h.

◆ zero()

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

Zero out # of values in both datasets.

Definition at line 41 of file AudioWaveformer.h.

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

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: