public OvCallbacks(OvReadFunc read, OvSeekFunc seek, OvCloseFunc close, OvTellFunc tell)
 {
     ReadFunc  = read;
     SeekFunc  = seek;
     CloseFunc = close;
     TellFunc  = tell;
 }
 public OvCallbacks(OvReadFunc read, OvSeekFunc seek, OvCloseFunc close, OvTellFunc tell)
 {
     ReadFunc  = Marshal.GetFunctionPointerForDelegate(read);
     SeekFunc  = Marshal.GetFunctionPointerForDelegate(seek);
     CloseFunc = Marshal.GetFunctionPointerForDelegate(close);
     TellFunc  = Marshal.GetFunctionPointerForDelegate(tell);
 }
 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);
 }
Exemple #4
0
 public static extern int OggSetup(ref int channels, ref long rate, [MarshalAs(UnmanagedType.FunctionPtr)] OvReadFunc func);