Пример #1
0
 public bool Identify(System.IO.Stream stream)
 {
     using (var reader = new Toolbox.Library.IO.FileReader(stream, true))
     {
         return(reader.CheckSignature(4, "CSTM"));
     }
 }
Пример #2
0
        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);
                }
            }
        }
Пример #3
0
        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);
                }
            }
        }