rj-action-library/Runtime/Audio/AudioGraph/Effect/Gain.cs

29 lines
474 B
C#
Raw Normal View History

2025-01-03 12:09:23 +00:00
using Godot;
using System.Reflection;
using System.Collections.Generic;
using System.Text;
namespace Rokojori
{
public class Gain:AudioEffectMono
{
public readonly AudioStreamInput gain;
public Gain( AudioGraph ag ): base( ag )
{
gain = new AudioStreamInput( this );
}
protected override void _Process()
{
for ( int i = 0; i < bufferSize; i++ )
{
output[ i ] = gain[ i ] * input[ i ];
}
}
}
}