C# Class DSPUtil.SoundBuffer

Inheritance: SoundObj, ISampleBuffer
Exibir arquivo Open project: hughpyle/inguz-DSPUtil Class Usage Examples

Public Methods

Method Description
ApplyGain ( double gain ) : void

Apply a gain (units) to the whole buffer.

ApplyWindow ( CosWindow window ) : void

Apply a window to the whole buffer.

MaxPos ( ) : int
MaxVal ( ) : double
Normalize ( double dBfs ) : double

Normalize the buffer so maximum value is at (dBfs)

Normalize ( double dBfs, bool doIt ) : double
PadTo ( int n ) : void
PadToPowerOfTwo ( ) : void
Read ( int n, int &nn, bool &moreSamples ) : ISample[]
ReadAll ( ) : int
ReadComplex ( int n, int &nn, bool &moreSamples ) : Complex[][]
ReadTo ( int n ) : bool
SampleSubset ( int start, int count ) : IEnumerator

Get an iterator for a subset of samples

Skip ( int n, int &nn, bool &moreSamples ) : void
SoundBuffer ( ) : System
SoundBuffer ( ISoundObj input ) : System
SoundBuffer ( List samples, ushort numChannels, uint sampleRate ) : System
Subset ( int start ) : ISoundObj
Subset ( int start, int count ) : ISoundObj
ToArray ( ) : ISample[]
ToArray ( int startPos ) : ISample[]
ToArray ( int startPos, int count ) : ISample[]
ToComplexArray ( ) : Complex[][]
ToComplexArray ( int startPos ) : Complex[][]
ToComplexArray ( int startPos, int count ) : Complex[][]
ToDoubleArray ( ) : double[][]

Return the buffer contents as an array of doubles

ToDoubleArray ( int startPos ) : double[][]

Return the buffer contents as an array of doubles

ToDoubleArray ( int startPos, int count ) : double[][]

Return the buffer contents as an array of doubles

this ( int arg ) : ISample

Private Methods

Method Description
FindMax ( ) : void

Method Details

ApplyGain() public method

Apply a gain (units) to the whole buffer.
public ApplyGain ( double gain ) : void
gain double units to scale by
return void

ApplyWindow() public method

Apply a window to the whole buffer.
public ApplyWindow ( CosWindow window ) : void
window CosWindow Cosine-based window to apply
return void

MaxPos() public method

public MaxPos ( ) : int
return int

MaxVal() public method

public MaxVal ( ) : double
return double

Normalize() public method

Normalize the buffer so maximum value is at (dBfs)
public Normalize ( double dBfs ) : double
dBfs double dB-of-fullscale for the new peak
return double

Normalize() public method

public Normalize ( double dBfs, bool doIt ) : double
dBfs double
doIt bool
return double

PadTo() public method

public PadTo ( int n ) : void
n int
return void

PadToPowerOfTwo() public method

public PadToPowerOfTwo ( ) : void
return void

Read() public method

public Read ( int n, int &nn, bool &moreSamples ) : ISample[]
n int
nn int
moreSamples bool
return ISample[]

ReadAll() public method

public ReadAll ( ) : int
return int

ReadComplex() public method

public ReadComplex ( int n, int &nn, bool &moreSamples ) : Complex[][]
n int
nn int
moreSamples bool
return Complex[][]

ReadTo() public method

public ReadTo ( int n ) : bool
n int
return bool

SampleSubset() public method

Get an iterator for a subset of samples
public SampleSubset ( int start, int count ) : IEnumerator
start int
count int Number to return
return IEnumerator

Skip() public method

public Skip ( int n, int &nn, bool &moreSamples ) : void
n int
nn int
moreSamples bool
return void

SoundBuffer() public method

public SoundBuffer ( ) : System
return System

SoundBuffer() public method

public SoundBuffer ( ISoundObj input ) : System
input ISoundObj
return System

SoundBuffer() public method

public SoundBuffer ( List samples, ushort numChannels, uint sampleRate ) : System
samples List
numChannels ushort
sampleRate uint
return System

Subset() public method

public Subset ( int start ) : ISoundObj
start int
return ISoundObj

Subset() public method

public Subset ( int start, int count ) : ISoundObj
start int
count int
return ISoundObj

ToArray() public method

public ToArray ( ) : ISample[]
return ISample[]

ToArray() public method

public ToArray ( int startPos ) : ISample[]
startPos int
return ISample[]

ToArray() public method

public ToArray ( int startPos, int count ) : ISample[]
startPos int
count int
return ISample[]

ToComplexArray() public method

public ToComplexArray ( ) : Complex[][]
return Complex[][]

ToComplexArray() public method

public ToComplexArray ( int startPos ) : Complex[][]
startPos int
return Complex[][]

ToComplexArray() public method

public ToComplexArray ( int startPos, int count ) : Complex[][]
startPos int
count int
return Complex[][]

ToDoubleArray() public method

Return the buffer contents as an array of doubles
public ToDoubleArray ( ) : double[][]
return double[][]

ToDoubleArray() public method

Return the buffer contents as an array of doubles
public ToDoubleArray ( int startPos ) : double[][]
startPos int Start position in the buffer
return double[][]

ToDoubleArray() public method

Return the buffer contents as an array of doubles
public ToDoubleArray ( int startPos, int count ) : double[][]
startPos int
count int Length of the return array (will be null-padded if count exceeds data size)
return double[][]

this() public method

public this ( int arg ) : ISample
arg int
return ISample