Class WavInfo
Wav Info.
Inherited Members
Namespace: AudioAnalysisTools.DSP
Assembly: AudioAnalysisTools.dll
Syntax
public class WavInfo
Constructors
| Improve this Doc View SourceWavInfo()
Declaration
public WavInfo()
WavInfo(Double, Double, Double, TimeSpan, Int32)
Initializes a new instance of the WavInfo class. Create a sine wave.
Declaration
public WavInfo(double freq, double amp, double phase, TimeSpan duration, int sampleRate)
Parameters
Type | Name | Description |
---|---|---|
Double | freq | |
Double | amp | |
Double | phase | |
TimeSpan | duration | |
Int32 | sampleRate |
WavInfo(Double[], Double, Double, TimeSpan, Int32)
Initializes a new instance of the WavInfo class. Create a Sine wav with multiple frequencies.
Declaration
public WavInfo(double[] freq, double amp, double phase, TimeSpan duration, int sampleRate)
Parameters
Type | Name | Description |
---|---|---|
Double[] | freq | |
Double | amp | |
Double | phase | |
TimeSpan | duration | |
Int32 | sampleRate |
WavInfo(Double[], Int16, Int16, Int32)
Initializes a new instance of the WavInfo class. Create a wav info using data, channels, bits per sample and sample rate.
Declaration
public WavInfo(double[] rawData, short channels, short bitsPerSample, int sampleRate)
Parameters
Type | Name | Description |
---|---|---|
Double[] | rawData | Raw samples. |
Int16 | channels | Number of channels. |
Int16 | bitsPerSample | Bits per sample. |
Int32 | sampleRate | Sample rate. |
Properties
| Improve this Doc View SourceBitsPerSample
Gets or sets Bits per sample.
Declaration
public short BitsPerSample { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
BytesPerSample
Gets or sets bytes Per Sample / Block Align.
Declaration
public short BytesPerSample { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
BytesPerSecond
Gets or sets.
Declaration
public int BytesPerSecond { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Channels
Gets or sets Number of channels.
Declaration
public short Channels { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
CompressionCode
Gets or sets.
Declaration
public short CompressionCode { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Duration
Gets or sets.
Declaration
public TimeSpan Duration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Epsilon
Gets.
Declaration
public double Epsilon { get; }
Property Value
Type | Description |
---|---|
Double |
Frames
Declaration
public int Frames { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
SampleRate
Gets or sets Sample rate of audio.
Declaration
public int SampleRate { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Samples
Gets or sets.
Declaration
public double[] Samples { get; set; }
Property Value
Type | Description |
---|---|
Double[] |
SamplesSplit
Gets or sets.
Declaration
public short[][] SamplesSplit { get; set; }
Property Value
Type | Description |
---|---|
Int16[][] |
Methods
| Improve this Doc View SourceCalculateMaximumAmplitude(WavInfo)
Declaration
public static double CalculateMaximumAmplitude(WavInfo wavInfo)
Parameters
Type | Name | Description |
---|---|---|
WavInfo | wavInfo |
Returns
Type | Description |
---|---|
Double |
SubSample(WavInfo, Int32)
Subsamples audio.
Declaration
public static WavInfo SubSample(WavInfo wavInfo, int interval)
Parameters
Type | Name | Description |
---|---|---|
WavInfo | wavInfo | Wav info. |
Int32 | interval | Keeps every |
Returns
Type | Description |
---|---|
WavInfo |