Table of Contents

Method IsValidWaveFile

Namespace
LMKit.Media.Audio
Assembly
LM-Kit.NET.dll

IsValidWaveFile(Memory<byte>)

Determines whether the specified in-memory buffer contains a valid WAV file.

public static bool IsValidWaveFile(Memory<byte> data)

Parameters

data Memory<byte>

A Memory<T> containing the complete contents of a WAV file (RIFF header, fmt/data chunks, etc.).

Returns

bool

true if data can be parsed as a WAV file; otherwise, false.

IsValidWaveFile(string)

Determines whether the WAV file at the specified path is valid.

public static bool IsValidWaveFile(string path)

Parameters

path string

File system path to the .wav file to validate.

Returns

bool

true if the file at path is a valid WAV file; otherwise, false.

IsValidWaveFile(Stream)

Determines whether the WAV data in the specified stream is valid.

public static bool IsValidWaveFile(Stream stream)

Parameters

stream Stream

Stream containing WAV file data to validate. The stream will be read from its current position.

Returns

bool

true if stream can be parsed as a WAV file; otherwise, false.