示例#1
0
        public unsafe static int ov_openFile(VFile f, OggVorbis_File vf)
        {
            vf.memset();
            ov_callbacks callbacks;

            callbacks.read_func  = Marshal.GetFunctionPointerForDelegate <ov_callbacks.ReadFuncDelegate>(FS_ReadOGG);
            callbacks.seek_func  = Marshal.GetFunctionPointerForDelegate <ov_callbacks.SeekFuncDelegate>(FS_SeekOGG);
            callbacks.close_func = Marshal.GetFunctionPointerForDelegate <ov_callbacks.CloseFuncDelegate>(FS_CloseOGG);
            callbacks.tell_func  = Marshal.GetFunctionPointerForDelegate <ov_callbacks.TellFuncDelegate>(FS_TellOGG);
            return(ov_open_callbacks(f, vf, null, -1, callbacks));
        }
示例#2
0
        public virtual void ClearDecoder()
        {
            ISystem.EnterCriticalSection(CRITICAL_SECTION.SECTION_ONE);
            switch (lastFormat)
            {
            case WAVE_FORMAT_TAG.PCM: break;

            case WAVE_FORMAT_TAG.OGG: ov_clear(ogg); ogg.memset(); break;
            }
            Clear();
            ISystem.LeaveCriticalSection(CRITICAL_SECTION.SECTION_ONE);
        }