You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
41 lines
838 B
C++
41 lines
838 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
namespace Audio
|
|
{
|
|
|
|
// A digital wave shaping effect to cause audio distortion
|
|
// https://en.wikipedia.org/wiki/Waveshaper
|
|
class SIGNALPROCESSING_API FWaveShaper
|
|
{
|
|
public:
|
|
// Constructor
|
|
FWaveShaper();
|
|
|
|
// Destructor
|
|
~FWaveShaper();
|
|
|
|
// Initialize the equalizer
|
|
void Init(const float InSampleRate);
|
|
|
|
// Sets the amount of wave shapping. 0.0 is no effect.
|
|
void SetAmount(const float InAmount);
|
|
|
|
// Sets the output gain of the waveshaper
|
|
void SetOutputGainDb(const float InGainDb);
|
|
|
|
// Processes the audio frame (audio frame must have channels equal to that used during initialization)
|
|
void ProcessAudio(const float InSample, float& OutSample);
|
|
|
|
private:
|
|
|
|
float Amount;
|
|
float AtanAmount;
|
|
float OutputGain;
|
|
};
|
|
|
|
}
|