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]
55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "DSP/Osc.h"
|
|
|
|
namespace Audio
|
|
{
|
|
// Ring modulation effect
|
|
// https://en.wikipedia.org/wiki/Ring_modulation
|
|
class SIGNALPROCESSING_API FRingModulation
|
|
{
|
|
public:
|
|
// Constructor
|
|
FRingModulation();
|
|
|
|
// Destructor
|
|
~FRingModulation();
|
|
|
|
// Initialize the equalizer
|
|
void Init(const float InSampleRate, const int32 InNumChannels);
|
|
|
|
// The type of modulation
|
|
void SetModulatorWaveType(const EOsc::Type InType);
|
|
|
|
// Set the ring modulation frequency
|
|
void SetModulationFrequency(const float InModulationFrequency);
|
|
|
|
// Set the ring modulation depth
|
|
void SetModulationDepth(const float InModulationDepth);
|
|
|
|
// Set the dry level of the ring modulation
|
|
void SetDryLevel(const float InDryLevel) { DryLevel = InDryLevel; }
|
|
|
|
// Set the wet level of the ring modulation
|
|
void SetWetLevel(const float InWetLevel) { WetLevel = InWetLevel; }
|
|
|
|
// Processes the audio frame (audio frame must have channels equal to that used during initialization)
|
|
void ProcessAudioFrame(const float* InFrame, float* OutFrame);
|
|
|
|
// Process audio buffer
|
|
void ProcessAudio(const float* InBuffer, const int32 InNumSamples, float* OutBuffer);
|
|
|
|
private:
|
|
Audio::FOsc Osc;
|
|
float ModulationFrequency;
|
|
float ModulationDepth;
|
|
float DryLevel;
|
|
float WetLevel;
|
|
int32 NumChannels;
|
|
};
|
|
|
|
}
|