Table of Contents

Class RawSourceWaveStream

Namespace
NAudio.Wave
Assembly
NAudio.Core.dll

WaveStream that simply passes on data from its source stream (e.g. a MemoryStream)

public class RawSourceWaveStream : WaveStream, IDisposable, IAsyncDisposable, IWaveProvider
Inheritance
RawSourceWaveStream
Implements
Inherited Members
Extension Methods

Constructors

RawSourceWaveStream(byte[], int, int, WaveFormat)

Initialises a new instance of RawSourceWaveStream

public RawSourceWaveStream(byte[] byteStream, int offset, int count, WaveFormat waveFormat)

Parameters

byteStream byte[]

The buffer containing raw audio

offset int

Offset in the source buffer to read from

count int

Number of bytes to read in the buffer

waveFormat WaveFormat

The waveformat of the audio in the source stream

RawSourceWaveStream(Stream, WaveFormat)

Initialises a new instance of RawSourceWaveStream

public RawSourceWaveStream(Stream sourceStream, WaveFormat waveFormat)

Parameters

sourceStream Stream

The source stream containing raw audio

waveFormat WaveFormat

The waveformat of the audio in the source stream

Properties

Length

The length in bytes of this stream (if supported)

public override long Length { get; }

Property Value

long

Position

The current position in this stream

public override long Position { get; set; }

Property Value

long

WaveFormat

The WaveFormat of this stream

public override WaveFormat WaveFormat { get; }

Property Value

WaveFormat

Methods

Read(byte[], int, int)

Reads data from the stream

public override int Read(byte[] buffer, int offset, int count)

Parameters

buffer byte[]
offset int
count int

Returns

int