C# Class NScumm.Core.Audio.PCSpeaker

Inheritance: IAudioStream
ファイルを表示 Open project: scemino/nscumm Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
PCSpeaker ( int rate = 44100 ) : System
Play ( WaveForm wave, int freq, int length ) : void

Play a note for length ms.

If length is negative, play until told to stop.

ReadBuffer ( short buffer, int count ) : int
Stop ( int delay ) : void

Stop the currently playing note after delay ms.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
GenerateSaw ( int x, int oscLength ) : int
GenerateSine ( int x, int oscLength ) : int
GenerateSquare ( int x, int oscLength ) : int
GenerateTriangle ( int x, int oscLength ) : int

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

PCSpeaker() public method

public PCSpeaker ( int rate = 44100 ) : System
rate int
return System

Play() public method

Play a note for length ms.
If length is negative, play until told to stop.
public Play ( WaveForm wave, int freq, int length ) : void
wave WaveForm Wave form to play.
freq int Frequency.
length int Length in ms.
return void

ReadBuffer() public method

public ReadBuffer ( short buffer, int count ) : int
buffer short
count int
return int

Stop() public method

Stop the currently playing note after delay ms.
public Stop ( int delay ) : void
delay int Delay.
return void