示例#1
0
        static NativeImage()
        {
            var handle = Native.GetLibraryHandle("image");

            stbi_load           = Native.LoadFunction <Delegates.stbi_load>(handle, nameof(stbi_load));
            stbi_image_free     = Native.LoadFunction <Delegates.stbi_image_free>(handle, nameof(stbi_image_free));
            stbi_failure_reason = Native.LoadFunction <Delegates.stbi_failure_reason>(handle, nameof(stbi_failure_reason));
            stbir_resize_uint8  = Native.LoadFunction <Delegates.stbir_resize_uint8>(handle, nameof(stbir_resize_uint8));
            stl_c_free          = Native.LoadFunction <Delegates.stl_c_free>(handle, nameof(stl_c_free));
            stl_c_alloc         = Native.LoadFunction <Delegates.stl_c_alloc>(handle, nameof(stl_c_alloc));
        }
示例#2
0
        static NativeAudio()
        {
            var handle = Native.GetLibraryHandle("audio");

            stl_c_free  = Native.LoadFunction <Delegates.stl_c_free>(handle, nameof(stl_c_free));
            stl_c_alloc = Native.LoadFunction <Delegates.stl_c_alloc>(handle, nameof(stl_c_alloc));
            stb_vorbis_decode_filename = Native.LoadFunction <Delegates.stb_vorbis_decode_filename>(handle, nameof(stb_vorbis_decode_filename));
            drwav_open_file_and_read_pcm_frames_s16 = Native.LoadFunction <Delegates.drwav_open_file_and_read_pcm_frames_s16>(handle, nameof(drwav_open_file_and_read_pcm_frames_s16));
            drwav_free = Native.LoadFunction <Delegates.drwav_free>(handle, nameof(drwav_free));
            drflac_open_file_and_read_pcm_frames_s16 = Native.LoadFunction <Delegates.drflac_open_file_and_read_pcm_frames_s16>(handle, nameof(drflac_open_file_and_read_pcm_frames_s16));
            drflac_free = Native.LoadFunction <Delegates.drflac_free>(handle, nameof(drflac_free));
            drmp3_open_file_and_read_f32 = Native.LoadFunction <Delegates.drmp3_open_file_and_read_f32>(handle, nameof(drmp3_open_file_and_read_f32));
            drmp3_free = Native.LoadFunction <Delegates.drmp3_free>(handle, nameof(drmp3_free));
        }