{"id":87065,"date":"2020-07-03T07:42:01","date_gmt":"2020-07-03T05:42:01","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/izuchaem-voip-dvizhok-mediastreamer2-chast-3"},"modified":"2020-07-03T07:42:01","modified_gmt":"2020-07-03T05:42:01","slug":"izuchaem-voip-dvizhok-mediastreamer2-chast-3","status":"publish","type":"post","link":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/izuchaem-voip-dvizhok-mediastreamer2-chast-3","title":{"rendered":"Uurime VoIP-mootorit Mediastreamer2. Osa 3","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Artikli materjal on saadud minu <noindex><a rel=\"nofollow\" href=\"https:\/\/zen.yandex.ru\/id\/5e3f8e0751f5346faab4fc7a\">Dzen-kanalist<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"Uurime VoIP-mootorit Mediastreamer2. Osa 3\" src=\"\/wp-content\/uploads\/2020\/07\/7c688fd21de37d61722c681961442e33.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<h2 id=\"uluchshaem-primer-tonalnogo-generatora\">Parandame tonal generaatori n\u00e4idet<\/h2>\n<p><\/p>\n<p>Eelnevas <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/495728\/\">artiklis<\/a><\/noindex> Me kirjutasime tonal generaatori rakenduse ja selle abil saime heli arvuti k\u00f5larist. N\u00fc\u00fcd p\u00f6\u00f6rame t\u00e4helepanu sellele, et meie programm l\u00f5petades ei tagasta m\u00e4lu tagasi kuhja. On aeg selgust tuua.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Kui skeem enam ei ole vajalik, peab m\u00e4lu vabastamine algama andmevoo peatamisest. Selleks tuleb skeemist lahti \u00fchendada kellageneraator, kas l\u00e4bi funktsiooni <em>ms_ticker_detach()<\/em>. Meie puhul peame kellageneraatori filtreerimise sisendist lahti \u00fchendama <em>voidsource<\/em>:<\/p>\n<p><\/p>\n<pre><code class=\"cpp\">ms_ticker_detach(ticker, voidsource)<\/code><\/pre>\n<p><\/p>\n<p>Muide, p\u00e4rast andmevoo peatamist saame muuta skeemi ja uuesti t\u00f6\u00f6le panna, \u00fchendades kellageneraatori tagasi.<\/p>\n<p><\/p>\n<p>N\u00fc\u00fcd saame selle eemaldada funktsiooni <em>ms_ticker_destroy()<\/em>:<\/p>\n<p><\/p>\n<pre><code class=\"cpp\">ms_ticker_destroy(ticker)<\/code><\/pre>\n<p><\/p>\n<p>Andmevoog on peatatud ja saame alustada selle osade lahtiv\u00f5tmist, filtreid lahti \u00fchendades. Selleks kasutatakse funktsiooni <em>ms_filter_unlink()<\/em>:<\/p>\n<p><\/p>\n<pre><code class=\"cpp\">ms_filter_unlink(voidsource, 0, dtmfgen, 0);\nms_filter_unlink(dtmfgen, 0, snd_card_write, 0);<\/code><\/pre>\n<p><\/p>\n<p>argumentide m\u00e4\u00e4ramine on sama, mis funktsioonil <em>ms_filter_link()<\/em>.<\/p>\n<p><\/p>\n<p>Eemaldame n\u00fc\u00fcd juba lahti \u00fchendatud filtrid kasutades <em>ms_filter_destroy()<\/em>:<\/p>\n<p><\/p>\n<pre><code class=\"cpp\">ms_filter_destroy(voidsource);\nms_filter_destroy(dtmfgen);\nms_filter_destroy(snd_card_write);<\/code><\/pre>\n<p><\/p>\n<p>Need read lisades meie n\u00e4itele saame korraliku m\u00e4lu juhtimise j\u00e4rgi programmi l\u00f5petamise.<\/p>\n<p><\/p>\n<p>Nagu n\u00e4eme, n\u00f5udis programmi \u00f5ige l\u00f5petamine, et lisada umbes sama palju koodiridasid kui alguses, ja keskmiselt pidi igale filtrile olema neli koodirida. Tundub, et programmi kood suurendab \u00f6\u00f6 jooksul proportsionaalselt projekti kasutatud filtrite arvuga. Kui r\u00e4\u00e4kida tuhandest filtrist skeemis, siis lisandub teie koodile neli tuhat rida rutiinselt opereerimist nende loomise ja h\u00e4vitamise kohta.<\/p>\n<p><\/p>\n<p>N\u00fc\u00fcd teate, kuidas \u00f5igesti l\u00f5petada programm, mis kasutab meediumivoogesitust. J\u00e4rgmistes n\u00e4idetes unustan ma selle tegemise l\u00fchiduse huvides. Aga teie ei unusta, eks?<\/p>\n<p><\/p>\n<p>Meediastrimmeri arendajad ei ole ette n\u00e4inud programme, mis lihtsustaksid filtrite k\u00e4sitlemist skeemide kokkupanemisel \/ lahtiv\u00f5tmisel. Sellegipoolest on seal abivahend, mis v\u00f5imaldab kiirelt filtreid skeemist sisse ja v\u00e4lja panna.<\/p>\n<p><\/p>\n<p>Tagastame sellele k\u00fcsimusele hiljem, kui meie n\u00e4idetes on filtreid \u00fcle paari k\u00fcmne.<\/p>\n<p><\/p>\n<p>J\u00e4rgmises <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/495982\/\">artiklis<\/a><\/noindex> Koostame signaalitaseme m\u00f5\u00f5turi skeemi ja \u00f5pime m\u00f5\u00f5tmistulemust filtrist lugema. Hindame m\u00f5\u00f5tmise t\u00e4psust.<\/p>\n<p>Allikas: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/495780\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0437\u044f\u0442 \u0441 \u043c\u043e\u0435\u0433\u043e \u0434\u0437\u0435\u043d-\u043a\u0430\u043d\u0430\u043b\u0430. \u0423\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u0437\u0432\u043b\u0435\u043a\u043b\u0438 \u0437\u0432\u0443\u043a \u0438\u0437 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443, \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043a\u0443\u0447\u0443. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u044f\u0441\u043d\u043e\u0441\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u0445\u0435\u043c\u0430 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":87066,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-87065","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0437\u044f\u0442 \u0441 \u043c\u043e\u0435\u0433\u043e \u0434\u0437\u0435\u043d-\u043a\u0430\u043d\u0430\u043b\u0430.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/izuchaem-voip-dvizhok-mediastreamer2-chast-3\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"et_EE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0418\u0437\u0443\u0447\u0430\u0435\u043c VoIP-\u0434\u0432\u0438\u0436\u043e\u043a Mediastreamer2. \u0427\u0430\u0441\u0442\u044c 3 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0437\u044f\u0442 \u0441 \u043c\u043e\u0435\u0433\u043e \u0434\u0437\u0435\u043d-\u043a\u0430\u043d\u0430\u043b\u0430.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/izuchaem-voip-dvizhok-mediastreamer2-chast-3\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-03T05:42:01+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-03T05:42:01+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Uurime VoIP-mootorit Mediastreamer2. Osa 3 | ProHoster","description":"Artikli materjal on v\u00f5etud minu zen-kanalist.","canonical_url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/izuchaem-voip-dvizhok-mediastreamer2-chast-3","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"et_EE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0418\u0437\u0443\u0447\u0430\u0435\u043c VoIP-\u0434\u0432\u0438\u0436\u043e\u043a Mediastreamer2. \u0427\u0430\u0441\u0442\u044c 3 | ProHoster","og:description":"\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u0437\u044f\u0442 \u0441 \u043c\u043e\u0435\u0433\u043e \u0434\u0437\u0435\u043d-\u043a\u0430\u043d\u0430\u043b\u0430.","og:url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/izuchaem-voip-dvizhok-mediastreamer2-chast-3","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-07-03T05:42:01+00:00","article:modified_time":"2020-07-03T05:42:01+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"87065","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 13:59:55","updated":"2022-10-02 12:50:43","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/87065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/comments?post=87065"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/87065\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media\/87066"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media?parent=87065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/categories?post=87065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/tags?post=87065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}