C# Class Translate.Services.Audio.WaveFormatEx

Class WAVEFORMATEX Implementation of a standard WAVEFORMATEX structure
Mostrar archivo Open project: nikhilk/silverlightfx Class Usage Examples

Public Methods

Method Description
AudioDurationFromBufferSize ( uint audioDataSize ) : long

Calculate the duration of audio based on the size of the buffer

BufferSizeFromAudioDuration ( long duration ) : long

Calculate the buffer size necessary for a duration of audio

SetFromByteArray ( byte byteArray ) : void

Set the data from a byte array (usually read from a file)

ToHexString ( ) : string

Convert the data to a hex string

ToLittleEndianString ( string bigEndianString ) : string

Convert a BigEndian string to a LittleEndian string

ToString ( ) : string

Ouput the data into a string.

ValidateWaveFormat ( ) : void

Validate that the Wave format is consistent.

Method Details

AudioDurationFromBufferSize() public method

Calculate the duration of audio based on the size of the buffer
public AudioDurationFromBufferSize ( uint audioDataSize ) : long
audioDataSize uint the buffer size in bytes
return long

BufferSizeFromAudioDuration() public method

Calculate the buffer size necessary for a duration of audio
public BufferSizeFromAudioDuration ( long duration ) : long
duration long the duration
return long

SetFromByteArray() public method

Set the data from a byte array (usually read from a file)
public SetFromByteArray ( byte byteArray ) : void
byteArray byte The array used as input to the stucture
return void

ToHexString() public method

Convert the data to a hex string
public ToHexString ( ) : string
return string

ToLittleEndianString() public static method

Convert a BigEndian string to a LittleEndian string
public static ToLittleEndianString ( string bigEndianString ) : string
bigEndianString string A big endian string
return string

ToString() public method

Ouput the data into a string.
public ToString ( ) : string
return string

ValidateWaveFormat() public method

Validate that the Wave format is consistent.
public ValidateWaveFormat ( ) : void
return void