Exemplo n.º 1
0
 OggFormat(OggFormat cloneFrom)
 {
     stream = SegmentStream.CreateWithoutOwningStream(cloneFrom.stream, 0, (int)cloneFrom.stream.Length);
     reader = new VorbisReader(stream)
     {
         // Tell NVorbis to clip samples so we don't have to range-check during reading.
         ClipSamples = true
     };
 }
Exemplo n.º 2
0
        bool ISoundLoader.TryParseSound(Stream stream, out ISoundFormat sound)
        {
            try
            {
                sound = new OggFormat(stream);
                return(true);
            }
            catch
            {
                // Unsupported file
            }

            sound = null;
            return(false);
        }
Exemplo n.º 3
0
 public OggStream(OggFormat format)
 {
     this.format = format;
 }