|
BGC Tools
|
Stream that stores a mono sample buffer and scaling factors. Plays as a stereo stream. More...


Public Member Functions | |
| NormalizedMonoClip (float[] monoSamples, double leftFactor, double rightFactor) | |
| NormalizedMonoClip (float[] monoSamples, double presentationLevel) | |
| 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 void | Reset () |
| Sets this internal state of this stream to the initial state 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 | TotalSamples => 2 * Samples.Length |
| override int | ChannelSamples => Samples.Length |
| override int | Channels => 2 |
Data Fields inherited from BGC.Audio.BGCAudioClip | |
| float | Duration => ChannelSamples / SamplingRate |
| override float | SamplingRate => 44100f |
Protected Member Functions | |
| override void | _Initialize () |
Properties | |
| int | Position [get, set] |
| float [] | Samples [get] |
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 | |
| int | RemainingChannelSamples => Math.Max(0, Samples.Length - Position) |
| int | RemainingTotalSamples => 2 * RemainingChannelSamples |
| bool | factorsInitialized = false |
| float | leftFactor |
| float | rightFactor |
| readonly double | presentationLevel |
| IEnumerable< double > | _channelRMS = null |
Additional Inherited Members | |
Protected Attributes inherited from BGC.Audio.BGCStream | |
| bool | initialized = false |
Stream that stores a mono sample buffer and scaling factors. Plays as a stereo stream.
Definition at line 11 of file NormalizedMonoClip.cs.
|
inline |
Definition at line 30 of file NormalizedMonoClip.cs.
|
inline |
Definition at line 38 of file NormalizedMonoClip.cs.
|
inlineprotectedvirtual |
Reimplemented from BGC.Audio.BGCStream.
Definition at line 45 of file NormalizedMonoClip.cs.
References BGC.Audio.Normalization.GetMonoRMSScalingFactors().

|
inlinevirtual |
The RMS amplitude of each channel
Implements BGC.Audio.BGCStream.
Definition at line 87 of file NormalizedMonoClip.cs.
|
inlinevirtual |
Copy count samples into the Data buffer, starting at offset.
Implements BGC.Audio.BGCStream.
Definition at line 62 of file NormalizedMonoClip.cs.
References BGC.Mathematics.GeneralMath.Clamp().

|
virtual |
Sets this internal state of this stream to the initial state
Implements BGC.Audio.BGCStream.
|
virtual |
Seek to the indicated position in the stream
Implements BGC.Audio.BGCStream.
|
private |
Definition at line 86 of file NormalizedMonoClip.cs.
| override int BGC.Audio.NormalizedMonoClip.Channels => 2 |
Definition at line 20 of file NormalizedMonoClip.cs.
| override int BGC.Audio.NormalizedMonoClip.ChannelSamples => Samples.Length |
Definition at line 16 of file NormalizedMonoClip.cs.
|
private |
Definition at line 25 of file NormalizedMonoClip.cs.
|
private |
Definition at line 26 of file NormalizedMonoClip.cs.
|
private |
Definition at line 28 of file NormalizedMonoClip.cs.
|
private |
Definition at line 22 of file NormalizedMonoClip.cs.
|
private |
Definition at line 23 of file NormalizedMonoClip.cs.
|
private |
Definition at line 27 of file NormalizedMonoClip.cs.
| override int BGC.Audio.NormalizedMonoClip.TotalSamples => 2 * Samples.Length |
Definition at line 15 of file NormalizedMonoClip.cs.
|
getset |
Definition at line 13 of file NormalizedMonoClip.cs.
|
get |
Definition at line 18 of file NormalizedMonoClip.cs.
1.8.13