Loading...
Searching...
No Matches
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.
void | resize (int total_samples)
| Resize both datasets.
void | scale (int total_samples, float factor)
| Scale # of values by some factor.
std::vector< std::vector< float > > | vectors ()
| Return a vector of vectors (containing both datasets)
void | zero (int total_samples)
| Zero out # of values in both datasets.

## 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

Definition at line 31 of file AudioWaveformer.h.

Referenced by clear(), openshot::AudioWaveformer::ExtractSamples(), resize(), scale(), vectors(), and zero().

## rms_samples

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

Definition at line 32 of file AudioWaveformer.h.

Referenced by clear(), openshot::AudioWaveformer::ExtractSamples(), resize(), scale(), vectors(), and zero().

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

- AudioWaveformer.h