Loading...
Searching...
No Matches
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.
AudioWaveformData | ExtractSamples (int channel, int num_per_second, bool normalize)
| Extract audio samples from any ReaderBase class.
| ~AudioWaveformer ()
| Destructor.

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

Destructor.

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.

Parameters

  channel | Which audio channel should we extract data from (-1 == all channels)
  num_per_second | How many samples per second to return
  normalize | Should 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:

- AudioWaveformer.h
- AudioWaveformer.cpp