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
data
Memory<byte>A Memory<T> containing the complete contents of a WAV file (RIFF header, fmt/data chunks, etc.).
Returns
- bool
true
ifdata
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
stringFile system path to the .wav file to validate.
Returns
- bool
true
if the file atpath
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
StreamStream containing WAV file data to validate. The stream will be read from its current position.
Returns
- bool
true
ifstream
can be parsed as a WAV file; otherwise,false
.