FixedWaveReader
public FixedWaveReader(string waveFile)
Language: C#
Supports opening a WAV file
public FixedWaveReader(Stream inputStream)
Language: C#
Creates a Wave File Reader based on an input stream
Parameters:
- inputStream: The input stream containing a WAV file including header
public List<RiffChunk> ExtraChunks { get; }
Language: C#
Gets a list of the additional chunks found in this file
public byte[] GetChunkData(RiffChunk chunk)
Language: C#
Gets the data for the specified chunk
public override WaveFormat WaveFormat
Language: C#
[<P:NAudio.Wave.WaveStream.WaveFormat" />
public override long Length
Language: C#
This is the length of audio data contained in this WAV file, in bytes
(i.e. the byte length of the data chunk, not the length of the WAV file itself)
[<P:NAudio.Wave.WaveStream.WaveFormat" />
public long SampleCount { get; }
Language: C#
Number of Sample Frames (if possible to calculate)
This currently does not take into account number of channels
Multiply number of channels if you want the total number of samples
public sealed override long Position { get; set; }
Language: C#
Position in the WAV data chunk.
[<P:System.IO.Stream.Position" />
public override int Read(byte[] array, int offset, int count)
Language: C#
Reads bytes from the Wave File
[<M:System.IO.Stream.Read(System.Byte[],System.Int32,System.Int32)" />
public float[] ReadNextSampleFrame()
Language: C#
Attempts to read the next sample or group of samples as floating point normalised into the range -1.0f to 1.0f
Returns: An array of samples, 1 for mono, 2 for stereo etc. Null indicates end of file reached ///
public bool TryReadFloat(out float sampleValue)
Language: C#
Attempts to read a sample into a float. n.b. only applicable for uncompressed formats
Will normalise the value read into the range -1.0f to 1.0f if it comes from a PCM encoding
Returns: False if the end of the WAV data chunk was reached