Share via


AudioFile.Read(Int64, Byte[], Int32, Int32, Boolean) Method

Definition

Reads count bytes from buffer, starting at startingByte.

public int Read(long startingByte, byte[] buffer, int offset, int count, bool useCache);
member this.Read : int64 * byte[] * int * int * bool -> int

Parameters

startingByte
Int64

The starting byte in the file where the data will be read.

buffer
Byte[]

The buffer that holds the data.

offset
Int32

The offset within the buffer where the audio data will stored.

count
Int32

The number of bytes to read from the file.

useCache
Boolean

Whether the data should be cached.

Returns

The number of bytes read from the file, or -1 on error.

Remarks

This API merely reads bytes from the file without any encoding. Use any of the ReadPacketData to read with encoding.

Applies to