You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- 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]
41 lines
848 B
C++
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;
|
|
};
|
|
|
|
}
|