public OggStreamBuffer(Stream stream, Encoding textEncoding) { this.stream = stream; text_encoding = textEncoding; read = new OvReadFunc(Read); seek = new OvSeekFunc(Seek); close = new OvCloseFunc(Close); tell = new OvTellFunc(Tell); callbacks = new OvCallbacks(read, seek, close, tell); OvMarshal.ov_open_callbacks(new IntPtr(1), ref vorbis_file, IntPtr.Zero, 0, callbacks); handle_ovf = GCHandle.Alloc(vorbis_file, GCHandleType.Pinned); }
static internal extern C_INT ov_test_callbacks(IntPtr datasource, [In, Out] ref OggVorbisFile vf, C_CHARPTR initial, C_LONG ibytes, OvCallbacks callbacks);