Method IsValidWaveFile
IsValidWaveFile(Memory<byte>)
Determines whether the specified in-memory buffer contains a valid WAV file.
public static bool IsValidWaveFile(Memory<byte> data)
Parameters
dataMemory<byte>A Memory<T> containing the complete contents of a WAV file (RIFF header, fmt/data chunks, etc.).
Returns
- bool
trueifdatacan 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
pathstringFile system path to the .wav file to validate.
Returns
- bool
trueif the file atpathis 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
streamStreamStream containing WAV file data to validate. The stream will be read from its current position.
Returns
- bool
trueifstreamcan be parsed as a WAV file; otherwise,false.