Files
UnrealEngineUWP/Engine/Source/Runtime/SignalProcessing/Public/DSP/WaveShaper.h
Josh Markiewicz d79515867d Copying //UE4/Dev-Online to Dev-Main (//UE4/Dev-Main)
- Up to CL8320930 from DevOnline and 8311605 Merge Down from Main
- skipped some Fortnite content/plugins/code where it tried to reintegrate files that had been moved pending investigation
#rb none

[CL 8321295 by Josh Markiewicz in Main branch]
2019-08-26 18:35:22 -04:00

41 lines
848 B
C++

// Copyright 1998-2019 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;
};
}