Skip to content

WaveTypeBase

AutumnSky1010 edited this page Dec 15, 2022 · 6 revisions

Abstract class WaveTypeBase

Definition

Namespace: SoundMaker.Sounds.WaveTypes
Assembly: SoundMaker.dll

Provides a base class for a basic wave type to inherit from.

public abstract class WaveTypeBase

Inheritance

Object -> WaveTypeBase

Methods

GenerateWave(SoundFormat, int, int, double)

Declaration

public abstract ushort[] GenerateWave(SoundFormat format, int length, int volume, double hertz)

Parameters

Type Desctiption
SoundFormat The format of the sound.
int Length of the array.
int Volume.(0 ~ 100)
double Hertz of the sound.

Returns

Type Desctiption
ushort[] The array of wave data.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Length must be non-negative.
ArgumentOutOfRangeException Volume must be below than 100 and more than 0.
ArgumentOutOfRangeException Hertz must be non-negative and greater than 0.

[Obsolete]GenerateWave(SoundFormat, int, int, int, double)

Attention
GenerateWave(SoundFormat, int, int, int, double) will be deleted because int tempo is unnecessary argument.
Declaration

[Obsolete]
public abstract ushort[] GenerateWave(SoundFormat format, int tempo, int length, int volume, double hertz)

Parameters

Type Desctiption
SoundFormat The format of the sound.
int Quarter note/rest per minute.
int Length of the array.
int Volume.(0 ~ 100)
double Hertz of the sound.

Returns

Type Desctiption
ushort[] The array of wave data.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.
ArgumentOutOfRangeException Length must be non-negative.
ArgumentOutOfRangeException Volume must be below than 100 and more than 0.
ArgumentOutOfRangeException Hertz must be non-negative and greater than 0.

CheckGenerateWaveArgs(int, int, double)

Declaration

protected void CheckGenerateWaveArgs(int length, int volume, double hertz)

Parameters

Type Desctiption
int Length of the array.
int Volume.(0 ~ 100)
double Hertz of the sound.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Length must be non-negative.
ArgumentOutOfRangeException Volume must be below than 100 and more than 0.
ArgumentOutOfRangeException Hertz must be non-negative and greater than 0.

[Obsolete]CheckGenerateWaveArgs(int, int, int, double)

Declaration

[Obsolete]
protected void CheckGenerateWaveArgs(int tempo, int length, int volume, double hertz)

Parameters

Type Desctiption
int Quarter note/rest per minute.
int Length of the array.
int Volume.(0 ~ 100)
double Hertz of the sound.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.
ArgumentOutOfRangeException Length must be non-negative.
ArgumentOutOfRangeException Volume must be below than 100 and more than 0.
ArgumentOutOfRangeException Hertz must be non-negative and greater than 0.
Clone this wiki locally