public bool Identify(System.IO.Stream stream) { using (var reader = new Toolbox.Library.IO.FileReader(stream, true)) { return(reader.CheckSignature(4, "CSTM")); } }
public bool Identify(System.IO.Stream stream) { using (var reader = new Toolbox.Library.IO.FileReader(stream, true)) { bool IsValidSig = reader.CheckSignature(4, "WAVE"); //RIFF is also used in avi so just use WAVE bool IsValidExt = reader.CheckSignature(4, ".wav"); if (IsValidExt || IsValidSig) { return(true); } else { return(false); } } }
public bool Identify(System.IO.Stream stream) { using (var reader = new Toolbox.Library.IO.FileReader(stream, true)) { bool IsValidSig = reader.CheckSignature(4, "OggS"); bool IsValidExt = Utils.HasExtension(FileName, ".ogg"); if (IsValidExt || IsValidSig) { return(true); } else { return(false); } } }