BGC Tools
|
Holds a reference to a large underlying sample buffer. Loops and crossfades with itself. Used for managing extra-large TENoise sample. More...
Public Member Functions | |
CrossFadingRefClip (float[] samples, double leftFactor, double rightFactor, int initialPosition=-1) | |
override void | Reset () |
Sets this internal state of this stream to the initial state More... | |
override int | Read (float[] data, int offset, int count) |
Copy count samples into the Data buffer, starting at offset. More... | |
override void | Seek (int position) |
Seek to the indicated position in the stream More... | |
override IEnumerable< double > | GetChannelRMS () |
The RMS amplitude of each channel More... | |
Public Member Functions inherited from BGC.Audio.BGCStream | |
void | Initialize () |
Perform any calculations necessary to prepare the Stream More... | |
Data Fields | |
override int | Channels => 2 |
override int | TotalSamples => Channels * Samples.Length |
override int | ChannelSamples => Samples.Length |
Data Fields inherited from BGC.Audio.BGCAudioClip | |
float | Duration => ChannelSamples / SamplingRate |
override float | SamplingRate => 44100f |
Properties | |
float [] | Samples [get] |
int | Position [get, private set] |
Properties inherited from BGC.Audio.BGCStream | |
abstract int | Channels [get] |
abstract int | TotalSamples [get] |
abstract int | ChannelSamples [get] |
abstract float | SamplingRate [get] |
Properties inherited from BGC.Audio.IBGCStream | |
int | Channels [get] |
The number of underlying Channels of this BGCStream More... | |
int | TotalSamples [get] |
The total number of Samples of this BGCStream More... | |
int | ChannelSamples [get] |
The number of Samples of each channel for this BGCStream More... | |
float | SamplingRate [get] |
The sampling rate of the Stream More... | |
Private Attributes | |
readonly float | leftFactor = 0f |
readonly float | rightFactor = 0f |
const float | FADE_DURATION = 1.0f |
readonly float [] | window = null |
int | initialWindowStart = -1 |
readonly int | startCrossFade |
Additional Inherited Members | |
Protected Member Functions inherited from BGC.Audio.BGCStream | |
virtual void | _Initialize () |
Protected Attributes inherited from BGC.Audio.BGCStream | |
bool | initialized = false |
Holds a reference to a large underlying sample buffer. Loops and crossfades with itself. Used for managing extra-large TENoise sample.
Definition at line 12 of file CrossFadingRefClip.cs.
|
inline |
Definition at line 33 of file CrossFadingRefClip.cs.
References BGC.Mathematics.CustomRandom.Next().
|
virtual |
The RMS amplitude of each channel
Implements BGC.Audio.BGCStream.
|
inlinevirtual |
Copy count samples into the Data buffer, starting at offset.
Implements BGC.Audio.BGCStream.
Definition at line 72 of file CrossFadingRefClip.cs.
References BGC.Mathematics.GeneralMath.Clamp().
|
inlinevirtual |
Sets this internal state of this stream to the initial state
Implements BGC.Audio.BGCStream.
Definition at line 65 of file CrossFadingRefClip.cs.
References BGC.Mathematics.CustomRandom.Next().
|
virtual |
Seek to the indicated position in the stream
Implements BGC.Audio.BGCStream.
override int BGC.Audio.CrossFadingRefClip.Channels => 2 |
Definition at line 15 of file CrossFadingRefClip.cs.
override int BGC.Audio.CrossFadingRefClip.ChannelSamples => Samples.Length |
Definition at line 18 of file CrossFadingRefClip.cs.
|
private |
Definition at line 27 of file CrossFadingRefClip.cs.
|
private |
Definition at line 30 of file CrossFadingRefClip.cs.
|
private |
Definition at line 24 of file CrossFadingRefClip.cs.
|
private |
Definition at line 25 of file CrossFadingRefClip.cs.
|
private |
Definition at line 31 of file CrossFadingRefClip.cs.
override int BGC.Audio.CrossFadingRefClip.TotalSamples => Channels * Samples.Length |
Definition at line 17 of file CrossFadingRefClip.cs.
|
private |
Definition at line 29 of file CrossFadingRefClip.cs.
|
getprivate set |
Definition at line 22 of file CrossFadingRefClip.cs.
|
get |
Definition at line 20 of file CrossFadingRefClip.cs.