Skip to content

SquareSoundChannel

AutumnSky1010 edited this page Jun 15, 2024 · 6 revisions

Class SquareSoundChannel

Definition

Namespace: SoundMaker.Sounds.SoundChannels
Assembly: SoundMaker.dll

This generates square wave.

public class SquareSoundChannel : SoundChannelBase

Inheritance

Object -> SoundChannelBase -> SquareSoundChannel

Implements

Constructors

SquareSoundChannel(int, SoundFormat, PanType, int)

Declaration

public SquareSoundChannel(int tempo, SoundFormat format, PanType panType, int capacity)

Parameters

Type Desctiption
int Quarter note/rest per minute.
SoundFormat Format of the sound.
PanType Direction of hearing.
int The total number of sound components the internal data structure can hold without resizing.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.
ArgumentOutOfRangeException Index must be non-negative and greater than 0.

SquareSoundChannel(int, SoundFormat, PanType)

Declaration

public SquareSoundChannel(int tempo, SoundFormat format, PanType panType)

Parameters

Type Desctiption
int Quarter note/rest per minute.
SoundFormat Format of the sound.
PanType Direction of hearing.

Exceptions

Exception Desctiption
ArgumentOutOfRangeException Tempo must be non-negative and greater than 0.

Methods

GenerateWave()

Declaration

public override ushort[] GenerateWave()

Returns

Type Desctiption
ushort[] The array of wave data.
Clone this wiki locally