コード例 #1
0
 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);
 }
コード例 #2
0
 public OvCallbacks(OvReadFunc read, OvSeekFunc seek, OvCloseFunc close, OvTellFunc tell)
 {
     ReadFunc  = read;
     SeekFunc  = seek;
     CloseFunc = close;
     TellFunc  = tell;
 }
コード例 #3
0
 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);
 }