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 }; }
bool ISoundLoader.TryParseSound(Stream stream, out ISoundFormat sound) { try { sound = new OggFormat(stream); return(true); } catch { // Unsupported file } sound = null; return(false); }
public OggStream(OggFormat format) { this.format = format; }