2025-01-03 12:09:23 +00:00
|
|
|
using Godot;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2026-05-22 12:25:02 +00:00
|
|
|
using Rokojori.Extensions;
|
2025-01-03 12:09:23 +00:00
|
|
|
namespace Rokojori
|
|
|
|
|
{
|
|
|
|
|
public class AudioStream : AudioConnection
|
|
|
|
|
{
|
|
|
|
|
protected float[] _buffer = new float[ 0 ];
|
|
|
|
|
|
|
|
|
|
public AudioStream( AudioProcessor p, bool isInput ):base( p, isInput )
|
|
|
|
|
{
|
|
|
|
|
_buffer = new float[ audioGraph.bufferSize ];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Clear()
|
|
|
|
|
{
|
|
|
|
|
_buffer = audioGraph.ClearBuffer( _buffer );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void UpdateBuffserSize()
|
|
|
|
|
{
|
|
|
|
|
_buffer = new float[ audioGraph.bufferSize ];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|