예제 #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
     };
 }
예제 #2
0
        bool ISoundLoader.TryParseSound(Stream stream, out ISoundFormat sound)
        {
            try
            {
                sound = new OggFormat(stream);
                return(true);
            }
            catch
            {
                // Unsupported file
            }

            sound = null;
            return(false);
        }
예제 #3
0
 public OggStream(OggFormat format)
 {
     this.format = format;
 }