Xeno-rat
Loading...
Searching...
No Matches
NAudio.Wave.SimpleCompressorEffect Class Reference

A simple compressor. More...

Inheritance diagram for NAudio.Wave.SimpleCompressorEffect:
Collaboration diagram for NAudio.Wave.SimpleCompressorEffect:

Public Member Functions

 SimpleCompressorEffect (ISampleProvider sourceStream)
 Create a new simple compressor stream.
 
int Read (float[] array, int offset, int count)
 Reads audio samples from the source stream into the specified array.
 

Properties

double MakeUpGain [get, set]
 Make-up Gain.
 
double Threshold [get, set]
 Threshold.
 
double Ratio [get, set]
 Ratio.
 
double Attack [get, set]
 Attack time.
 
double Release [get, set]
 Release time.
 
bool Enabled [get, set]
 Turns gain on or off.
 
WaveFormat WaveFormat [get]
 Gets the WaveFormat of this stream.
 
- Properties inherited from NAudio.Wave.ISampleProvider

Private Attributes

readonly ISampleProvider sourceStream
 
readonly SimpleCompressor simpleCompressor
 
readonly int channels
 
readonly object lockObject = new object()
 

Detailed Description

A simple compressor.

Constructor & Destructor Documentation

◆ SimpleCompressorEffect()

NAudio.Wave.SimpleCompressorEffect.SimpleCompressorEffect ( ISampleProvider sourceStream)
inline

Create a new simple compressor stream.

Parameters
sourceStreamSource stream

Member Function Documentation

◆ Read()

int NAudio.Wave.SimpleCompressorEffect.Read ( float[] array,
int offset,
int count )
inline

Reads audio samples from the source stream into the specified array.

Parameters
arrayThe array to store the read samples.
offsetThe zero-based byte offset in array at which to begin storing the data read from the current stream.
countThe maximum number of samples to read.
Returns
The total number of samples read into the array.
Exceptions
System.IO.IOExceptionAn I/O error occurs while reading from the source stream.

This method locks the lockObject to ensure thread safety while reading from the source stream. It reads audio samples from the source stream into the specified array, processes them using the simple compressor if enabled, and returns the total number of samples read.

Implements NAudio.Wave.ISampleProvider.

Here is the call graph for this function:

Member Data Documentation

◆ channels

readonly int NAudio.Wave.SimpleCompressorEffect.channels
private

◆ lockObject

readonly object NAudio.Wave.SimpleCompressorEffect.lockObject = new object()
private

◆ simpleCompressor

readonly SimpleCompressor NAudio.Wave.SimpleCompressorEffect.simpleCompressor
private

◆ sourceStream

readonly ISampleProvider NAudio.Wave.SimpleCompressorEffect.sourceStream
private

Property Documentation

◆ Attack

double NAudio.Wave.SimpleCompressorEffect.Attack
getset

Attack time.

◆ Enabled

bool NAudio.Wave.SimpleCompressorEffect.Enabled
getset

Turns gain on or off.

◆ MakeUpGain

double NAudio.Wave.SimpleCompressorEffect.MakeUpGain
getset

Make-up Gain.

◆ Ratio

double NAudio.Wave.SimpleCompressorEffect.Ratio
getset

Ratio.

◆ Release

double NAudio.Wave.SimpleCompressorEffect.Release
getset

Release time.

◆ Threshold

double NAudio.Wave.SimpleCompressorEffect.Threshold
getset

Threshold.

◆ WaveFormat

WaveFormat NAudio.Wave.SimpleCompressorEffect.WaveFormat
get

Gets the WaveFormat of this stream.

Implements NAudio.Wave.ISampleProvider.


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