|
OpenShot Library | libopenshot
0.5.0
|
This class is used to extra audio data used for generating waveforms. More...
#include <AudioWaveformer.h>
Public Member Functions | |
| AudioWaveformData | ApplyKeyframes (const AudioWaveformData &base, const openshot::Keyframe *time_keyframe, const openshot::Keyframe *volume_keyframe, const openshot::Fraction &project_fps, const openshot::Fraction &source_fps, int source_channels, int num_per_second, int channel, bool normalize) |
| Apply time and volume keyframes to an existing waveform data set. More... | |
| AudioWaveformer (ReaderBase *reader) | |
| Default constructor. More... | |
| AudioWaveformData | ExtractSamples (const std::string &path, const openshot::Keyframe *time_keyframe, const openshot::Keyframe *volume_keyframe, const openshot::Fraction &project_fps, int channel, int num_per_second, bool normalize) |
| Convenience: extract then apply keyframes in one step from a file path. More... | |
| AudioWaveformData | ExtractSamples (const std::string &path, int channel, int num_per_second, bool normalize) |
| Extract audio samples from a media file path (audio-only fast path) More... | |
| AudioWaveformData | ExtractSamples (int channel, int num_per_second, bool normalize) |
| Extract audio samples from any ReaderBase class (legacy overload, now delegates to audio-only path) More... | |
| ~AudioWaveformer () | |
| Destructor. More... | |
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 83 of file AudioWaveformer.h.
| AudioWaveformer::AudioWaveformer | ( | ReaderBase * | reader | ) |
Default constructor.
Definition at line 35 of file AudioWaveformer.cpp.
| AudioWaveformer::~AudioWaveformer | ( | ) |
Destructor.
Definition at line 45 of file AudioWaveformer.cpp.
| AudioWaveformData AudioWaveformer::ApplyKeyframes | ( | const AudioWaveformData & | base, |
| const openshot::Keyframe * | time_keyframe, | ||
| const openshot::Keyframe * | volume_keyframe, | ||
| const openshot::Fraction & | project_fps, | ||
| const openshot::Fraction & | source_fps, | ||
| int | source_channels, | ||
| int | num_per_second, | ||
| int | channel, | ||
| bool | normalize | ||
| ) |
Apply time and volume keyframes to an existing waveform data set.
Definition at line 114 of file AudioWaveformer.cpp.
Referenced by ExtractSamples().
| AudioWaveformData AudioWaveformer::ExtractSamples | ( | const std::string & | path, |
| const openshot::Keyframe * | time_keyframe, | ||
| const openshot::Keyframe * | volume_keyframe, | ||
| const openshot::Fraction & | project_fps, | ||
| int | channel, | ||
| int | num_per_second, | ||
| bool | normalize | ||
| ) |
Convenience: extract then apply keyframes in one step from a file path.
Definition at line 96 of file AudioWaveformer.cpp.
| AudioWaveformData AudioWaveformer::ExtractSamples | ( | const std::string & | path, |
| int | channel, | ||
| int | num_per_second, | ||
| bool | normalize | ||
| ) |
Extract audio samples from a media file path (audio-only fast path)
Definition at line 84 of file AudioWaveformer.cpp.
| AudioWaveformData AudioWaveformer::ExtractSamples | ( | int | channel, |
| int | num_per_second, | ||
| bool | normalize | ||
| ) |
Extract audio samples from any ReaderBase class (legacy overload, now delegates to audio-only path)
| 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 51 of file AudioWaveformer.cpp.
1.8.17