C# Class OpenBveApi.Sounds.Sound

Represents a sound.
Show file Open project: leezer3/OpenBVE Class Usage Examples

Public Methods

Method Description
Equals ( object obj ) : bool

Checks whether this instance is equal to the specified object.

Sound ( int sampleRate, int bitsPerSample, byte bytes ) : System

Creates a new instance of this class.

operator ( ) : bool

Checks whether two sound are equal.

Method Details

Equals() public method

Checks whether this instance is equal to the specified object.
public Equals ( object obj ) : bool
obj object The object.
return bool

Sound() public method

Creates a new instance of this class.
Raised when the number of samples per second is not positive. Raised when the number of bits per samples is neither 8 nor 16. Raised when the bytes array or any of its subarrays is a null reference. Raised when the bytes array does not contain any elements. Raised when the bytes' subarrays are of unequal length.
public Sound ( int sampleRate, int bitsPerSample, byte bytes ) : System
sampleRate int The number of samples per second.
bitsPerSample int The number of bits per sample. Allowed values are 8 or 16.
bytes byte The PCM sound data per channel. For 8 bits per sample, samples are unsigned from 0 to 255. For 16 bits per sample, samples are signed from -32768 to 32767 and in little endian byte order.
return System

operator() public static method

Checks whether two sound are equal.
public static operator ( ) : bool
return bool