BGC Tools
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes | Properties
BGC.Audio.SynthStream Class Referenceabstract
Inheritance diagram for BGC.Audio.SynthStream:
Inheritance graph
[legend]
Collaboration diagram for BGC.Audio.SynthStream:
Collaboration graph
[legend]

Public Member Functions

abstract IEnumerable< double > GetChannelRMS ()
 The RMS amplitude of each channel More...
 
abstract int Read (float[] data, int offset, int count)
 Copy count samples into the Data buffer, starting at offset. More...
 
abstract void Reset ()
 Sets this internal state of this stream to the initial state More...
 
abstract void Seek (int position)
 Seek to the indicated position in the stream More...
 
void Initialize ()
 Perform any calculations necessary to prepare the Stream More...
 

Data Fields

float SamplingRate => 44100f
 

Protected Member Functions

virtual void _Initialize ()
 

Protected Attributes

bool initialized = false
 

Properties

abstract int Channels [get]
 
abstract int TotalSamples [get]
 
abstract int ChannelSamples [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...
 

Detailed Description

Definition at line 5 of file SynthStream.cs.

Member Function Documentation

◆ _Initialize()

virtual void BGC.Audio.SynthStream._Initialize ( )
inlineprotectedvirtual

Reimplemented in BGC.Audio.Midi.MidiFileStream.

Definition at line 33 of file SynthStream.cs.

33 { }

◆ GetChannelRMS()

abstract IEnumerable<double> BGC.Audio.SynthStream.GetChannelRMS ( )
pure virtual

The RMS amplitude of each channel

Implements BGC.Audio.IBGCStream.

Implemented in BGC.Audio.Midi.MidiFileStream.

◆ Initialize()

void BGC.Audio.SynthStream.Initialize ( )
inline

Perform any calculations necessary to prepare the Stream

Implements BGC.Audio.IBGCStream.

Definition at line 23 of file SynthStream.cs.

24  {
25  if (!initialized)
26  {
27  initialized = true;
28  _Initialize();
29  }
30  }
virtual void _Initialize()
Definition: SynthStream.cs:33

◆ Read()

abstract int BGC.Audio.SynthStream.Read ( float []  data,
int  offset,
int  count 
)
pure virtual

Copy count samples into the Data buffer, starting at offset.

Returns
The number of samples copied

Implements BGC.Audio.IBGCStream.

Implemented in BGC.Audio.Midi.MidiFileStream.

◆ Reset()

abstract void BGC.Audio.SynthStream.Reset ( )
pure virtual

Sets this internal state of this stream to the initial state

Implements BGC.Audio.IBGCStream.

Implemented in BGC.Audio.Midi.MidiFileStream.

◆ Seek()

abstract void BGC.Audio.SynthStream.Seek ( int  position)
pure virtual

Seek to the indicated position in the stream

Implements BGC.Audio.IBGCStream.

Implemented in BGC.Audio.Midi.MidiFileStream.

Field Documentation

◆ initialized

bool BGC.Audio.SynthStream.initialized = false
protected

Definition at line 32 of file SynthStream.cs.

◆ SamplingRate

float BGC.Audio.SynthStream.SamplingRate => 44100f

Definition at line 13 of file SynthStream.cs.

Property Documentation

◆ Channels

abstract int BGC.Audio.SynthStream.Channels
get

Definition at line 7 of file SynthStream.cs.

◆ ChannelSamples

abstract int BGC.Audio.SynthStream.ChannelSamples
get

Definition at line 11 of file SynthStream.cs.

◆ TotalSamples

abstract int BGC.Audio.SynthStream.TotalSamples
get

Definition at line 9 of file SynthStream.cs.


The documentation for this class was generated from the following file: