HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
|
provides sound effects and filters. More...
#include <AudioProcessor.h>
Public Member Functions | |
AudioProcessor (const AudioProcessor &)=delete | |
AudioProcessor & | operator= (const AudioProcessor &)=delete |
Static Public Member Functions | |
static void | ChangeChannelLayout (AudioBuffer &buffer, const AudioChannelLayout &outputChannelLayout) |
static void | ChangeSampleRate (AudioBuffer &buffer, uint32_t outputSampleRate) |
static std::vector< Heph::DoubleBuffer > | SplitChannels (const AudioBuffer &buffer) |
static AudioBuffer | MergeChannels (const std::vector< Heph::DoubleBuffer > &channels, uint32_t sampleRate) |
static void | ChangeEndian (AudioBuffer &buffer) |
static void | Echo (AudioBuffer &buffer, EchoInfo info) |
static void | LinearPanning (AudioBuffer &buffer, double panningFactor) |
static void | SquareLawPanning (AudioBuffer &buffer, double panningFactor) |
static void | SineLawPanning (AudioBuffer &buffer, double panningFactor) |
static void | Tremolo (AudioBuffer &buffer, double depth, const Oscillator &lfo) |
static void | Vibrato (AudioBuffer &buffer, double depth, double extent_semitone, const Oscillator &lfo) |
static void | Chorus (AudioBuffer &buffer, double depth, double feedbackGain, double baseDelay_ms, double delay_ms, double extent_semitone, const Oscillator &lfo) |
static void | Flanger (AudioBuffer &buffer, double depth, double feedbackGain, double baseDelay_ms, double delay_ms, const Oscillator &lfo) |
static void | FixOverflow (AudioBuffer &buffer) |
static void | Normalize (AudioBuffer &buffer, heph_audio_sample_t peakAmplitude) |
static void | RmsNormalize (AudioBuffer &buffer, double rms) |
static void | HardClipDistortion (AudioBuffer &buffer, double clippingLevel_dB) |
static void | ArctanDistortion (AudioBuffer &buffer, double alpha) |
static void | CubicDistortion (AudioBuffer &buffer, double a) |
static void | Overdrive (AudioBuffer &buffer, double drive) |
static void | Fuzz (AudioBuffer &buffer, double depth, double alpha) |
static void | LinearFadeIn (AudioBuffer &buffer, double duration_s) |
static void | LinearFadeIn (AudioBuffer &buffer, double duration_s, size_t startIndex) |
static void | LinearFadeOut (AudioBuffer &buffer, double duration_s) |
static void | LinearFadeOut (AudioBuffer &buffer, double duration_s, size_t startIndex) |
static void | Equalizer (AudioBuffer &buffer, Window &window, const std::vector< EqualizerInfo > &infos) |
static void | Equalizer (AudioBuffer &buffer, size_t hopSize, size_t fftSize, Window &window, const std::vector< EqualizerInfo > &infos) |
static void | EqualizerMT (AudioBuffer &buffer, Window &window, const std::vector< EqualizerInfo > &infos) |
static void | EqualizerMT (AudioBuffer &buffer, size_t threadCountPerChannel, Window &window, const std::vector< EqualizerInfo > &infos) |
static void | EqualizerMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, Window &window, const std::vector< EqualizerInfo > &infos) |
static void | EqualizerMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, size_t threadCountPerChannel, Window &window, const std::vector< EqualizerInfo > &infos) |
static void | ChangeSpeed (AudioBuffer &buffer, double speed, Window &window) |
static void | ChangeSpeed (AudioBuffer &buffer, size_t hopSize, size_t windowSize, double speed, Window &window) |
static void | PitchShift (AudioBuffer &buffer, double pitchChange_semitone, Window &window) |
static void | PitchShift (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double pitchChange_semitone, Window &window) |
static void | PitchShiftMT (AudioBuffer &buffer, double pitchChange_semitone, Window &window) |
static void | PitchShiftMT (AudioBuffer &buffer, double pitchChange_semitone, size_t threadCountPerChannel, Window &window) |
static void | PitchShiftMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double pitchChange_semitone, Window &window) |
static void | PitchShiftMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double pitchChange_semitone, size_t threadCountPerChannel, Window &window) |
static void | LowPassFilter (AudioBuffer &buffer, double cutoffFreq, Window &window) |
static void | LowPassFilter (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double cutoffFreq, Window &window) |
static void | LowPassFilterMT (AudioBuffer &buffer, double cutoffFreq, Window &window) |
static void | LowPassFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double cutoffFreq, Window &window) |
static void | LowPassFilterMT (AudioBuffer &buffer, double cutoffFreq, size_t threadCountPerChannel, Window &window) |
static void | LowPassFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double cutoffFreq, size_t threadCountPerChannel, Window &window) |
static void | HighPassFilter (AudioBuffer &buffer, double cutoffFreq, Window &window) |
static void | HighPassFilter (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double cutoffFreq, Window &window) |
static void | HighPassFilterMT (AudioBuffer &buffer, double cutoffFreq, Window &window) |
static void | HighPassFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double cutoffFreq, Window &window) |
static void | HighPassFilterMT (AudioBuffer &buffer, double cutoffFreq, size_t threadCountPerChannel, Window &window) |
static void | HighPassFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double cutoffFreq, size_t threadCountPerChannel, Window &window) |
static void | BandPassFilter (AudioBuffer &buffer, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandPassFilter (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandPassFilterMT (AudioBuffer &buffer, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandPassFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandPassFilterMT (AudioBuffer &buffer, double lowCutoffFreq, double highCutoffFreq, size_t threadCountPerChannel, Window &window) |
static void | BandPassFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double lowCutoffFreq, double highCutoffFreq, size_t threadCountPerChannel, Window &window) |
static void | BandCutFilter (AudioBuffer &buffer, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandCutFilter (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandCutFilterMT (AudioBuffer &buffer, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandCutFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double lowCutoffFreq, double highCutoffFreq, Window &window) |
static void | BandCutFilterMT (AudioBuffer &buffer, double lowCutoffFreq, double highCutoffFreq, size_t threadCountPerChannel, Window &window) |
static void | BandCutFilterMT (AudioBuffer &buffer, size_t hopSize, size_t fftSize, double lowCutoffFreq, double highCutoffFreq, size_t threadCountPerChannel, Window &window) |
provides sound effects and filters.
|
static |
changes the channel layout.
|
static |
changes the sample rate.
|
static |
splits the audio channels into separate buffers.
|
static |
merges the channels.
|
static |
changes the endianness of the audio samples.
Example: s32le -> s32be.
|
static |
adds echo to the audio data.
info | contains the echo characteristics. |
|
static |
linearly increases the volume of one channel while decreasing the other one (stereo only).
panningFactor | determines how the channels' volume will be changed. Ranges between -1 and 1. -1 means only the left channel will be audible and 1 means only the right channel will be audible. |
|
static |
increases the volume of one channel while decreasing the other one (stereo only). Uses square root to calculate the volumes.
panningFactor | determines how the channels' volume will be changed. Ranges between -1 and 1. -1 means only the left channel will be audible and 1 means only the right channel will be audible. |
|
static |
increases the volume of one channel while decreasing the other one (stereo only). Uses sin function to calculate the volumes.
panningFactor | determines how the channels' volume will be changed. Ranges between -1 and 1. -1 means only the left channel will be audible and 1 means only the right channel will be audible. |
|
static |
changes the volume of the audio data periodically and mixes the result with the input signal.
depth | controls the dry/wet mix ratio. Ranges between 0 and 1. |
lfo | low-frequency oscillator . |
|
static |
changes the pitch of the audio data periodically and mixes the result with the input signal.
depth | controls the dry/wet mix ratio. Ranges between 0 and 1. |
extent_semitone | maximum pitch change in terms of semitones. |
lfo | low-frequency oscillator . |
|
static |
delays the audio data and changes its pitch periodically. Then mixes the result with the input signal.
depth | controls the dry/wet mix ratio. Ranges between 0 and 1. |
feedbackGain | gain of the feedback sample. |
baseDelay_ms | constant delay, in milliseconds, that will be added to the wet signal. |
delay_ms | maximum value of the variable delay, in milliseconds, that will be added to the wet signal. The delay applied to wet samples changes periodically. The maximum delay that will be applied can be calculated as baseDelay_ms + delay_ms. |
extent_semitone | maximum pitch change in terms of semitones. |
lfo | low-frequency oscillator . |
|
static |
delays the audio data and mixes the result with the input signal. The amount of delay applied changes periodically.
depth | controls the dry/wet mix ratio. Ranges between 0 and 1. |
feedbackGain | gain of the feedback sample. |
baseDelay_ms | constant delay, in milliseconds, that will be added to the wet signal. |
delay_ms | maximum value of the variable delay, in milliseconds, that will be added to the wet signal. The delay applied to wet samples changes periodically. The maximum delay that will be applied can be calculated as baseDelay_ms + delay_ms. |
lfo | low-frequency oscillator . |
|
static |
fixes the distortion due to floating point samples exceeding the [-1, 1] range.
|
static |
normalizes the audio data at the provided amplitude.
peakAmplitude | maximum amplitude of the output signal. |
|
static |
normalizes the audio data at the provided rms.
rms | root mean square value of the output signal. |
|
static |
applies hard-clipping distortion.
clippingLevel_dB | threshold value in decibels. Must be negative or zero. |
|
static |
applies soft-clipping distortion via arctan function.
alpha | controls the amount of distortion. ranges between 0 and 1. |
|
static |
applies cubic distortion.
a | controls the amount of distortion. ranges between 0 and 1. |
|
static |
applies overdrive distortion.
drive | controls the amount of distortion. ranges between 0 and 1. |
|
static |
applies fuzz distortion.
depth | controls the dry/wet mix ratio. Ranges between 0 and 1. |
alpha | controls the amount of distortion. ranges between 0 and 11. |
|
static |
applies linear fade-in.
duration_s | duration of the fade-in in seconds. |
|
static |
applies linear fade-in.
duration_s | duration of the fade-in in seconds. |
startIndex | index of the first audio frame the effect will be applied to. |
|
static |
applies linear fade-out.
duration_s | duration of the fade-out in seconds. |
|
static |
applies linear fade-out.
duration_s | duration of the fade-out in seconds. |
startIndex | index of the first audio frame the effect will be applied to. |
|
static |
equalizer.
window | Window that will be applied to the audio signal. |
infos | contains the equalizer characteristics. |
|
static |
equalizer.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
window | Window that will be applied to the audio signal. |
infos | contains the equalizer characteristics. |
|
static |
multithreaded equalizer.
window | Window that will be applied to the audio signal. |
infos | contains the equalizer characteristics. |
|
static |
multithreaded equalizer.
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
infos | contains the equalizer characteristics. |
|
static |
multithreaded equalizer.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
window | Window that will be applied to the audio signal. |
infos | contains the equalizer characteristics. |
|
static |
multithreaded equalizer.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
infos | contains the equalizer characteristics. |
|
static |
changes the playback speed of the audio data without changing the pitch.
speed | playback speed multiplier. |
window | Window that will be applied to the audio signal. |
|
static |
changes the playback speed of the audio data without changing the pitch.
hopSize | hop size. |
windowSize | window size. |
speed | playback speed multiplier. |
window | Window that will be applied to the audio signal. |
|
static |
changes the pitch of the audio data without changing the playback speed.
pitchChange_semitone | change in pitch in terms of semitones. |
window | Window that will be applied to the audio signal. |
|
static |
changes the pitch of the audio data without changing the playback speed.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
pitchChange_semitone | change in pitch in terms of semitones. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] changes the pitch of the audio data without changing the playback speed.
pitchChange_semitone | change in pitch in terms of semitones. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] changes the pitch of the audio data without changing the playback speed.
pitchChange_semitone | change in pitch in terms of semitones. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] changes the pitch of the audio data without changing the playback speed.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
pitchChange_semitone | change in pitch in terms of semitones. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] changes the pitch of the audio data without changing the playback speed.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
pitchChange_semitone | change in pitch in terms of semitones. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are higher than the cutoffFreq.
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are higher than the cutoffFreq.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
cutoffFreq | the cutoff frequency in Hz. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
cutoffFreq | the cutoff frequency in Hz. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are lower than the cutoffFreq.
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are lower than the cutoffFreq.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
cutoffFreq | the cutoff frequency in Hz. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
cutoffFreq | the cutoff frequency in Hz. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are higher than the cutoffFreq.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
cutoffFreq | the cutoff frequency in Hz. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are not in the provided frequency band.
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are not in the provided frequency band.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are not in the provided frequency band.
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are not in the provided frequency band.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are not in the provided frequency band.
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are not in the provided frequency band.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are in the provided frequency band.
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
removes the frequencies that are in the provided frequency band.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are in the provided frequency band.
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are in the provided frequency band.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are in the provided frequency band.
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |
|
static |
[multithreaded] removes the frequencies that are in the provided frequency band.
hopSize | hop size. |
fftSize | length of the FFT in samples. |
lowCutoffFreq | start frequency of the passband. |
highCutoffFreq | stop frequency of the passband. |
threadCountPerChannel | number of threads will be used for each channel. |
window | Window that will be applied to the audio signal. |