C# Class OpenBve.WaveParser

Afficher le fichier Open project: leezer3/OpenBVE Class Usage Examples

Private Methods

Méthode Description
ConvertToMono ( WaveData data ) : WaveData

Converts the specified wave data to mono.

This function will try to mix the channels, but will revert to a single channel if silence, constructive or destructive interference is detected, or if the number of bits per channel exceeds 48.

ConvertToMono8Or16 ( WaveData data ) : WaveData

Converts the specified wave data to 8-bit or 16-bit mono.

If the bits per sample per channel are less than or equal to 8, the result will be 8-bit mono, otherwise 16-bit mono.

LoadFromFile ( string fileName ) : WaveData

Reads wave data from a RIFF/WAVE/PCM file.

Both RIFF and RIFX container formats are supported by this function.

ReadUInt16 ( BinaryReader reader, Endianness endianness ) : ushort

Reads a System.UInt16 from a binary reader with the specified endianness.

ReadUInt32 ( BinaryReader reader, Endianness endianness ) : uint

Reads a System.UInt32 from a binary reader with the specified endianness.