{"id":298592,"date":"2020-02-12T15:00:47","date_gmt":"2020-02-12T15:00:47","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298592"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298592","title":{"rendered":"\u041a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f Android"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/e-Legion\/blog\/487046\/\">\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432, \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0440\u0443\u0434\u043d\u0435\u0435. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u0434\u0435\u043a\u0430 Opus \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l8\/-k\/lq\/l8-klqqkp9qpzd5yia9aq2dcj8w.jpeg\" alt=\"image\"> <a name=\"habracut\"><\/a><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0432\u043e\u0435\u0439 <a href=\"https:\/\/m.vk.com\/@forasoft-kak-ispolzovat-nativnye-biblioteki-v-android\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u0434\u0435\u043a\u0430 <a href=\"http:\/\/opus-codec.org\/\">Opus<\/a> \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Android, \u043d\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 Opus, \u0430 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u041f\u043e-\u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0443\u0436\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 .so \u0438\u043b\u0438 .a, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u0445, \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0432\u0440\u0430\u043f\u043f\u0435\u0440\u044b \u043d\u0430 C\/C++ \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043f\u043e\u0439\u0434\u0451\u0442 \u0440\u0435\u0447\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u043e\u0433\u043e \u0436\u0435 \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u0434\u0435\u043a\u0430 Opus \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NDK \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 .so \u0438 .a, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 Android-\u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0440\u0430\u043f\u043f\u0435\u0440 \u043d\u0430 C\/C++, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u0430\u043c\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041c\u044b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0438 \u0441\u043e\u0431\u0435\u0440\u0451\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Opus \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e (.a).<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<p>\u041c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u043d\u0430\u0448\u0435\u043c C \u0444\u0430\u0439\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0430\u0439\u043b\u0430 \u043f\u0438\u0448\u0435\u043c <em>#include &lt;fileWithHeaders.h&gt;<\/em>. \u0414\u0430\u043b\u0435\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 C \u0444\u0430\u0439\u043b\u0430, \u0435\u0441\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f(.a), \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u043e <em>#include &lt;fileWithHeaders.h&gt;<\/em> \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f(.so), \u0442\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0430 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 .so \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430\u0448\u0435\u0439 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u0431\u044b Opus \u0431\u044b\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0451 \u043d\u0435\u0442 \u0432 Android, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0435\u0451 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430\u0448\u0435\u0433\u043e <strong>libjniopus.so<\/strong> \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <strong>libopus.a<\/strong>, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <strong>libopus.so<\/strong>. <\/p>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0432 NDK c \u0432\u0435\u0440\u0441\u0438\u0438 19 \u0435\u0441\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb. \u0412 <a href=\"https:\/\/developer.android.com\/ndk\/guides\/other_build_systems\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u043e\u043f\u0438\u0441\u0430\u043d\u043e, \u043a\u0430\u043a \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u043e\u043f\u044b\u0442\u0430 \u0432 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0451\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041a\u0430\u043a \u0438\u0445 \u0440\u0435\u0448\u0438\u0442\u044c, \u044f \u0440\u0430\u0437\u0431\u0435\u0440\u0443 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"sobiraem-opus-iz-ishodnikov\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c Opus \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438: \u043b\u0438\u0431\u043e \u0438\u0437 <a href=\"https:\/\/github.com\/xiph\/opus\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a> (git clone), \u043b\u0438\u0431\u043e \u0430\u0440\u0445\u0438\u0432\u043e\u043c. \u0423 Opus \u0435\u0441\u0442\u044c Autoconf \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 Autoconf \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c toolchain \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. Autoconf, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 Unix \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 Windows, \u0442\u043e \u0432\u0430\u043c, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c 4 \u0444\u0430\u0439\u043b\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .a \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430: armeabi-v7a, arm64-v8a, x86, x86-64.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0438 ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u041e\u0431\u0449\u0438\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e NDK, HOST_TAG \u0438 TOOLCHAIN. \u0412 Linux, ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 export:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">export NDK=\/home\/vital\/Android\/Sdk\/ndk\/20.1.5948944 export HOST_TAG=linux-x86_64 export TOOLCHAIN=$NDK\/toolchains\/llvm\/prebuilt\/$HOST_TAG<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043d\u0435\u0439. \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0435\u0441\u0441\u0438\u044e, \u0442\u043e \u0442\u0430\u043c \u044d\u0442\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0427\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043d\u043e\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 .bashrc, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 (~). \u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f .bashrc. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0451\u043c, \u0431\u0443\u0434\u0443\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u043e \u0432\u0441\u0435\u0445 \u0441\u0435\u0441\u0441\u0438\u044f\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430. \u0412\u043e\u0442 ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\"># arm64-v8a export AR=$TOOLCHAIN\/bin\/aarch64-linux-android-ar export AS=$TOOLCHAIN\/bin\/aarch64-linux-android-as export CC=$TOOLCHAIN\/bin\/aarch64-linux-android21-clang export CXX=$TOOLCHAIN\/bin\/aarch64-linux-android21-clang++ export LD=$TOOLCHAIN\/bin\/aarch64-linux-android-ld export RANLIB=$TOOLCHAIN\/bin\/aarch64-linux-android-ranlib export STRIP=$TOOLCHAIN\/bin\/aarch64-linux-android-strip  # armeabi-v7a export AR=$TOOLCHAIN\/bin\/arm-linux-androideabi-ar export AS=$TOOLCHAIN\/bin\/arm-linux-androideabi-as export CC=$TOOLCHAIN\/bin\/armv7a-linux-androideabi21-clang export CXX=$TOOLCHAIN\/bin\/armv7a-linux-androideabi21-clang++ export LD=$TOOLCHAIN\/bin\/arm-linux-androideabi-ld export RANLIB=$TOOLCHAIN\/bin\/arm-linux-androideabi-ranlib export STRIP=$TOOLCHAIN\/bin\/arm-linux-androideabi-strip  # x86 export AR=$TOOLCHAIN\/bin\/i686-linux-android-ar export AS=$TOOLCHAIN\/bin\/i686-linux-android-as export CC=$TOOLCHAIN\/bin\/i686-linux-android21-clang export CXX=$TOOLCHAIN\/bin\/i686-linux-android21-clang++ export LD=$TOOLCHAIN\/bin\/i686-linux-android-ld export RANLIB=$TOOLCHAIN\/bin\/i686-linux-android-ranlib export STRIP=$TOOLCHAIN\/bin\/i686-linux-android-strip  # x86-64 export AR=$TOOLCHAIN\/bin\/x86_64-linux-android-ar export AS=$TOOLCHAIN\/bin\/x86_64-linux-android-as export CC=$TOOLCHAIN\/bin\/x86_64-linux-android21-clang export CXX=$TOOLCHAIN\/bin\/x86_64-linux-android21-clang++ export LD=$TOOLCHAIN\/bin\/x86_64-linux-android-ld export RANLIB=$TOOLCHAIN\/bin\/x86_64-linux-android-ranlib export STRIP=$TOOLCHAIN\/bin\/x86_64-linux-android-strip<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434 arm64-v8a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0432 .bashrc \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 CC \u0438 CXX \u0435\u0441\u0442\u044c \u0446\u0438\u0444\u0440\u0430 21, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 Android API level. \u0422\u0430\u043a \u0438 \u0435\u0441\u0442\u044c, \u0430 \u0435\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0442\u043e\u0447\u043d\u0435\u0435, \u0442\u043e \u044d\u0442\u043e \u0432\u0430\u0448\u0430 minSdkVersion. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e 21, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043c\u0435\u043b\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c. \u0412 NDK \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u0435\u0440\u0441\u0438\u0438 \u0441 16 \u043f\u043e 29 \u0434\u043b\u044f 32-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 ABI (armeabi-v7a \u0438 x86) \u0438 \u0441 21 \u043f\u043e 29 \u0434\u043b\u044f 64-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0445 ABI (arm64-v8a \u0438 x86-64).<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 toolchain \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0434 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0438 \u0432\u044b\u043a\u0430\u0447\u0430\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 Opus. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c Readme \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 Opus \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430\u0434\u043e \u0432\u0441\u0435\u0433\u043e-\u043d\u0430\u0432\u0441\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/autogen.sh $ .\/configure $ make<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u043e\u0434 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u0434 4 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0432\u0430\u0439\u0441\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0412 NDK \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 r19 \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u0438\u0434\u0443\u0442 toolchains. \u041a\u0430\u043a \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430 <a href=\"https:\/\/developer.android.com\/ndk\/guides\/other_build_systems\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/a>, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 (\u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0438\u0445 \u0432\u044b\u0448\u0435 \u0432 .bashrc), \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 configure \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c host. \u0414\u043b\u044f arm64-v8a \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ source ~\/.bashrc $ .\/autogen.sh $ .\/configure --host aarch64-linux-android $ make<\/code><\/pre>\n<p>  <\/p>\n<p>source ~\/.bashrc \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u00ab\u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c\u00bb \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0435\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 Opus \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 <em>.libs<\/em>. \u0412 \u043d\u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c <strong>libopus.a<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 .bashrc \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u043c\/\u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0447\u0438\u0432\u0430\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0431\u044b\u043b\u0438 ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f armeabi-v7a, \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0443\u0436\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c host:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ source ~\/.bashrc $ .\/configure --host armv7a-linux-androideabi $ make<\/code><\/pre>\n<p>  <\/p>\n<p>.\/autogen.sh \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e configure, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 make \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u042f \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043b, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0442\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041f\u043e\u0438\u0441\u043a\u0430\u0432 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0444\u0430\u0439\u043b\u044b \u0438 \u0442\u0435\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 (\u0437\u0430\u043f\u0443\u0441\u043a configure \u0441 \u0434\u0440\u0443\u0433\u0438\u043c host). \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438, \u0438 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430\u0434\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u043e\u0442\u043e\u043c, \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c. \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 Opus. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0433\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435\u0433\u043e-\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c 4 \u043f\u0430\u043f\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c. \u042d\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u043b\u0433\u043e \u0438 \u0441\u043a\u0443\u0447\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c bash-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430 \u043d\u0430\u0441. \u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash export NDK=\/home\/vital\/Android\/Sdk\/ndk\/20.1.5948944 export HOST_TAG=linux-x86_64 export TOOLCHAIN=$NDK\/toolchains\/llvm\/prebuilt\/$HOST_TAG  if [[ $# -ne 3 &amp;&amp; $# -ne 2 ]]  then   echo &quot;You should specify at least minSdkVersion and path to Opus directory&quot;   echo &quot;Example .\/buildOpus.sh 21 &lt;pathToOpusDir&gt; &lt;pathToBuildDir&gt;&quot;   exit fi  # minSdkVersion that will used for complinig Opus source minSdk=$1  # Path to directory where Opus sources are located opusPath=$2  # Path to directory where to place build artifacts # By default it creates dir where this script is located if [[ $# -eq 3 ]] then   buildPath=$3 else   buildPath=.\/opus_android_build   if [[ -d $buildPath ]]; then     echo &quot;opus_android_build directory already existed...&quot;     echo &quot;clearing opus_android_build directory...&quot;     rm -rfv $buildPath &amp;&amp; mkdir $buildPath   else     echo &quot;creating opus_android_build directory...&quot;     mkdir opus_android_build   fi fi  echo &quot;Executing autogen.sh&quot; $opusPath\/autogen.sh  if [[ $minSdk -lt 21 ]] then   triples=(&quot;armv7a-linux-androideabi&quot; &quot;i686-linux-android&quot;)   abis=(&quot;armeabi-v7a&quot; &quot;x86&quot;) else   triples=(&quot;aarch64-linux-android&quot; &quot;armv7a-linux-androideabi&quot; &quot;i686-linux-android&quot; &quot;x86_64-linux-android&quot;)   abis=(&quot;arm64-v8a&quot; &quot;armeabi-v7a&quot; &quot;x86&quot; &quot;x86-64&quot;)   fi  BIN=$TOOLCHAIN\/bin cd $buildPath   for i in ${!triples[@]} do   triple=${triples[$i]}   abi=${abis[$i]}   echo &quot;Building $abi...&quot;    if [[ $triple == &quot;armv7a-linux-androideabi&quot; ]]   then     export AR=$BIN\/arm-linux-androideabi-ar     export AS=$BIN\/arm-linux-androideabi-as     export CC=$BIN\/$triple$minSdk-clang     export CXX=$BIN\/$triple$minSdk-clang++     export LD=$BIN\/arm-linux-androideabi-ld     export RANLIB=$BIN\/arm-linux-androideabi-ranlib     export STRIP=$BIN\/arm-linux-androideabi-strip   else     export AR=$BIN\/$triple-ar     export AS=$BIN\/$triple-as     export CC=$BIN\/$triple$minSdk-clang     export CXX=$BIN\/$triple$minSdk-clang++     export LD=$BIN\/$triple-ld     export RANLIB=$BIN\/$triple-ranlib     export STRIP=$BIN\/$triple-strip   fi    mkdir $abi &amp;&amp; cd $abi    $opusPath\/configure --host $triple   make   cd ..   done  echo &quot;Artifacts successfully built for minSdkVersion=$minSdk and ABIs:&quot;  printf '%s ' &quot;${abis[@]}&quot; echo &quot;&quot; echo &quot;Artifacts are located in .libs directory&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c ENV-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 .bashrc \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ sudo chmod +x buildOpus.sh<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a NDK \u043d\u0430 \u0432\u0430\u0448\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c HOST_TAG, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043d\u0430 Linux (\u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>linux-x86_64<\/strong>):<\/p>\n<p>  <\/p>\n<ul>\n<li>32-bit Windows: <strong>windows<\/strong><\/li>\n<li>64-bit Windows: <strong>windows-x86_64<\/strong><\/li>\n<li>macOS: <strong>darwin-x86_64<\/strong><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ .\/buildOpus.sh 21 &lt;pathToOpusDir&gt; &lt;pathToBuildDir&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c minSdkVersion \u0438 \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 Opus. \u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0435, \u043a\u0443\u0434\u0430 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 <em>opus_android_build<\/em> \u0432 \u043f\u0430\u043f\u043a\u0435, \u0433\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442 buildOpus.sh.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0437\u0430\u0439\u043c\u0451\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u041f\u043e\u0442\u043e\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 <em>opus_android_build<\/em> \u0438\u043b\u0438 \u0432 \u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438, \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u043f\u043a\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 ABI, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0430 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0430\u044f \u043d\u0430\u043c \u043f\u0430\u043f\u043a\u0430 <em>.libs<\/em>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0430\u0442 \u0432\u0441\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"dobavlyaem-sobrannye-biblioteki-v-proekt\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442<\/h3>\n<p>  <\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c 4 \u0444\u0430\u0439\u043b\u0430 libopus.a \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b, \u0441\u0430\u043c\u043e\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u043f\u043e\u0437\u0430\u0434\u0438. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u043d\u0430\u0448 Android-\u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c CmakeLists.txt, \u0447\u0442\u043e\u0431\u044b \u043a \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 .so \u043b\u0438\u043d\u043a\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430\u043c\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Opus.<\/p>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0430\u043f\u043a\u0430 <em>app\/src\/main\/cpp<\/em>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0448 C-\u0432\u0440\u0430\u043f\u043f\u0435\u0440 (jniopus.c), \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0438\u0434\u0443\u0442 external \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u0437 Kotlin. \u0412 \u043d\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u0430\u043f\u043a\u0443 includes. \u0417\u0430\u0442\u0435\u043c \u0432 \u043d\u0435\u0451 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043a\u0438 <em>include<\/em> \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 Opus. \u0422\u0430\u043c \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0445\u0435\u0434\u0435\u0440\u043e\u0432 (.h). \u041e\u043d\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b Opus \u0432 \u043d\u0430\u0448\u0435\u043c C-\u0432\u0440\u0430\u043f\u043f\u0435\u0440\u0435. \u0424\u0430\u0439\u043b\u044b \u0445\u0435\u0434\u0435\u0440\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0442\u0430 \u0438\u043b\u0438 \u0438\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 <em>app\/src\/main\/cpp<\/em> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <em>libopus<\/em>, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0451 4 \u043f\u0430\u043f\u043a\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c <a href=\"https:\/\/developer.android.com\/ndk\/guides\/abis\">ABI<\/a>, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Opus: armeabi-v7a, arm64-v8a, x86, x86-64. \u0412 \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0444\u0430\u0439\u043b <strong>libopus.a<\/strong>, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c <a href=\"https:\/\/github.com\/vitaliyFora\/AndroidOpus\/blob\/master\/app\/CMakeLists.txt\">CmakeLists.txt<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0433\u0434\u0435 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0438 Opus \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u00ab\u043f\u0440\u043e\u0441\u0442\u044b\u043d\u044e\u00bb \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043f\u0443\u0442\u044f\u043c\u0438 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c. \u0417\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0451\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0443\u0442\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"cmake\">set(NATIVE_SOURCES_PATH &quot;${PROJECT_SOURCE_DIR}\/src\/main\/cpp&quot;) set(OPUS_HEADERS_PATH &quot;${NATIVE_SOURCES_PATH}\/includes&quot;) set(OPUS_LIB_PATH &quot;${NATIVE_SOURCES_PATH}\/libopus&quot;)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Opus \u0432 \u0441\u0431\u043e\u0440\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"cmake\">add_library(         libopus         STATIC         IMPORTED)<\/code><\/pre>\n<p>  <\/p>\n<p>add_library \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0441\u0431\u043e\u0440\u043a\u0443. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0434\u0451\u0442 \u0438\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443 \u043d\u0435\u0451 \u0431\u0443\u0434\u0435\u0442, \u0434\u0430\u043b\u0435\u0435 \u0442\u0438\u043f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 STATIC(.a) \u0438\u043b\u0438 SHARED(.so) \u0438 \u043f\u0443\u0442\u044c \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c, \u043b\u0438\u0431\u043e \u0441\u043b\u043e\u0432\u043e IMPORTED, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0443\u0442\u044c \u043a \u0433\u043e\u0442\u043e\u0432\u044b\u043c (\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c) \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0438\u0436\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cmake\">set_target_properties( # Specifies the target library.         libopus PROPERTIES         IMPORTED_LOCATION &quot;${OPUS_LIB_PATH}\/${ANDROID_ABI}\/libopus.a&quot;)<\/code><\/pre>\n<p>  <\/p>\n<p>ANDROID_ABI \u044d\u0442\u043e NDK toolchain \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0442\u0443\u0434\u0430 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 ABI.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0421-\u0432\u0440\u0430\u043f\u043f\u0435\u0440\u0430, \u043a\u0443\u0434\u0430 \u0438\u0434\u0443\u0442 external \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u0437 Kotlin, \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cmake\">add_library( # Sets the name of the library.         jniopus          # Sets the library as a shared library.         SHARED          # Provides a relative path to your source file(s).         ${NATIVE_SOURCES_PATH}\/jniopus.c)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0434\u0451\u0442 \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u0432 NDK \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cmake\">find_library( # Sets the name of the path variable.         log-lib          # Specifies the name of the NDK library that         # you want CMake to locate.         log)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0432\u0441\u0451 \u044d\u0442\u043e \u0432\u043c\u0435\u0441\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cmake\">target_link_libraries(         # Specifies the target library.         jniopus          # Specifies the libraries that should be linked to our target         libopus ${log-lib})<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0438\u0434\u0451\u0442 \u0438\u043c\u044f \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0434\u0430\u043b\u0435\u0435 \u0438\u0434\u0443\u0442 \u0438\u043c\u0435\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c \u043a \u043d\u0430\u0448\u0435\u0439. \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Gradle, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Run, \u0438 \u0433\u043e\u0442\u043e\u0432\u043e. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0436\u043c\u0451\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 Start call \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u043c. \u0415\u0441\u043b\u0438 \u0442\u0443\u0442 \u0436\u0435 \u0441\u043b\u044b\u0448\u0438\u043c \u0442\u043e, \u0447\u0442\u043e \u0441\u043a\u0430\u0437\u0430\u043b\u0438, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<p>  <\/p>\n<h3 id=\"chto-poluchilos\">\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c<\/h3>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438, \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NDK toolchains \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 ABI \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0443 \u0441\u0435\u0431\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 CmakeLists.txt \u0438 \u0443\u0434\u0430\u043b\u0438\u043b\u0438 \u0432\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u042f \u043d\u0435 \u0441\u0442\u0430\u043b \u043e\u0441\u0432\u0435\u0449\u0430\u0442\u044c, \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0431\u0435\u0437 Autoconf \u0438 \u043a\u0430\u043a \u0431\u044b\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 pre-19 NDK, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0431\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u043e\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0438 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"ssylki\">\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u00ab\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 Android\u00bb: <a href=\"https:\/\/vk.com\/@forasoft-kak-ispolzovat-nativnye-biblioteki-v-android\">https:\/\/vk.com\/@forasoft-kak-ispolzovat-nativnye-biblioteki-v-android<\/a><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438: <a href=\"https:\/\/gitlab.com\/vitaliybelyaev\/opus-android\">https:\/\/gitlab.com\/vitaliybelyaev\/opus-android<\/a><\/p>\n<p>  <\/p>\n<p>Opus codec: <a href=\"http:\/\/opus-codec.org\/\">http:\/\/opus-codec.org\/<\/a>, <a href=\"https:\/\/github.com\/xiph\/opus\">https:\/\/github.com\/xiph\/opus<\/a><\/p>\n<p>  <\/p>\n<p>Using the NDK with other build systems: <a href=\"https:\/\/developer.android.com\/ndk\/guides\/other_build_systems\">https:\/\/developer.android.com\/ndk\/guides\/other_build_systems<\/a><\/p>\n<p>  <\/p>\n<p>Android-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e CMake: <a href=\"https:\/\/developer.android.com\/studio\/projects\/add-native-code#create-cmake-script\">https:\/\/developer.android.com\/studio\/projects\/add-native-code#create-cmake-script<\/a><\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 ABI \u043d\u0430 Android: <a href=\"https:\/\/developer.android.com\/ndk\/guides\/abis\">https:\/\/developer.android.com\/ndk\/guides\/abis<\/a><\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/e-Legion\/blog\/487046\/\"> https:\/\/habr.com\/ru\/company\/e-Legion\/blog\/487046\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/e-Legion\/blog\/487046\/\">\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u043e\u0432, \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0440\u0443\u0434\u043d\u0435\u0435. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0430\u0443\u0434\u0438\u043e\u043a\u043e\u0434\u0435\u043a\u0430 Opus \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l8\/-k\/lq\/l8-klqqkp9qpzd5yia9aq2dcj8w.jpeg\" alt=\"image\"> <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298592","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=298592"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298592\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}