{"id":4420,"date":"2019-06-14T12:25:31","date_gmt":"2019-06-14T10:25:31","guid":{"rendered":"https:\/\/demdlx704as001.ad.harman.com\/?page_id=4420"},"modified":"2020-02-26T15:37:37","modified_gmt":"2020-02-26T14:37:37","slug":"audio-object-developers-guide","status":"publish","type":"page","link":"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420","title":{"rendered":"Audio Object Developers Guide"},"content":{"rendered":"<link rel='stylesheet' href='https:\/\/audioworx.transfunnel.co\/old\/wp-content\/plugins\/documentor\/skins\/mint\/style.css' type='text\/css' media='all' \/><div id=\"documentor-44\" class=\"documentor-mint documentor-wrap\" data-docid = \"44\" data-epid = \"4420\" ><div class=\"documentor-topicons doc-noprint\"><span class=\"doc-topiconswrap\"><a class=\"doc-print\" data-printspath=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/plugins\/documentor\/skins\/mint\/print.css\"> <span class=\"icon-print2 doc-icons\"><\/span> <\/span><\/a><\/span><div class=\"cleardiv\"><\/div><div class=\"clrright\"><\/div><\/div><div class=\"document-wrapper\"><div class=\"doc-menu toggle doc-noprint\"><span class=\"doc-search\">\n\t\t\t\t\t<input type=\"text\" name=\"search_document\" class=\"search-document\" placeholder=\"Search\" \/>\n\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/plugins\/documentor\/skins\/mint\/images\/search.png\" \/>\n\t\t\t\t<\/span><div class=\"doc-menurelated\"><ol class=\"doc-list-front\"><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#overview-and-scope-of-this-document-5\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#overview-and-scope-of-this-document-5\" data-sec-counter=\"1\" data-section-id=\"603\">Purpose of this Document<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#terms-and-abbreviations-8\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#terms-and-abbreviations-8\" data-sec-counter=\"1.1\" data-section-id=\"604\">Terms and Abbreviations<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#requirements\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#requirements\" data-sec-counter=\"1.2\" data-section-id=\"605\">Requirements<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#overview-8\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#overview-8\" data-sec-counter=\"2\" data-section-id=\"1732\">Overview<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-workflow\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-workflow\" data-sec-counter=\"2.1\" data-section-id=\"606\">Audio Object Workflow<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-class\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-class\" data-sec-counter=\"2.2\" data-section-id=\"638\">Audio Object Class<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-configuration\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-configuration\" data-sec-counter=\"3\" data-section-id=\"621\">Audio Object Configuration<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#basic-audio-object-design-time-configuration-2\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#basic-audio-object-design-time-configuration-2\" data-sec-counter=\"3.1\" data-section-id=\"1740\">Design Time Configuration<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#basic-audio-object-design-time-configuration\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#basic-audio-object-design-time-configuration\" data-sec-counter=\"3.1.1\" data-section-id=\"1739\">Object Description<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#mode-description\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#mode-description\" data-sec-counter=\"3.1.2\" data-section-id=\"1742\">Mode Description<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#getobjectio-description\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#getobjectio-description\" data-sec-counter=\"3.1.3\" data-section-id=\"1741\">GetObjectIO Description<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#metadata\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#metadata\" data-sec-counter=\"3.1.4\" data-section-id=\"639\">Metadata<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#static-metadata\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#static-metadata\" data-sec-counter=\"3.1.4.1\" data-section-id=\"640\">Static Metadata<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#dynamic-metadata\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#dynamic-metadata\" data-sec-counter=\"3.1.4.2\" data-section-id=\"641\">Dynamic Metadata<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#advanced-audio-object-design-time-configuration\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#advanced-audio-object-design-time-configuration\" data-sec-counter=\"3.2\" data-section-id=\"1743\">Advanced Design Time Configuration<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#input-to-design-tool\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#input-to-design-tool\" data-sec-counter=\"3.2.1\" data-section-id=\"622\">Additional Object Configuration<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#how-to-add-additional-variables-to-audio-object\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#how-to-add-additional-variables-to-audio-object\" data-sec-counter=\"3.2.2\" data-section-id=\"2319\">Adding Additional Variables to Audio Object<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-description-file-for-tuning-and-control\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-description-file-for-tuning-and-control\" data-sec-counter=\"3.2.3\" data-section-id=\"617\">Audio Object description file for tuning and control<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-memory\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-memory\" data-sec-counter=\"3.2.4\" data-section-id=\"629\">Audio Object Memory<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-memory-request\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-memory-request\" data-sec-counter=\"3.2.4.1\" data-section-id=\"611\">API<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#overview-2\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#overview-2\" data-sec-counter=\"3.2.4.2\" data-section-id=\"630\">Memory Configuration on GTT <\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#summary-of-steps-for-allocating-memory-for-xaf-processing\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#summary-of-steps-for-allocating-memory-for-xaf-processing\" data-sec-counter=\"3.2.4.3\" data-section-id=\"631\">Memory allocation in framework<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#guidelines-for-audio-object-memory-declaration\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#guidelines-for-audio-object-memory-declaration\" data-sec-counter=\"3.2.4.4\" data-section-id=\"632\">Audio Object Memory Declaration and Usage<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><\/ol><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#basic-features-and-apis\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#basic-features-and-apis\" data-sec-counter=\"4\" data-section-id=\"1733\">Basic Features and APIs<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-description\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-description\" data-sec-counter=\"4.1\" data-section-id=\"608\">Constructor<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#getsize\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#getsize\" data-sec-counter=\"4.2\" data-section-id=\"1763\">GetSize<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-init\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-init\" data-sec-counter=\"4.3\" data-section-id=\"612\">Init<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-calc\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-calc\" data-sec-counter=\"4.4\" data-section-id=\"613\">Calc<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audioobject-tunextp\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audioobject-tunextp\" data-sec-counter=\"4.5\" data-section-id=\"614\">TuneXTP<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-control\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-control\" data-sec-counter=\"4.6\" data-section-id=\"616\">Control<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#advanced-features-and-apis\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#advanced-features-and-apis\" data-sec-counter=\"5\" data-section-id=\"1734\">Advanced Features and APIs<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-additional-configuration\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-additional-configuration\" data-sec-counter=\"5.1\" data-section-id=\"610\">Audio Object Additional Configuration<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-sub-blocks\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-sub-blocks\" data-sec-counter=\"5.2\" data-section-id=\"609\">Audio Object Sub Blocks<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-ao-switch-processing-state\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-ao-switch-processing-state\" data-sec-counter=\"5.3\" data-section-id=\"1669\">Audio Object AO Switch Processing State<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-processing-states\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-processing-states\" data-sec-counter=\"5.3.1\" data-section-id=\"1668\">Audio Object Processing states<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#bypass\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#bypass\" data-sec-counter=\"5.3.2\" data-section-id=\"618\">Audio Object Bypass<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-mute\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-mute\" data-sec-counter=\"5.3.3\" data-section-id=\"1674\">Audio Object Mute<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-stop\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-stop\" data-sec-counter=\"5.3.4\" data-section-id=\"1673\">Audio Object Stop<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-ramp-up\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-ramp-up\" data-sec-counter=\"5.3.5\" data-section-id=\"1672\">Audio Object Ramp-Up<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-ramp-down\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-ramp-down\" data-sec-counter=\"5.3.6\" data-section-id=\"1671\">Audio Object Ramp-Down<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-ramp-down-up\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-ramp-down-up\" data-sec-counter=\"5.3.7\" data-section-id=\"1670\">Audio Object Ramp-DownUp<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#debug-and-monitoring\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#debug-and-monitoring\" data-sec-counter=\"5.4\" data-section-id=\"619\">Debug and Monitoring<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#live-streaming-of-state-variable-or-state-memory\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#live-streaming-of-state-variable-or-state-memory\" data-sec-counter=\"5.4.1\" data-section-id=\"637\">Live streaming of state variable or state memory<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#background-method\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#background-method\" data-sec-counter=\"5.5\" data-section-id=\"620\">Background Method<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-template\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-template\" data-sec-counter=\"6\" data-section-id=\"643\">Audio object Examples<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audioobject-example-template-cpp\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audioobject-example-template-cpp\" data-sec-counter=\"6.1\" data-section-id=\"729\">Example 1 - AwxAudioObjExt.cpp<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-example-templatewin32-cpp\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-example-templatewin32-cpp\" data-sec-counter=\"6.2\" data-section-id=\"730\">Example 2 - AwxAudioObjExtToolbox.cpp<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-example-templatememrecs-cpp\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-example-templatememrecs-cpp\" data-sec-counter=\"6.3\" data-section-id=\"2292\">Example 3 - AwxAudioObjExtMemRecs.cpp<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audioobject-example-template-h\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audioobject-example-template-h\" data-sec-counter=\"6.4\" data-section-id=\"731\">Example 4 - AwxAudioObjExt.h<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-example-templatetoolbox-h\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-example-templatetoolbox-h\" data-sec-counter=\"6.5\" data-section-id=\"2293\">Example 5 - AwxAudioObjExtToolbox.h<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#audio-object-example-templatememrecs-h\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#audio-object-example-templatememrecs-h\" data-sec-counter=\"6.6\" data-section-id=\"2294\">Example 6 - AwxAudioObjExtMemRecs.h<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#general-guidelines\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#general-guidelines\" data-sec-counter=\"7\" data-section-id=\"725\">General Guidelines<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#hardware-abstraction\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#hardware-abstraction\" data-sec-counter=\"7.1\" data-section-id=\"726\">Hardware Abstraction<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#hardware-abstraction-for-header-files\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#hardware-abstraction-for-header-files\" data-sec-counter=\"7.2\" data-section-id=\"1431\">Hardware Abstraction for Header files<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#memory-enums\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#memory-enums\" data-sec-counter=\"7.3\" data-section-id=\"727\">Memory Enums<\/a><div class=\"doc-menu-border\"><\/div><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#overlays-2\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#overlays-2\" data-sec-counter=\"7.4\" data-section-id=\"728\">Overlays<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#how-to-add-external-audio-object-into-audioworx-package\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#how-to-add-external-audio-object-into-audioworx-package\" data-sec-counter=\"8\" data-section-id=\"2321\">Adding external audio object into AudioworX package<\/a><span class=\"doc-mtoggle expand\"><\/span><div class=\"doc-menu-border\"><\/div><ol><li class=\"doc-actli\"><a class=\"documentor-menu\" href=\"#8-1-building-external-ao\"  style=\"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\" data-href=\"#8-1-building-external-ao\" data-sec-counter=\"8.1\" data-section-id=\"2323\">Building External AO<\/a><div class=\"doc-menu-border\"><\/div><\/li><\/ol><\/li><\/ol><\/div><\/div><div class=\"doc-sec-container\" id=\"documentor_seccontainer\"><div class=\"doc-sectionwrap\" id=\"overview-and-scope-of-this-document-5_wrap\"><div class=\"documentor-section  section-603\" id=\"overview-and-scope-of-this-document-5\" data-section-id=\"603\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">1.<\/span><span class=\"title-text\">Purpose of this Document<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#overview-and-scope-of-this-document-5')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This guide is intended to help developers in creating audio objects in the Extended Audio Framework (xAF). The framework act as a gateway between the audio object and the outside world.<\/p>\n<p>This guide covers the following topics:<\/p>\n<ul>\n<li>An overview on how audio objects interact with the framework, including the order in which the framework interacts with the audio object.<\/li>\n<li>Details on the audio object configuration in the design tool and how to set it up.<\/li>\n<li>Basic Features and APIs<\/li>\n<li>Advanced features and APIs.<\/li>\n<li>An example of a template audio object, which will include a reference implementation for all of the items mentioned above.<\/li>\n<li>An explanation of how to connect external audio objects to the framework.<\/li>\n<li>Information on the general guidelines that xAF objects should follow.<\/li>\n<\/ul>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on February 28, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"terms-and-abbreviations-8_wrap\"><div class=\"documentor-section  section-604\" id=\"terms-and-abbreviations-8\" data-section-id=\"604\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">1.1.<\/span><span class=\"title-text\">Terms and Abbreviations<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#terms-and-abbreviations-8')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p><span style=\"font-size: 14pt;\"><strong>Terms<\/strong><\/span><\/p>\n<ul>\n<li><strong>Global Tuning Tool (GTT):<\/strong> Global tuning tool is used to configure the audio algorithm framework seamlessly and intuitively, as well as to tune algorithm.<\/li>\n<li><strong>Run-Time:<\/strong> When a signal flow is deployed and running on a target device.<\/li>\n<li><strong>Design time<\/strong>: Design-time is referred when a signal flow is being designed in the GTT signal flow designer. At that point nothing is running on a target device.<\/li>\n<li><strong>Tuning variables\/Tuning parameters:<\/strong> These are the variables within audio objects that are modifiable through a set\/parameter file change. These variables are also modifiable from GTT at runtime. For example, a channel gain value within a gain object that can be modified during a set file change is considered a tuning variable.<\/li>\n<li><strong>State variables \/ State tuning parameters:<\/strong> These are the variables within audio objects that are modifiable at runtime from GTT or from other embedded code. These variables are not saved in a set \/ parameter file. For example, a channel volume value within a volume object that can be modified during runtime is considered a state variable.<\/li>\n<li><strong>Metadata:<\/strong> Metadata is data provided by the object developer to GTT at design time. This data is not used at runtime. It is usually provided in the object toolbox file which is compiled only for GTT. Examples of metadata the object will send GTT are:\n<ul>\n<li>Description of the object control inputs and outputs<\/li>\n<li>What processors the object is supported on<\/li>\n<li>What block sizes and sample rates the object can operate at<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"text\"><strong>Abbreviations<\/strong><\/p>\n<table style=\"width: 73.6132%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 48.4067%;\" width=\"276\">xAF: Extendable Audio Framework<\/td>\n<td style=\"width: 103.035%;\" width=\"288\">BAO: Basic Audio Object<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 48.4067%;\" width=\"276\">GTT: Global Tuning Tool<\/td>\n<td style=\"width: 103.035%;\" width=\"288\">SR: Sample Rate<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 48.4067%;\" width=\"276\">SFD: Signal Flow Designer<\/td>\n<td style=\"width: 103.035%;\" width=\"288\">BL: Block Length<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 48.4067%;\" width=\"276\">xTP: Extendable Tuning Protocol<\/td>\n<td style=\"width: 103.035%;\" width=\"288\">VST: Virtual Studio Technology<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 48.4067%;\">HU: Head Unit<\/td>\n<td style=\"width: 103.035%;\">AWX: AudioworX<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"requirements_wrap\"><div class=\"documentor-section  section-605\" id=\"requirements\" data-section-id=\"605\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">1.2.<\/span><span class=\"title-text\">Requirements<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#requirements')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This is the document that audio object developers should use as reference when creating audio objects for the xAF framework.<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 34px;\" border=\"1\">\n<thead>\n<tr style=\"height: 24px;\">\n<td class=\"table-head\"><strong>Req. ID<\/strong><\/td>\n<td class=\"table-head\"><strong>Req. Name<\/strong><\/td>\n<td class=\"table-head\"><strong>Description<\/strong><\/td>\n<td class=\"table-head\"><strong>Comment<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 10px;\">\n<td><span style=\"font-size: 12pt;\">CASCCGAF-210<\/span><\/td>\n<td><\/td>\n<td><span style=\"font-size: 12pt;\">Developers guide to create object for xAF document<\/span><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"overview-8_wrap\"><div class=\"documentor-section  section-1732\" id=\"overview-8\" data-section-id=\"1732\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">2.<\/span><span class=\"title-text\">Overview<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#overview-8')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The audio object developer must create the three classes listed below in order to create any new algorithms or audio objects.<\/p>\n<ul>\n<li>Audio object class that inherits <em>CAudioObject<\/em> base class.<\/li>\n<li>Audio object memory record class that inherits Audio object class and <em>CMemoryRecordProperties<\/em> base class.<\/li>\n<li>Audio object tool box class that inherits <em>CAudioObjectToolbox<\/em> base class and <em>Audio object memory<\/em> records class.<\/li>\n<\/ul>\n<p><span style=\"font-size: 14pt;\"><strong>Audio object Class<\/strong><\/span><\/p>\n<ul>\n<li><strong>CAudioObject:<\/strong> The <em>CAudioObject<\/em> base class has all the hooks to interact with the framework that in turn provides the hooks to the outside world. By inheriting <em>CAudioObject<\/em>, the audio object developer needs to simply implement the features they require for their new audio object and all the hooks would automatically be provided.<br \/>\nAdditionally, the <em>CAudioObject<\/em> provides default implementations, such as bypass, that the object developer would get without having to write any additional code.<\/li>\n<li><strong>CAudioObjectToolbox:<\/strong> By inheriting <em>CAudioObjectToolbox<\/em> all the hooks would automatically be provided to the tuning tool.<\/li>\n<li><strong>CMemoryRecordProperties:<\/strong>The <em>CMemoryRecordPropertie<\/em>s provides hooks to add memory records for generic and processor specific records.<\/li>\n<\/ul>\n<p>These classes should be declared in the separate header files.<\/p>\n<p class=\"note\">In this guide all examples and explanations are given for creating AudioworX objects based on source code. However, the audio object developer can still inherit the<em> CAudioObject<\/em> base class and implement its methods by calling methods of their own non-AudioworX ported libraries. As long as a public header file is provided and a library is linked, this approach is valid.<\/p>\n<p><span style=\"font-size: 14pt;\"><strong>Source Code Type<\/strong><\/span><\/p>\n<p>The audio object developer must split the implementation of these classes into at least three source code (cpp) files:<\/p>\n<ul>\n<li><strong>generic:<\/strong> This file implements generic source code (not processor specific) for the embedded functionalities, i.e. init, calc, tuneXTP etc.<\/li>\n<li><strong>toolbox:<\/strong> This source code file implements code that will only be used and compiled for use with GTT. This code will not be part of any embedded library. The contents of this file describe the interaction of the object in GTT during design time and provides metadata that will assist the user in configuring the object during signal flow design<\/li>\n<li><strong>memrecs:<\/strong> This source file implements the code to add memory records required for audio objects<\/li>\n<li><strong>processor:<\/strong> Processor specific optimizations are usually implemented in their own separate source code files that are only compiled for the given processor. These processor specific files will work in conjunction with the generic file and they do not have to re-write it.<\/li>\n<\/ul>\n<p>For example below is snapshot of files used in template audio object for Generic, Memory record, and Toolbox implementation.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-17104\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2020\/08\/TemplateFiles.jpg\" alt=\"\" width=\"328\" height=\"119\" \/><\/p>\n<p>Once the audio object development is complete, two libraries must be compiled:<\/p>\n<ul>\n<li>A toolbox one that will be loaded into GTT.<\/li>\n<li>A processor\/target specific one.<\/li>\n<\/ul>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 7, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-workflow_wrap\"><div class=\"documentor-section  section-606\" id=\"audio-object-workflow\" data-section-id=\"606\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">2.1.<\/span><span class=\"title-text\">Audio Object Workflow<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-workflow')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p class=\"heading\"><strong>Design Time Work flow<\/strong><\/p>\n<p>The work flow during design time is described below. Design time is when the user is creating a signal flow from the Signal Flow Design tool within GTT. These are the interactions that go on between the tool and dll loaded into the tool:<\/p>\n<p><img fetchpriority=\"high\" fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-17847 size-full\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/design-time-2-e1715060719902.jpg\" alt=\"\" width=\"1016\" height=\"680\" \/><\/p>\n<p class=\"heading\"><strong>Runtime Workflow<\/strong><\/p>\n<p>The workflow during runtime between the framework class, CAudioProcessing, and the audio objects base class, CAudioObject, is described below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-17738 size-full\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/AO-runtime-flow-2-e1715060753183.jpg\" alt=\"\" width=\"1028\" height=\"679\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 7, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-class_wrap\"><div class=\"documentor-section  section-638\" id=\"audio-object-class\" data-section-id=\"638\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">2.2.<\/span><span class=\"title-text\">Audio Object Class<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-class')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This section provides a description of the base class. The tables below show the class members and methods of <em>CAudioObject<\/em> class that a developer would need to use.<\/p>\n<p class=\"heading\"><strong>CAudioObject Members<\/strong><\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 386px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td class=\"table-head\" style=\"width: 27.2414%; height: 24px;\"><strong>Member<\/strong><\/td>\n<td class=\"table-head\" style=\"width: 72.7586%; height: 24px;\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_Owner<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the audio processing class that \u2018owns\u2019 this audio object.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_MemRecPtrs<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">m_MemRecPtrs\u00a0 is an array which has the address to the start of each record<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">tObjectProperties<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is a struct containing the object properties:<\/p>\n<ul>\n<li>Object type<\/li>\n<li>Number of audio inputs<\/li>\n<li>Number of audio outputs<\/li>\n<li>Number of elements<\/li>\n<li>Mode<\/li>\n<li>Name of the audio object<\/li>\n<li>Block ID<\/li>\n<li>*AdditionalVars<\/li>\n<li>SizeofAdditionalVars<\/li>\n<li>NumMemRecords<\/li>\n<li>*MemRecordsInfo<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_NumAudioIn<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the number of audio input channels.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_NumAudioOut<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the number of audio output channels.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_NumElements<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the number of elements (e.g., filters, taps) per channel.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_Mode<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the audio object mode. For example, Mode with a value of zero could represent a matrix mixer that operates on linear gains while mode one could represent a mixer that operates on a logarithmic scale.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"width: 27.2414%; height: 26px;\">m_AdditionalSFDConfig<\/td>\n<td style=\"width: 72.7586%; height: 26px;\">This is a pointer (void) to the additional data an object requires for configuration<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_BlockLength<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the block length in samples.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_Type<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the audio object type, defined in object properties.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_Name<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the name of the audio object.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_BlockID<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the ID of the block in a specific signal flow.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_NumControIn<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the number of control data input channels.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_NumControlOut<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">This is the number of control data output channels.<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 27.2414%; height: 24px;\">m_ControlConfig<\/td>\n<td style=\"width: 72.7586%; height: 24px;\">A list of audio objects and their control input channel numbers, where the current audio object\u2019s control output channels are connected in order. There are two elements for each control output channel:<\/p>\n<ul>\n<li>the destination audio object<\/li>\n<li>the destination control input channel number<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"heading\"><strong>CAudioObject Methods<\/strong><\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 1185px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 28px;\">\n<td class=\"table-head\" style=\"width: 27.0622%; height: 28px;\"><strong>Method<\/strong><\/td>\n<td class=\"table-head\" style=\"width: 72.9378%; height: 28px;\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 253px;\">\n<td style=\"width: 27.0622%; height: 253px;\">Constructor<\/td>\n<td style=\"width: 72.9378%; height: 253px;\">This sets the following:<\/p>\n<ul>\n<li>number of input and output audio channels<\/li>\n<li>number of elements<\/li>\n<li>object operation mode<\/li>\n<li>processing block length<\/li>\n<li>sample rate<\/li>\n<li>address<\/li>\n<li>memory table<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">assignAdditionalConfig()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">This dereferences the m_AdditionalVariables pointer to use the additional configuration parameters as needed.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">getSubBlockPtr()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">Retrieves pointer to the start of the subblock in the audio object.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">getSubBlockSize()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">Returns the size (in BYTES) of the sub block indicated by &#8216;subBlock&#8217; . subBlock is the ID of the state subBlock we want to get the size<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">init()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">This initializes all internal variable and parameters. This is called by CAudioProcessing::initAudioObjects().<\/td>\n<\/tr>\n<tr style=\"height: 107px;\">\n<td style=\"width: 27.0622%; height: 107px;\">calc()<\/td>\n<td style=\"width: 72.9378%; height: 107px;\">This function implements the module functionality or algorithm that runs every audio interrupt. Before calling this function m_Inputs &amp; m_Outputs objects to be set by CAudioProcessing object. This is called by CAudioProcessing::calcProcessing() for every frame interval.<\/td>\n<\/tr>\n<tr style=\"height: 80px;\">\n<td style=\"width: 27.0622%; height: 80px;\">tuneXTP()<\/td>\n<td style=\"width: 72.9378%; height: 80px;\">This performs any required operations after the parameter memory is updated. This is called by CAudioProcessing::setAudioObjectTuning() and is triggered by the tuning tool.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">setControlOut()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">This is a helper function for writing a value to one of the object\u2019s outputs.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">controlSet()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">This is called when controls like volume, bass, fade, RPM, and throttle are changed. These variables should live in state memory.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">getXmlSVTemplate()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">This function implements the generation of state variable templates used in the Device Description File on the computer.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">getXmlObjectTemplate()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">This function implements the generation of object templates used in the Device Description File on the computer.<\/td>\n<\/tr>\n<tr style=\"height: 80px;\">\n<td style=\"width: 27.0622%; height: 80px;\">getXmlFileInfo()<\/td>\n<td style=\"width: 72.9378%; height: 80px;\">This function generates the Device.ddf file through the SFD. This function is enabled only when generating Device Description Files on the computer.<\/td>\n<\/tr>\n<tr style=\"height: 53px;\">\n<td style=\"width: 27.0622%; height: 53px;\">getStateMemForLiveStreamingPtr()<\/td>\n<td style=\"width: 72.9378%; height: 53px;\">This function returns the address and length of the state variable for live streaming.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-configuration_wrap\"><div class=\"documentor-section  section-621\" id=\"audio-object-configuration\" data-section-id=\"621\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.<\/span><span class=\"title-text\">Audio Object Configuration<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-configuration')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Before any audio flow design can start, the design tool needs to know about the audio objects and how to interact with them. All objects must provide the information in the structures below, and expose them to the tool through dll calls. This dll is generated by the Visual Studio solution, VirtualAmp.<\/p>\n<p class=\"note\">This code will not be compiled in embedded libraries. It will only be compiled in the toolbox library targeted for GTT.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 8, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"basic-audio-object-design-time-configuration-2_wrap\"><div class=\"documentor-section  section-1740\" id=\"basic-audio-object-design-time-configuration-2\" data-section-id=\"1740\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.1.<\/span><span class=\"title-text\">Design Time Configuration<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#basic-audio-object-design-time-configuration-2')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The steps below are the minimum required to setup the configuration of an audio object that can be designed from SFD. The base class (<em>CAudioObject<\/em>) methods must be overridden and the framework will use these overridden methods to provide structures to inform\u00a0 <span class=\"bluet_tooltip tooltipy-kw tooltipy-kw-6829\" data-tooltip=\"6829\">SFD\u00a0<\/span> of your object&#8217;s settings. These methods are provided to GTT\/SFD via a DLL interface.<\/p>\n<ol>\n<li>Object Description<\/li>\n<li>Mode Description<\/li>\n<li>GetObjectIO Description<\/li>\n<\/ol>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"basic-audio-object-design-time-configuration_wrap\"><div class=\"documentor-section  section-1739\" id=\"basic-audio-object-design-time-configuration\" data-section-id=\"1739\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.1.1.<\/span><span class=\"title-text\">Object Description<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#basic-audio-object-design-time-configuration')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The designing of the audio object, start with configuring object descriptions.<\/p>\n<figure id=\"attachment_4653\" class=\"wp-caption alignnone\" style=\"width: 198px;\" aria-describedby=\"caption-attachment-4653\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4653 \" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/054-150x150.jpg\" alt=\"Object Description\" width=\"198\" height=\"198\" \/><figcaption id=\"caption-attachment-4653\" class=\"wp-caption-text\">Object Description<\/figcaption><\/figure>\n<p>The object description describes the default configuration of the object, when the object is dragged into signal flow designer view in GTT. Default configuration of the object will be Name, Description and Category of the object. Additionally, supported operating Modes and the objects required Additional configuration variables.<\/p>\n<p>The table provide details of description of variables :<\/p>\n<table class=\"mtr-table mtr-tr-td\" style=\"width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td class=\"table-head mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\"><strong>Member<\/strong><\/div>\n<\/td>\n<td class=\"table-head mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\"><strong>Description<\/strong><\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumAudioIn<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">This is the default number of audio inputs. It can be overridden as the object is configured.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumAudioOut<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">This is the default number of audio outputs. It can be overridden as the object is configured.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumControlIn<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">This is the default value, which can be overridden during the design of the audio object and refers to the number of input control signals an object receives.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumControlOut<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">Same as NumControlIn but for output.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">Name<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">This is a string with the name of the object.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">Description<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">This describes what the audio object does.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">Category<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">There are various categories in the SFD. This will sort the audio object under that category. For example, the category for a biquad object is &#8220;filter&#8221;<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumAdditionalVars<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">This is the number of additional variables an object needs for design configuration purposes. The minimum is 0<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" style=\"width: 23.1924%;\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">Mode<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" style=\"width: 75.8527%;\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">This is the number of modes the object supports. The minimum is 1.<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The object developer needs to set\u00a0<span class=\"emph\">m_Descriptions<\/span>\u00a0in the header file:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4654\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/055.jpg\" alt=\"\" width=\"630\" height=\"68\" \/><\/p>\n<p>Once the object description is set, developers need to override the virtual <span class=\"emph\">getObjectDescription<\/span> method inherited from the base class <em>CAudioObject<\/em>:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4656\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/057.jpg\" alt=\"\" width=\"363\" height=\"69\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 7, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"mode-description_wrap\"><div class=\"documentor-section  section-1742\" id=\"mode-description\" data-section-id=\"1742\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.1.2.<\/span><span class=\"title-text\">Mode Description<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#mode-description')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Once the object&#8217;s overall description is provided, a mode description has to be provided for every &#8220;Mode&#8221; supported by the object. This number is specified in the section above.<\/p>\n<p class=\"text\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-4652 size-full\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/053.jpg\" alt=\"Mode Description\" width=\"188\" height=\"151\" \/><\/p>\n<p class=\"text\">The table below provides a description of the variables required to describe each mode:<\/p>\n<table class=\"mtr-table mtr-tr-td\" border=\"1\">\n<tbody>\n<tr>\n<td class=\"table-head mtr-td-tag\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\"><strong>Member<\/strong><\/div>\n<\/td>\n<td class=\"table-head mtr-td-tag\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\"><strong>Description<\/strong><\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">Label<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">The label of the mode described in the subsequent fields.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">Description<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">Description of what this mode does.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumElementsMin<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">The minimum number of elements permitted.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumElementsMax<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">The maximum number of elements permitted.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">NumElementsLabel<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">The label for the number of elements. For example, the number of elements in the Parameter Biquad block represents the number of Biquad filters within the Biquad block. This field is populated with \u2019Number of Biquads\u2018 for the Biquad block.<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Member\">\n<div class=\"mtr-cell-content\">Mask<\/div>\n<\/td>\n<td class=\"mtr-td-tag\" data-mtr-content=\"Description\">\n<div class=\"mtr-cell-content\">\n<p>Four bits are used to indicate to GTT if it is possible to configure the audio channels and the number of elements (one for configurable):<\/p>\n<ul>\n<li>CFG_NCHANNEL \u2013 the number of input channels is equal to the output or not? (Xxxx)<\/li>\n<li>CFG_NINPUT \u2013 numAudioIn is variable? (xXxx)<\/li>\n<li>CFG_NOUTPUT \u2013 numAudioOut is variable? (xxXx)<\/li>\n<li>CFG_ELEMENT \u2013 numElements (LSB) is variable? (xxxX)<\/li>\n<li>CFG_NONE \u2013 no configuration<\/li>\n<\/ul>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The basic configuration information is written to the\u00a0<span class=\"emph\">m_Descriptions<\/span>\u00a0variable in the audio object header file. The\u00a0<span class=\"emph\">tObjectDescription<\/span> structure displays all the variables necessary for configuration that are not dependent on the mode of the object.<\/p>\n<p>For a mode dependent description, the\u00a0<em><strong>tModeDescription<\/strong><\/em> needs to be provided. The example below describes and object that has 2 modes.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4655\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/056.jpg\" alt=\"\" width=\"555\" height=\"90\" \/><\/p>\n<p>Once the mode description(s) is set, developers need to override the virtual <strong><em>getModeDescription<\/em><\/strong>\u00a0method inherited from the base class <em><strong>CAudioObject.<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4657\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/058.jpg\" alt=\"\" width=\"762\" height=\"70\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 8, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"getobjectio-description_wrap\"><div class=\"documentor-section  section-1741\" id=\"getobjectio-description\" data-section-id=\"1741\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.1.3.<\/span><span class=\"title-text\">GetObjectIO Description<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#getobjectio-description')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Additionally, developers must implement a function for each audio object that describes the audio and control I\/O, based on what they configured in the design tool. This function interacts with the object through the <em>dll<\/em> described above. The code below shows an example of this function implemented for the merger object that always has zero controls and only number of audio inputs is configurable.\u00a0 The number of outputs is dictated by the number of audio inputs as seen below.<\/p>\n<pre>xAF_Error CMergerToolbox::getObjectIo(ioObjectConfigOutput* configOut)\r\n{\r\nconfigOut-&gt;numAudioOut = m_NumAudioIn + 1;\r\nconfigOut-&gt;numControlIn = 0;\r\nconfigOut-&gt;numControlOut = 0;\r\n\r\nreturn xAF_SUCCESS;\r\n}<\/pre>\n<p>This method may rely on the following member variables depending on the object mask.<\/p>\n<ul>\n<li>m_NumAudioIn<\/li>\n<li>m_NumAudioOut<\/li>\n<li>m_NumElements<\/li>\n<li>m_Mode<\/li>\n<li>m_AdditionalSFDConfig<\/li>\n<\/ul>\n<p><strong><em>configOut<\/em><\/strong> is made up of the settings returned by the getObjectIo() function and is composed of:<\/p>\n<ul>\n<li>numAudioInputs<\/li>\n<li>numAudioOutputs<\/li>\n<li>numControlIn<\/li>\n<li>numControlOut<\/li>\n<\/ul>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 8, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"metadata_wrap\"><div class=\"documentor-section  section-639\" id=\"metadata\" data-section-id=\"639\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.1.4.<\/span><span class=\"title-text\">Metadata<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#metadata')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The Metadata is design-time information of the audio objects use to describe their features and attributes. Metadata is stored in the audio object code. This information can be used to convey memory usage or to check compatibility between the audio objects.<br \/>\nIt also provides the tool with constraints on parameters, and information describing controls and audio channels.<\/p>\n<p>There are three types of metadata:<\/p>\n<ul>\n<li>Dynamic: The dynamic accepts numerous configuration parameters and provides data specific to those parameters.<\/li>\n<li>Static: The static data is constant, it does not take in any parameters.<\/li>\n<li>Real-time: The real-time metadata specific to a connected target device.<\/li>\n<\/ul>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 8, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"static-metadata_wrap\"><div class=\"documentor-section  section-640\" id=\"static-metadata\" data-section-id=\"640\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.1.4.1.<\/span><span class=\"title-text\">Static Metadata<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#static-metadata')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The Static Metadata represents data that will not change based on configuration. It is provided as is.<\/p>\n<p>There are two API methods related to this feature.<\/p>\n<ul>\n<li>createStaticMetadata<\/li>\n<li>getStaticMetadata<\/li>\n<\/ul>\n<pre class=\"text\">virtual void createStaticMetadata();\r\nstaticMetadata getStaticMetadata() { return m_StaticMetadata; }<\/pre>\n<p class=\"heading\"><strong>Create Static Metadata<\/strong><\/p>\n<p>This method is intended to be overwritten by each instance of <strong>AudioObject<\/strong>. The goal is to populate the protected member <strong>m_StaticMetadata<\/strong>. There is an example of how to do this in <strong>AudioObject.cpp<\/strong>. The basic audio objects included within xAF also implement this method appropriately.<\/p>\n<p>This method should be overridden by any object updating to the new API. Here are the relevant details:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-23310 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/static_metadata_structure.jpg\" alt=\"\" width=\"878\" height=\"524\" \/><\/p>\n<ul>\n<li><strong>minReqXafVersion<\/strong> \u2013 set this to an integer which is related to the major version of xAF. (ACDC == 1, Beatles == 2, etc)<\/li>\n<li><strong>isExtendedObjIdRequired<\/strong> \u2013 false for most objects. This flag enables support for more than 256 subblocks.<\/li>\n<li><strong>supSampleRates<\/strong> \u2013 list of all supported samples rates (leave blank if there are no restrictions)<\/li>\n<li><strong>supBlockSizes<\/strong> \u2013 list of all supported block sizes (leave blank if there are no restrictions)<\/li>\n<li><strong>supDataFormats<\/strong> \u2013 list of supported calcObject data formats (leave blank if there are no restrictions)<\/li>\n<li><strong>audioObjectVersion<\/strong> \u2013 Condensed three part version number. Created with helper method :\n<ul>\n<li>void setAudioObjectVersion(unsigned char major, unsigned char minor, unsigned char revision)<\/li>\n<li>It is up to audio object to determine how to manage these versions.<\/li>\n<\/ul>\n<\/li>\n<li><strong>tuningVersion<\/strong> \u2013 Condensed two part version number. Created with helper method :\n<ul>\n<li>Void setTuningVersion(unsigned char major, unsigned char minor)<\/li>\n<li>These version numbers must only be changed when appropriate!!<\/li>\n<li>Follow these rules:\n<ul>\n<li>Increment minor version when new release has *additional* tuning but previous tuning data can still be loaded successfully.<\/li>\n<li>Increment major reversion when the new release is not compatible at all with previous tuoid setTuning data.<\/li>\n<li>If tuning structure does not change, do not change this version<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>authorList<\/strong> \u2013 fill with list of authors if desired<\/li>\n<li><strong>creationDay<\/strong> \u2013 date of creation for the object<\/li>\n<li><strong>certified<\/strong> \u2013 whether this object has undergone certification<\/li>\n<li><strong>inPlaceComputationEnabled<\/strong> \u2013 whether this object requires input and output buffers to be the same (see below)<\/li>\n<li><strong>isAddVarUpdateRequired<\/strong> \u2013 whether the tuning tool should assume additional vars can change any time main object parameters are updated.\n<ul>\n<li>Set this to true if your additional variable sizes are based in some way on inputs.<\/li>\n<li>Example: Number of Input channels is configurable by the user &#8211; and the first additional variable size is always equal to the number of input channels.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"heading\"><strong>Get Static Metadata<\/strong><\/p>\n<p class=\"text\">This method simply returns a copy of <strong><em>m_StaticMetadata<\/em><\/strong>. It is not virtual.<\/p>\n<p class=\"heading\"><strong>In-Place Computation<\/strong><\/p>\n<p class=\"note\">This will be deprecated here and moved to dynamic metadata, to support a target\/core specific implementation. The static member will be kept for backward compatibility reasons only and will be deprecated after some time.<br \/>\n<span class=\"emph\">Do not use this struct member in future implementations!<\/span><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 8, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"dynamic-metadata_wrap\"><div class=\"documentor-section  section-641\" id=\"dynamic-metadata\" data-section-id=\"641\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.1.4.2.<\/span><span class=\"title-text\">Dynamic Metadata<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#dynamic-metadata')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Dynamic metadata creation is similiar to static, but accepts arguments for the creation process, hence the <strong><em>dynamic<\/em><\/strong>. The object receives all configuration data being considered (in most cases this would be by GTT) and writes relevant information to the member <em><strong>m_DynamicMetadata<\/strong><\/em> in response.<\/p>\n<pre class=\"text\">virtual void createDynamicMetadata(ioObjectConfigInput&amp; configIn, ioObjectConfigOutput&amp; configOut);\r\ndynamicMetadata getDynamicMetadata() { return m_DynamicMetadata; }<\/pre>\n<p class=\"heading\"><strong>Create Dynamic Metadata<\/strong><\/p>\n<p><em><strong>createDynamicMetadata<\/strong><\/em> is called after a successful call to <strong><em>getObjectIo<\/em><\/strong>. It can further restrict values in the <strong><em>ioObjectConfigOutput<\/em><\/strong> struct. All required information is passed in with <strong><em>configIn<\/em><\/strong>.<\/p>\n<ul>\n<li><strong>audioIn &amp; audioOut<\/strong> \u2013 instances of type metaDataDescription which label and set restrictions for inputs and outputs. Label need not be specified if a generic label will suffice. (eg: Input 1) If not, supply a label for each input and output.<\/li>\n<li><strong>controlIn &amp; controlOut<\/strong> \u2013 are vectors of type metaDataControlDescription which label and specify value ranges for each control input. The number of controls is dictated by other. parameters, so we don\u2019t have to bound the min and max. Note: Min and Max are not enforced, they are only informative to the user.<\/li>\n<li><strong>estMemory<\/strong> \u2013 Estimated memory consumption for the current configuration (in bytes).<\/li>\n<li><strong>estMIPS<\/strong> \u2013 estimated consumption of processor (in millions of cycles per second, so not really MIPS).<\/li>\n<\/ul>\n<p class=\"heading\"><strong>Get Dynamic Metadata<\/strong><\/p>\n<p class=\"text\">This method simply returns a copy of <strong><em>m_DynamicMetadata<\/em><\/strong>. Note that it is not virtual.<\/p>\n<p class=\"heading\"><strong>Description of Structures<\/strong><\/p>\n<p>These structures are used by the tool during signal design. The input configuration struct holds all *attempted* parameters, the output struct is used to constrain audio inputs and outputs and report the correct number of control inputs and outputs.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/dynamic_metadata_structure.jpg\" alt=\"\" width=\"791\" height=\"246\" \/><\/p>\n<p class=\"heading\"><strong>In-Place Computation<\/strong><\/p>\n<p>This feature allows Audio Objects to give the GTT the ability to operate in in-place computation mode. In this mode, the audio object uses the same buffers for input and output. This option has been moved from static metadata to dynamic metadata to support a kernel-based decision. This allows the AO developer to decide, based on the target architecture, whether or not it is beneficial to run the calc function in-place.<\/p>\n<p>GTT analyses the signal flow and calculates the amount of buffers required for the given signal flow. If <strong><em>isInplaceComputationSupported<\/em><\/strong> is set by the audio object developer, GTT tells the framework to allocate only input buffers only.<\/p>\n<p>The <em><strong>isInplaceComputationSupported<\/strong><\/em> flag can be checked in the the audio object&#8217;s dynamic metadata.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/dynamic_metadata_in-place.jpg\" alt=\"\" width=\"444\" height=\"492\" \/><\/p>\n<p>For example,\u00a0 Gain configured for 6 channels :<\/p>\n<ul>\n<li>If isInplaceComputationSupported is not set, it will use a total of 12 buffers.<\/li>\n<li>If isInplaceComputationSupported is set, it will use a total of 6 buffers.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12940\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/05\/IndicesWithInPlace.png\" alt=\"\" width=\"448\" height=\"188\" \/>\u00a0 \u00a0 \u00a0 <img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-12942\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/05\/WihoutInPlace.png\" alt=\"\" width=\"451\" height=\"189\" \/><\/p>\n<p>In-place computation feature has the following benefits:<\/p>\n<ul>\n<li>reduces flash size.<\/li>\n<li>reduces number of IO streams which improves the memory performance on embedded.<\/li>\n<\/ul>\n<p class=\"note\">Current Limitation or Additional conditions<\/p>\n<p>An Audio Object Marked is considered for in-place has to satisfy following three conditions:<\/p>\n<ul>\n<li>Audio Object should have dynamic metadata flag isInplaceComputationSupported set to true for the selected core type.<\/li>\n<li>Audio Object should have equal number of input and output pins.<\/li>\n<li>All audio pins should be connected.<\/li>\n<\/ul>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 8, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"advanced-audio-object-design-time-configuration_wrap\"><div class=\"documentor-section  section-1743\" id=\"advanced-audio-object-design-time-configuration\" data-section-id=\"1743\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.<\/span><span class=\"title-text\">Advanced Design Time Configuration<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#advanced-audio-object-design-time-configuration')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"input-to-design-tool_wrap\"><div class=\"documentor-section  section-622\" id=\"input-to-design-tool\" data-section-id=\"622\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.1.<\/span><span class=\"title-text\">Additional Object Configuration<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#input-to-design-tool')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><div id=\"description-4_wrap\" class=\"doc-sectionwrap\">\n<div id=\"description-4\" class=\"documentor-section section-1881\" data-section-id=\"1881\">\n<div class=\"documentor-social doc-noprint\"><\/div>\n<div class=\"doc-sec-content\">\n<p>Additional configuration variables are optional parameters that are needed if a specific object\/algorithm needs configuration parameters beyond the default ones. Objects by\u00a0<strong>default<\/strong>\u00a0have configuration for (as mentioned above):<\/p>\n<ul>\n<li>Channels<\/li>\n<li>Elements<\/li>\n<li>Modes<\/li>\n<\/ul>\n<p>An object can chose to utilize all the default variables or not. However if the object needs more configuration variables, that\u2019s where additional variables come in.<\/p>\n<p>A good example is <span class=\"emph\">parameter biquad <\/span>audio object:<\/p>\n<ul>\n<li>Channels are used<\/li>\n<li>Elements represent number of biquads field<\/li>\n<li>Object Mode is the drop down.<\/li>\n<\/ul>\n<p>However, the parameter\u00a0<span class=\"bluet_tooltip tooltipy-kw tooltipy-kw-6209\" data-tooltip=\"6209\">biquad<\/span>\u00a0object also allows the user to select the\u00a0<strong>filter topology<\/strong>\u00a0and whether\u00a0<strong>ramping<\/strong>\u00a0is needed or not. Those two are represented with additional variables. These are fully customizable by the objects.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12299\" src=\"https:\/\/audioworx.transfunnel.co\/old\/p-release\/wp-content\/uploads\/2021\/10\/ParameterBiquad.png\" alt=\"\" width=\"361\" height=\"505\" \/><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on August 4, 2022<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"how-to-add-additional-variables-to-audio-object_wrap\"><div class=\"documentor-section  section-2319\" id=\"how-to-add-additional-variables-to-audio-object\" data-section-id=\"2319\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.2.<\/span><span class=\"title-text\">Adding Additional Variables to Audio Object<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#how-to-add-additional-variables-to-audio-object')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><div id=\"how-to-add-them_wrap\">\n<div id=\"how-to-add-them\" data-section-id=\"1882\">\n<div>\n<p>The object needs to inform the toolbox regarding the number of additional variables it needs. This is already described above as part of the object description. Besides the number of additional variables, the object needs to have a description of each additional variable. The audio object developer can provide the following:<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>Besides the number of additional variables, the object needs to have a description of each additional variable. The audio object developer can provide the following:<\/p>\n<ul>\n<li>Label for additional variable (example: filter enable or disable)<\/li>\n<li>Data type for the additional variable<\/li>\n<\/ul>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17758\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/dataTypesAddVars-1.png\" alt=\"\" width=\"871\" height=\"318\" \/><\/p>\n<p>String data type is not supported, as it will add additional bytes to the flash memory. Strings are used only in GTT and not required on target.<\/p>\n<ul>\n<li>Defaults &amp; Range\n<ul>\n<li>Min<\/li>\n<li>Max<\/li>\n<li>Default value<\/li>\n<\/ul>\n<\/li>\n<li>The dimension for each additional variable<\/li>\n<li>Data order \u2013 Describes how data is ordered. e.g. ascending or descending order<\/li>\n<li>Dimension description\n<ul>\n<li>Label<\/li>\n<li>Size of each dimension<\/li>\n<li>Axis start index (Float always irrespective of datatype)<\/li>\n<li>Axis increment (Float always irrespective of datatype)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"note\"><strong>Starting in R release &#8211; the sizes of a dynamic additional variable (NOT the count of variables, the size of each variable) can change based on user inputs.<\/strong><\/p>\n<p>To enable this functionality, make sure to see the static metadata page.\u00a0 You must set the static metadata parameter <strong><em>isAddVarUpdateRequired<\/em><\/strong> to true.<\/p>\n<p>Here are the restrictions and features:<\/p>\n<ol>\n<li>You can access the following members to change your size &#8211;\n<ol>\n<li>m_NumElements<\/li>\n<li>m_NumAudioIn<\/li>\n<li>m_NumAudioOut<\/li>\n<\/ol>\n<\/li>\n<li>You can only refer to these if they are true inputs (IE: you are NOT setting them in getObjectIO)\n<ol>\n<li>Example : Your mask says m_NumElements and m_NumAudioOutare NOT configurable by the user (so they are considered derived values).<\/li>\n<li>You cannot utilize m_NumElements and m_NumAudioOut for changing additional var size &#8211; this would create a two way dependency as additional vars are INPUTS to getObjectIO<\/li>\n<li>You can use m_NumAudioIn freely<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>Below is an example of an object that has four additional variables.<\/p>\n<ul>\n<li><strong>First additional variable<\/strong>\n<ul>\n<li>Label : \u201c Gain Vs Frequency \u201c<\/li>\n<li>Data type : Float<\/li>\n<li>Defaults : Min Value = 0.5 Max Value = 1.0 and Default value = 0.75<\/li>\n<li>Number of dimension = NUM_DIMENTION_VAR1 (2)<\/li>\n<li>Data order : xAF_NONE (no specific order required)<\/li>\n<li>Dimension details :\n<ul>\n<li>1st dimension:\n<ul>\n<li>Size of 1st dimension : SIZE_ADDVAR_1_XAXIS (10)<\/li>\n<li>Label : \u201cGain\u201c<\/li>\n<li>Axis start index : 0<\/li>\n<li>Axis increment : 1<\/li>\n<\/ul>\n<\/li>\n<li>2nd dimension:\n<ul>\n<li>Size of 2nd dimension : SIZE_ADDVAR_1_YAXIS (20)<\/li>\n<li>Label : \u201cFrequency\u201c<\/li>\n<li>Axis start index : 0<\/li>\n<li>Axis increment : 1<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Second additional variable<\/strong>\n<ul>\n<li>Label : \u201cEnable Disable Filter\u201c<\/li>\n<li>Data Type : Int8 \/ char<\/li>\n<li>Defatults : Min Value = 0 Max Value = 1 and Default value = 0<\/li>\n<li>Number of dimension = 1<\/li>\n<li>Data order : xAF_NONE (no specific order required)<\/li>\n<li>Dimension details :\n<ul>\n<li>1st dimension\n<ul>\n<li>Size of 1st dimension : 10<\/li>\n<li>Label : \u201c inputFiltEnable\u201c<\/li>\n<li>Axis start index : 0<\/li>\n<li>Axis increment : 1<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Third additional variable<\/strong>\n<ul>\n<li>Label : \u201c Min Max \u201c<\/li>\n<li>Data type : Int<\/li>\n<li>Defatults : Min Value = 0 Max Value = 30 and Default value = 5<\/li>\n<li>Number of dimension = 1<\/li>\n<li>Data order : xAF_ASCENDING (Data has to be entered in ascending order)<\/li>\n<li>Dimension details :\n<ul>\n<li>1st dimension\n<ul>\n<li>Size of 1st dimension : 2<\/li>\n<li>Label : \u201c 1st &#8211; Min 2nd &#8211; Max\u201c<\/li>\n<li>Axis start index : 0<\/li>\n<li>Axis increment : 1<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Fourth additional variable<\/strong>\n<ul>\n<li>Label : \u201c Gain \u201c<\/li>\n<li>Data type : Int<\/li>\n<li>Defatults : Min Value = -30 Max Value = 20 and Default value = 1<\/li>\n<li>Number of dimension = 1<\/li>\n<li>Data order : xAF_NONE (Data has to be entered in ascending order)<\/li>\n<li>Dimension details :\n<ul>\n<li>1st dimension\n<ul>\n<li>Size of 1st dimension : 1<\/li>\n<li>Label : \u201c Gain \u201c<\/li>\n<li>Axis start index : 0<\/li>\n<li>Axis increment : 1<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The example can be referred to here<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17751\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/Capture-1.jpg\" alt=\"\" width=\"965\" height=\"851\" \/><\/p>\n<p>An example of the result in the SFD is shown below, with the configuration of additional variable 1:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17752\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/Capture-2.jpg\" alt=\"\" width=\"1457\" height=\"725\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-description-file-for-tuning-and-control_wrap\"><div class=\"documentor-section  section-617\" id=\"audio-object-description-file-for-tuning-and-control\" data-section-id=\"617\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.3.<\/span><span class=\"title-text\">Audio Object description file for tuning and control<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-description-file-for-tuning-and-control')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Once a signal flow design is complete, SFD calls the following three Audio Object API functions, <strong><em>getXmlSVTemplate(), getXmlObjectTemplate(<\/em>),<\/strong> and <strong><em>getXmlFileInfo()<\/em><\/strong>, to generate XML that describes the parameter memory layout for tuning purposes and state memory layout for control and debug purposes. This data depends on the object configuration designed in the signal flow.<\/p>\n<p>These functions are enabled only when generating the XML file on a PC. The <strong><em>getXmlSVTemplate()<\/em><\/strong> function is called once and used for state variable templates, a single parameter, or control value. This state variable template can be reused in the object template or even the device description. The <strong><em>getXmlObjectTemplate(<\/em><em>)<\/em><\/strong> creates an object template that can be reused in another object template or in the device description. The getXmlFileInfo() uses the block ID assigned by the SFD and the HiQnet address of an object. HiQnet ID of the StateVariable must be unique in an object &#8211; even across hierarchical levels.<\/p>\n<p>This data describes the parameter memory layout for tuning purposes and state memory layout for control purposes:<\/p>\n<pre class=\"text\">unsigned int CAudioObjectToolbox::getXmlSVTemplate(tTuningInfo* info, char* buffer, unsigned int maxLen)\r\n{\r\n}\r\nunsigned int CAudioObjectToolbox::getXmlObjectTemplate(tTuningInfo* info, char* buffer, unsigned int maxLen)\r\n{\r\n}\r\nunsigned int CAudioObjectToolbox::getXmlFileInfo(tTuningInfo* info, char* buffer, unsigned int maxLen)\r\n{\r\n}<\/pre>\n<p>This data must precisely describe the memory layout of the object. Here are some general guidelines:<\/p>\n<ul>\n<li>Each object should start with a new HiQnet block value.<\/li>\n<li>Each object should have a unique block ID value.\n<ul>\n<li>Block ID refers to an entire audio object. How sub-blocks are used, depends on the object developer. This is tied to how the developer writes the tuneXTP function. For example, each sub-block in a Biquad that contains multiple filters and multiple channels, can refer to the multiple filters on one channel. Alternatively, each sub-block can refer to one filter in the Biquad.<\/li>\n<\/ul>\n<\/li>\n<li>This file and tuning are directly related and should be implemented or laid out in the same order.<\/li>\n<li>Each parameter or state value in an object that the developer wants to expose to the user should be wrapped and described in the &lt;StateVariable&gt; segment.<\/li>\n<li>Category should be set to \u2018Tuning\u2018 for parameter memory and to \u2019State\u2018 for control memory or state memory.<\/li>\n<\/ul>\n<p>To ease the generation of this data, the xAF has created XML helper functions. These functions can be used when writing <strong><em>getXmlSVTemplate()<\/em><\/strong>, <strong><em>getXmlObjectTemplate()<\/em><\/strong> functions.<\/p>\n<p>The helper function is shown below for an example where <strong><em>getXmlSVTemplate()<\/em><\/strong> for a Delay object is written using <strong><em>writeSvTemplate()<\/em><\/strong>:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4694\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/073.jpg\" alt=\"\" width=\"905\" height=\"196\" \/><\/p>\n<p>For more xml helper functions:<\/p>\n<ul>\n<li>Internal customers: Refer to <strong><em>XafXmlHelper.h<\/em><\/strong> and <strong><em>XafXmlHelper.cpp<\/em><\/strong>.<\/li>\n<li>External customers: Contact Harman.<\/li>\n<\/ul>\n<p>For more information and details, please check the <span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=3179\">Device Description File specification guide.<\/a><\/span><\/p>\n<p>Examples of the XML function that needs to be written is shown in<span style=\"color: #0000ff;\"> <a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audio-object-example-templatewin32-cpp\">Audio Object Example<\/a><\/span> section.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-memory_wrap\"><div class=\"documentor-section  section-629\" id=\"audio-object-memory\" data-section-id=\"629\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.4.<\/span><span class=\"title-text\">Audio Object Memory<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-memory')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-memory-request_wrap\"><div class=\"documentor-section  section-611\" id=\"audio-object-memory-request\" data-section-id=\"611\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.4.1.<\/span><span class=\"title-text\">API<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-memory-request')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The below API is used to fill memory records according to given target and data format:<\/p>\n<pre class=\"text\">xUInt8 getMemRecords(xAF_memRec* memTable, xAF_memRec&amp; scratchRecord, xInt8 target, xInt8 format);<\/pre>\n<ul>\n<li><em>getMemRecords()<\/em> is called by the GTT when it needs to know how many memory records each object contains or requires and their type, latency and size which depends on target and data format.<\/li>\n<li>The memory record sizes could be dependent on these object variables: m_NumElements, m_NumAudioIn, m_NumAudioOut, BlockLength, SampleRate, additional configuration data, etc<\/li>\n<\/ul>\n<p class=\"note\">By default, the <em>getMemRecords()<\/em> method will return zero number of records and doesn&#8217;t fill the provided memTable if your object does not require any dynamic memory, you do not need to override these this method.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"overview-2_wrap\"><div class=\"documentor-section  section-630\" id=\"overview-2\" data-section-id=\"630\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.4.2.<\/span><span class=\"title-text\">Memory Configuration on GTT <\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#overview-2')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>In the SFD when AudioObject is drag into panel, GTT will call getMemRecords() API to collect memory records details from the object to update the memory latency table. This will be repeated for all the AO&#8217;s of the SFD. Once the design is complete it shall be saved.<\/p>\n<p>The user can open the memory latency editor and edit the latency levels. After saving the latency levels, if the object properties were edited and saved, the user will loose the saved latency levels for that object because GTT will call getMemRecords() again that will reset to default latency levels.<\/p>\n<p class=\"text\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"872\" height=\"153\" class=\"wp-image-20072\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2023\/03\/graphical-user-interface-text-application-descr-26.png\" alt=\"Graphical user interface, text, application Description automatically generated\" \/><\/p>\n<p>Scratch memory does not need to be allocated for each audio object since all the audio objects can use the same scratch memory. The <em>GTT<\/em> \u00a0calculates the maximum scratch memory, maximum alignment and minimum latency requested by the audio objects, and put it into AudioProcessing chunk.<\/p>\n<p>The elements of this table must be of the data type <em>xAF_MemRec<\/em>, which is shown below:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13095\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/memrecords.jpg\" alt=\"\" width=\"988\" height=\"171\" \/><\/p>\n<table style=\"border-collapse: collapse; width: 97.815%; height: 211px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 28px;\">\n<td class=\"table-head\" style=\"width: 13.42%; height: 28px;\"><strong>Member<\/strong><\/td>\n<td class=\"table-head\" style=\"width: 84.395%; height: 28px;\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px; width: 13.42%;\">alignment<\/td>\n<td style=\"height: 26px; width: 84.395%;\">This is the required alignment for the memory region.<\/td>\n<\/tr>\n<tr style=\"height: 105px;\">\n<td style=\"width: 13.42%; height: 105px;\">memType<\/td>\n<td style=\"width: 84.395%; height: 105px;\">Type of the memory to be allocated \u2013 memType could be:<\/p>\n<ul>\n<li>COEFFCIENT_MEM \u2013 This memory is used to store both tuning parameters and variables \/ buffers for internal usage by the audio objects.<\/li>\n<li>SCRATCH_MEM \u2013 This memory is only used for temporary calculations.<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"width: 13.42%; height: 26px;\">size<\/td>\n<td style=\"width: 84.395%; height: 26px;\">This is the size of the memory to be allocated.<\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"width: 13.42%; height: 26px;\">memLatency<\/td>\n<td style=\"width: 84.395%; height: 26px;\">This can take values from one to five where one \u2013 low latency and five \u2013 high latency.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>While sending the signal flow to the target device the memory records details will be send as part of audio processing chunk and audio object chunk in the signal flow write command.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"summary-of-steps-for-allocating-memory-for-xaf-processing_wrap\"><div class=\"documentor-section  section-631\" id=\"summary-of-steps-for-allocating-memory-for-xaf-processing\" data-section-id=\"631\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.4.3.<\/span><span class=\"title-text\">Memory allocation in framework<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#summary-of-steps-for-allocating-memory-for-xaf-processing')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The memory records are part of flash file so the platform needs to parse the flash file using DSFD parser that would give audio processing properties and audio object properties structures.<\/p>\n<p>The platform needs to register the platform dependent memory allocator and deallocator in the constructor <em><strong>CAudioProcessing::CAudioProcessing()<\/strong>.<\/em><\/p>\n<p>Now call the <em>CAudioProcessing::initFramework()<\/em> pass the audio processing and audio properties structures, which will allocate the requested memory using platform dependent allocator and calls <strong><em>CAudioObject::setRecordPointers()<\/em><\/strong> (it will set m_MemRecPtrs) and <em><strong>CAudioObject::init()<\/strong><\/em> API&#8217;s for every objects.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"guidelines-for-audio-object-memory-declaration_wrap\"><div class=\"documentor-section  section-632\" id=\"guidelines-for-audio-object-memory-declaration\" data-section-id=\"632\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">3.2.4.4.<\/span><span class=\"title-text\">Audio Object Memory Declaration and Usage<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#guidelines-for-audio-object-memory-declaration')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>There are two types of memory used when allocating memory for audio objects.<\/p>\n<ul>\n<li><strong>Scratch Memory<\/strong>:\u00a0Scratch memory is non persistent memory that is used by an audio object only during an audio interrupt. Data in the scratch memory is not guaranteed to remain unchanged from one audio interrupt to the next. Up to and including Deep Purple, each object is restricted to one memory record. Developers can determine the size, alignment and latency level required.<\/li>\n<li><strong>Coefficient Memory: <\/strong>Coefficient memory is any other type of persistent memory that is required by the audio object. There is no limit to the number of records developers can create. Developers can configure the size, alignment and latency levels required for each record and they can be different for every record.<\/li>\n<\/ul>\n<p><strong>Audio Buffers:<\/strong> The audio buffers provided in the calc function are intended to be read and write only, i.e. they should not be used for intermediate calculations. If intermediate buffers are required, scratch memory must be requested. The reason for this is that it is not guaranteed that the buffer per channel will be unique for unconnected pins. For unconnected pins on the input side, xAF provides a single buffer (filled with zeros) that is shared by all audio objects in an xAF instance. It is expensive (MIPS-wise) to clear this buffer each time, so it is important not to write data to this buffer and leave it untouched, as it will be read by all audio objects with unconnected pins. For unconnected output pins, xAF allocates a single &#8220;dummy&#8221; buffer for all unconnected pins, rather than a unique buffer per channel.<br \/>\nFor audio objects that support in-place processing and all pins are connected, xAF will assign the same input and output buffer per channel, but if there are unconnected pins, the input and output buffers will be different, so the audio object developer should not blindly rely on the input and output buffers being the same or different. It is highly recommended to implement proper checks if the algorithm requires any of the above input\/output buffer constellations.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 9, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"basic-features-and-apis_wrap\"><div class=\"documentor-section  section-1733\" id=\"basic-features-and-apis\" data-section-id=\"1733\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">4.<\/span><span class=\"title-text\">Basic Features and APIs<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#basic-features-and-apis')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Below are the features that most developers will need during their audio object development. The order the methods get called during initialization may be helpful to audio object developers.<\/p>\n<ul>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audio-object-description\">Constructor<\/a><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#getsize\">GetSize<\/a><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audio-object-init\">Init<\/a><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audio-object-calc\">Calc<\/a><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audioobject-tunextp\">TuneXTP<\/a><\/span><\/li>\n<li><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audio-object-control\">Control<\/a><\/span><\/li>\n<\/ul>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-description_wrap\"><div class=\"documentor-section  section-608\" id=\"audio-object-description\" data-section-id=\"608\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">4.1.<\/span><span class=\"title-text\">Constructor<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-description')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The Audio object constructor is called by the framework. Audio Object developers should use the constructors to initialize their classes to a suitable state. No member variables and pointers should be un-initialized.<\/p>\n<pre class=\"text\">CAudioObject::CAudioObject()<\/pre>\n<p>The constructor initializes various member variables.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"getsize_wrap\"><div class=\"documentor-section  section-1763\" id=\"getsize\" data-section-id=\"1763\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">4.2.<\/span><span class=\"title-text\">GetSize<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#getsize')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This method is an abstract method in the base class so it MUST be implemented by every audio object. This simply returns the class size of the given audio object.<\/p>\n<pre><code>\/**\r\n*\u00a0 \u00a0 Returns the size of an audio object\r\n*\/\r\nvirtual unsigned int getSize() const = 0;<\/code><\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-init_wrap\"><div class=\"documentor-section  section-612\" id=\"audio-object-init\" data-section-id=\"612\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">4.3.<\/span><span class=\"title-text\">Init<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-init')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function initializes all internal variables and parameters. It is called by the framework (CAudioProcessing class). In this method, the object should initialize all its memory to appropriate values that match the device description specified in the toolbox methods (getXmlFileInfo, etc)<\/p>\n<pre class=\"text\">void CAudioObject::init()\r\n{\r\n}<\/pre>\n<p class=\"note\">If the audio object requires additional configuration variables, then the user must also implement the method to initialize that data via <em>assignAdditionaConfig()<\/em>. For more details, refer <span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audio-object-additional-configuration\">Audio Object Additional Configuration. <\/a><br \/>\n<\/span>If this method is not overwritten, it is an empty method that will not do anything.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-calc_wrap\"><div class=\"documentor-section  section-613\" id=\"audio-object-calc\" data-section-id=\"613\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">4.4.<\/span><span class=\"title-text\">Calc<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-calc')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The <strong>calc()<\/strong> function executes the audio object\u2019s audio algorithm every time an audio interrupt is received. This function is called when the audio object is in &#8220;<em><strong>NORMAL<\/strong><\/em>&#8221; processing state only. This function takes pointers to input and output audio streams and is called by the <em><strong>CAudioProcessing<\/strong><\/em> class when an audio interrupt is received.<\/p>\n<p>The audio inputs and outputs are currently placed in two different buffers for out of place computation. xAF expects audio samples stored in input buffers to be processed and stored in output buffers.<\/p>\n<pre class=\"text\">void CAudioObject::calc(xAFAudio** inputs, xAFAudio** outputs)\r\n{\r\n}<\/pre>\n<p>If the object\/algorithm does not have any logic to execute during an audio interrupt, this method does not need to be overridden. By default, it is empty. For example, some control objects do not need to execute any logic during an interrupt and, accordingly, they do not override this method.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audioobject-tunextp_wrap\"><div class=\"documentor-section  section-614\" id=\"audioobject-tunextp\" data-section-id=\"614\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">4.5.<\/span><span class=\"title-text\">TuneXTP<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audioobject-tunextp')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This functionality alerts an object when its parameter memory is updated or modified. It provides information on the exact variables that were modified and allows the object to update internal variables accordingly. An example is in a filter block, where a parameter update (for example a gain\/frequency\/q change) triggers the recalculation of the filter coefficients in the tuning code. The API triggered is <strong><em>CAudioObject::tuneXTP()<\/em><\/strong>.<\/p>\n<pre class=\"text\">void CAudioObject::tuneXTP(int subblock, int startMemBytes, int sizeBytes, xBool shouldAttemptRamp)\r\n{\r\n}<\/pre>\n<p>An ID-based memory addressing scheme is used instead of pure memory offsets. The <strong><em>CAudioObject\u2192tuneXTP()<\/em><\/strong> method is called by the framework in <strong><em>CAudioProcessing\u2192setAudioObjectTuning()<\/em><\/strong>.<\/p>\n<p><em><strong>CAudioObject::tuneXTP()<\/strong><\/em> take in three integers representing the:<\/p>\n<ul>\n<li>sub-block: index of the sub-block in the audio object.<\/li>\n<li>startMemBytes: memory offset (in bytes) from the beginning of the sub-block memory.<\/li>\n<li>sizeBytes: number of the parameters tuned (<span class=\"emph\">size in bytes<\/span>).<\/li>\n<li>shouldAttemptRamp: flag to indicate audio object should attempt to ramp the tuning parameters or not.<\/li>\n<\/ul>\n<p>The subblock, startAdr and size are passed into the audio object to enable the calculation of the elements it needs to tune.<\/p>\n<p class=\"note\">The code MUST be written in a manner that allows the tuning of any variable even if the corresponding sub-block is not provided. For example, an object with 2 sub-blocks with 4 variables within each sub-block, the algorithm should be able to support tuning the 5th variable with both commands: tuneXTP(0, 5, 1) AND tuneXTP(1,0,1).<\/p>\n<p class=\"heading\"><strong>Implementation<\/strong><\/p>\n<p>Once triggered, the function\u2019s implementation is heavily dependent on the audio object itself and on the corresponding tuning panel (or Device Description\/ memory layout) that the tuning tool will use to tune the audio object.<\/p>\n<p>The developer needs to take into consideration the following while designing an object:<\/p>\n<ul>\n<li>The set file header size. If an object uses a large number of sub-blocks, each sub-block will require additional header data to store its values in the initial tuning file.<\/li>\n<li>The number of sub-blocks. If there are a lot of sub-blocks, and developers are tuning a big chunk of data, there will be many more xTP messages sent compared to an audio block with fewer sub-blocks.<\/li>\n<li>The calculations required. Having more sub-blocks can reduce the calculations required in the <strong><em>AudioObject::tuneXTP()<\/em><\/strong> functions. The audio object can focus on calculations for a narrower section of audio object memory, which is the sub-block.<\/li>\n<\/ul>\n<p>For example, if a parameter biquad block is being tuned, the index or sub-block ID passed in by the <em>CAudioProcessing<\/em> class could determine:<\/p>\n<ul>\n<li>If a specific channel is being tuned. Once triggered, the function should:\n<ul>\n<li>Recalculate the filter coefficients characterizing all filters of that specific Biquad channel.<\/li>\n<li>Use the memory offset and size variables to recalculate only the filter coefficients whose corresponding parameters were modified.<\/li>\n<\/ul>\n<\/li>\n<li>A specific filter within a specific channel. Once triggered, this will only compute the coefficients of a single filter.<\/li>\n<\/ul>\n<p>The xAF team has implemented the Parameter biquad block with the sub-block definition referring to a channel in the biquad block rather than one specific filter. The xAF also uses memory offset and sub-block to recalculate as few filter coefficients as possible.<\/p>\n<p>Examples of what the tuning methods of each individual Audio Object trigger are listed below:<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 158px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 28px;\">\n<td class=\"table-head\"><strong>Audio Object<\/strong><\/td>\n<td class=\"table-head\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Delay<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the delay time in milliseconds. Each channel may have different delay and update buffers.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Gain<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the gain of each channel.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Parameter Biquad<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the type, frequency, gain, quality of a filter and recalculate filter coefficients for all filters in a channel.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Limiter<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the limit gain, threshold, attach time, release time, hold time and hold threshold.<\/span><\/td>\n<\/tr>\n<tr style=\"height: 26px;\">\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">LevelMonitor<\/span><\/td>\n<td style=\"height: 26px;\"><span style=\"font-size: 12pt;\">Sets the frequency and time weighting of level meter.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-control_wrap\"><div class=\"documentor-section  section-616\" id=\"audio-object-control\" data-section-id=\"616\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">4.6.<\/span><span class=\"title-text\">Control<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-control')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Audio object control is carried out through <em><strong>CAudioObject\u2192controlSet()<\/strong><\/em>. When a control message is received, it triggers the <em><strong>CAudioProcessing\u2192setControlParameter(..)<\/strong><\/em> function, which in turn triggers the Control Input object control function, ControlIn\u2192controlSet(..).<\/p>\n<p>This then routes the control from the control input object to each object intended to receive the message through the audio object controlSet() method.<\/p>\n<pre><code>virtual int controlSet(int pin, float val);<\/code>\r\n<code>where pin: is the input control pin index being updated <\/code>\r\n<code>val: the new value the control pin is being updated with<\/code><\/pre>\n<p>Objects that can be modified by control variables like volume, need to configure their object class control input and output values. These control I\/Os are determined during the design of the audio object and can depend on the user configuration of the object during the signal design stage.<\/p>\n<p>For example, a volume audio object will have multiple audio input and output channels. It will also have an input control that receives volume changes from the HU and an output control that relays those changes to other objects that depend on volume control.<\/p>\n<p>These pins are a one to one connection between objects. If, at the output of the volume object, the volume control needs to be forwarded to multiple audio objects, the signal designer must add a control relay (ControlMath-&gt;splitter) object that can route those signals to multiple objects.<\/p>\n<p>The implementation of this function is specific to the audio object. For example, a volume audio object control command will fade the volume value in the audio object starting from the old gain value and ending with the new gain value sent through the control command.<\/p>\n<p>An object can also pass control to another object connected to its control output via the following <em><strong>CAudioObject\u2192setControlOut(..)<\/strong><\/em> method. This method identifies which object should receive the output and passes the value to it.<\/p>\n<pre><code>\/*!\r\n*   Helper method for writing control to mapped outputs\r\n*   \\param index - which of the object's control outputs we are writing to\r\n*   \\param value - value we are writing out to the control output\r\n*\/\r\nvoid setControlOut(int index, float value);<\/code><\/pre>\n<p>To be able to externally read the value of a control variable from an audio object, that data must be placed in the state memory of the object and described in the description file used by the GTT tool. This is done through the<span style=\"color: #0000ff;\">\u00a0<a style=\"color: #0000ff;\" href=\"https:\/\/audioworx.transfunnel.co\/old\/?page_id=4420#audio-object-description-file-for-tuning-and-control\">Device Description<\/a><\/span> section.<\/p>\n<p>Finally, objects that do not interact with any controls do not need to override this method.<\/p>\n<p class=\"note\"><em>controlSet<\/em> MUST NOT write to another objects memory, if that memory is part of a larger block of memory that must be changes altogether. For example, controlSet must not write into memory containing filter coefficients because changing one coefficient alone is bound to break the filter behavior<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"advanced-features-and-apis_wrap\"><div class=\"documentor-section  section-1734\" id=\"advanced-features-and-apis\" data-section-id=\"1734\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.<\/span><span class=\"title-text\">Advanced Features and APIs<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#advanced-features-and-apis')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><div class=\"doc-sec-content\">\n<p>These methods are optional and are usually used for more advanced algorithms that have a large memory footprint or require advanced features like live streaking.<\/p>\n<p class=\"note\">This code will be compiled for embedded libraries and used at runtime.<\/p>\n<\/div>\n<div class=\"documentor-help\"><\/div>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on December 16, 2021<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-additional-configuration_wrap\"><div class=\"documentor-section  section-610\" id=\"audio-object-additional-configuration\" data-section-id=\"610\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.1.<\/span><span class=\"title-text\">Audio Object Additional Configuration<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-additional-configuration')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This is the first method called by the framework to the object after its properties are setup according to the signal flow configuration. This method allows the object the opportunity to setup its configuration. The framework retrieves the additional configuration data the object is expecting from the signal flow file and sets these two audio object variables:<\/p>\n<ul>\n<li>m_AdditionalSFDConfig &#8211; this is a void pointer that holds the additional configuration data<\/li>\n<li>m_SizeofAdditionalVars &#8211; this variable will contain the size (in bytes) of the additional data<\/li>\n<\/ul>\n<p>The object is then responsible for configuring its internal states based on this data provided. The API to implement is:<\/p>\n<pre class=\"text\">void assignAdditionalConfig()\r\n{\r\n}<\/pre>\n<p>An example is provided below for the delay audio object.<\/p>\n<figure id=\"attachment_10869\" aria-describedby=\"caption-attachment-10869\" style=\"width: 904px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-10869 size-full\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/additionalConfig.png\" alt=\"\" width=\"904\" height=\"388\" \/><figcaption id=\"caption-attachment-10869\" class=\"wp-caption-text\">assignAdditionalConfig example: delay audio object<\/figcaption><\/figure>\n<p>In the toolbox configuration, the delay object specifies it has the following 2 additional configuration variables:<\/p>\n<pre><code>typedef struct AdditionalConfigs\r\n{\r\nxFloat32 crossFadingDuration;   \/\/\/&lt; first additional config param == Crossfading duration\r\nxUInt8 cntrlInputEnable;        \/\/\/&lt; second additional config param == Control input mode (disabled, oneSet, multiset)\r\n}<\/code><\/pre>\n<p>So, accordingly, this is the data it expects as the output from the tool once the signal flow is designed.<\/p>\n<p class=\"note\">The endianness of this additional configuration data is passed to the object in little endian format.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-sub-blocks_wrap\"><div class=\"documentor-section  section-609\" id=\"audio-object-sub-blocks\" data-section-id=\"609\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.2.<\/span><span class=\"title-text\">Audio Object Sub Blocks<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-sub-blocks')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>The Sub-blocks represents logical divisions of a block\u2019s (or audio object&#8217;s) memory. They are partitions of the audio object\u2019s memory.<\/p>\n<p>There are many reasons to use sub-blocks in an object.<\/p>\n<ul>\n<li>Tuning data preservation is facilitated by the use of sub-blocks.<\/li>\n<li>The data can be organized into more logical chunks.<\/li>\n<li>The data will also be easier to debug.<\/li>\n<li>In some cases, tuning preset files can store much less data. This is due to the fact that sub-blocks of the memory can be individually stored in the preset files as opposed to the entire object&#8217;s memory.<\/li>\n<\/ul>\n<p>Sub-blocks belonging to the same object do not necessarily need to have the same sub-block size.<\/p>\n<p>The two API calls associated with setting up sub-blocks in an object are:<\/p>\n<pre class=\"text\"><span style=\"font-size: 12pt;\">xInt8* getSubBlockPtr(xUInt16 subBlock)\r\nxSInt32 getSubBlockSize(xUInt16 subBlock)<\/span><\/pre>\n<ul>\n<li><strong><em>getSubBlockPtr()<\/em><\/strong> is called by the framework to retrieve pointer to start of the subblock.<\/li>\n<li><strong><em>getSubBlockSize()<\/em><\/strong> is called by framework to get size of the subblock in bytes<\/li>\n<\/ul>\n<p>Here we will create an example of a simple object.\u00a0 This object has one parameter (m_Gain).\u00a0 It&#8217;s a float so its size is four bytes.\u00a0 Since it is our only parameter we will only have one subblock it&#8217;s subblock will be zero (we start at zero).<\/p>\n<p>In this code we only return a valid pointer if our subblock is as expected.\u00a0 If subblock is zero then we return a pointer to our parameter memory &#8211; which in this case is the address of our member float.\u00a0 Memory referenced doesn&#8217;t have to be a member variable of course, often it is a reference directly to a requested memory record.\u00a0 Sometimes objects will allocate one record but map several subblocks to the memory, spacing them out appropriately.\u00a0 You are free to do what you want as long as you don&#8217;t reference global memory as your object has to support multiple instances.<\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2023\/11\/getSubBlockPtrEx.png\" \/><\/span><\/p>\n<p>Likewise for this method the return for an error case is the default (0).\u00a0 If the framework sees a 0 size record or nullptr returned from the subblock method it will return an error over xTP and not attempt to write out of bounds.\u00a0 It will also return an error if address + size in the tuneXTP method exceeds the bounds dictated here. (Eg: subblock size is 16, but I want to write 8 bytes starting at address 12, this would be denied).<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2023\/11\/getSubBlockSizeEx.png\" \/><\/p>\n<p>Whether your data is defined in DDF as &#8216;Tuning&#8217; or &#8216;State&#8217; it still will have a subblock.\u00a0 The following fields in GTT&#8217;s SV Viewer.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2023\/11\/DDFSVView-1.png\" \/><\/p>\n<p>In the above picture we can see how this information translates to the DDF side.<\/p>\n<p>SubBlockID is the same subblock as above.\u00a0 Offset is your address within the subblock, size is the size of the variable.\u00a0 You can also see above the category here is &#8216;Tuning&#8217;.\u00a0 A subblock is either &#8216;Tuning&#8217; or &#8216;State&#8217; and\u00a0 it cannot be split between them.<\/p>\n<p>If an audio object not require any sub-blocks (no tuning or state parameters), these methods don&#8217;t need to be overridden.<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-ao-switch-processing-state_wrap\"><div class=\"documentor-section  section-1669\" id=\"audio-object-ao-switch-processing-state\" data-section-id=\"1669\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.<\/span><span class=\"title-text\">Audio Object AO Switch Processing State<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-ao-switch-processing-state')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function is called from CAudioProcessing class whenever a XTP command is received to switch the audio object processing state. This function configures the ramping related variables and also the function pointer for the method to be called for every subsequent audio interrupts.<\/p>\n<pre>void CAudioObject::aoSwitchProcState(int state, int prevState);<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-processing-states_wrap\"><div class=\"documentor-section  section-1668\" id=\"audio-object-processing-states\" data-section-id=\"1668\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.1.<\/span><span class=\"title-text\">Audio Object Processing states<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-processing-states')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><div class=\"doc-sec-content\">\n<p>The audio objects can be set to one of the following states from the GTT:<\/p>\n<ol>\n<li>Normal (default state on boot-up)<\/li>\n<li>Bypass<\/li>\n<li>Mute<\/li>\n<li>Stop<\/li>\n<\/ol>\n<p>These options are available to all regular audio objects with equal number of input and output channels. For source objects like Waveform generator, only Normal and Mute states are allowed. This feature is not available to the interface objects like Audio-in\/out, Control-in\/out. For the compound audio objects, the selected state will be applied to all inner audio objects.<\/p>\n<p>Following are the tasks carried out every time an audio interrupt is received for each state:<\/p>\n<ul>\n<li><strong>Normal: <\/strong>Normal operation with update of necessary internal states of the audio object; normal output.<\/li>\n<li><strong>Bypass: <\/strong>Normal operation with update of necessary internal states of the audio object; input channel buffer data copied to the output channel buffers.<\/li>\n<li><strong>Mute: <\/strong>Normal operation with update of necessary internal states of the audio object; output channel buffers cleared to zero.<\/li>\n<li><strong>Stop: <\/strong>Input channel buffer data copied to the output channel buffers (no update of internal states).<\/li>\n<\/ul>\n<p class=\"heading\"><strong>Ramping<\/strong><\/p>\n<p>To ensure smooth transition across states, linear ramping is provided with the ramp-up OR ramp-down time of 50 ms. Ramping is not provided for any transitions involving Bypass state and the individual audio object need to support this.<\/p>\n<p>For transition between Normal and Stop states, first the output is ramped down from the present state to mute state and then ramped up to the target state.<\/p>\n<\/div>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"bypass_wrap\"><div class=\"documentor-section  section-618\" id=\"bypass\" data-section-id=\"618\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.2.<\/span><span class=\"title-text\">Audio Object Bypass<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#bypass')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function is called every time an audio interrupt is received and when the audio object is in \u201cBYPASS\u201d processing state. The <em><strong>calc()<\/strong><\/em> function is called from here to get the internal states of the audio object updated. Subsequently the data from the input audio buffers are copied to the output audio buffers (overwriting the generated output data through the calc process).<\/p>\n<p>This function takes pointers to input and output audio streams and is called by the <strong><em>CAudioProcessing<\/em><\/strong> class when an audio interrupt is received.<\/p>\n<pre class=\"text\">void CAudioObject::bypass(float** inputs, float** outputs)\r\n{\r\n}<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-mute_wrap\"><div class=\"documentor-section  section-1674\" id=\"audio-object-mute\" data-section-id=\"1674\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.3.<\/span><span class=\"title-text\">Audio Object Mute<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-mute')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function is called every time an audio interrupt is received and when the audio object is in \u201cMUTE<strong><em>\u201d<\/em><\/strong> processing state. The <strong><em>calc()<\/em><\/strong> function is called from here to get the internal states of the audio object updated. Subsequently the output audio buffers are cleared to zero (overwriting the generated output data through the calc process).<\/p>\n<p>This function takes pointers to input and output audio streams and is called by the <strong><em>CAudioProcessing<\/em><\/strong> class when an audio interrupt is received.<\/p>\n<pre>void CAudioObject::mute(xAFAudio** inputs, xAFAudio** outputs);\r\n{\r\n}<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-stop_wrap\"><div class=\"documentor-section  section-1673\" id=\"audio-object-stop\" data-section-id=\"1673\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.4.<\/span><span class=\"title-text\">Audio Object Stop<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-stop')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function is called every time an audio interrupt is received and when the audio object is in \u201cSTOP<strong><em>\u201d<\/em><\/strong> processing state. The data from the input audio buffers are copied to the output audio buffers without calling <strong><em>calc()<\/em><\/strong> and thereby the internal states of the audio object are not updated. This function is used to save cycles.<\/p>\n<p>This function takes pointers to input and output audio streams and is called by the <strong><em>CAudioProcessing<\/em><\/strong> class when an audio interrupt is received.<\/p>\n<pre>void CAudioObject::stop(xAFAudio** inputs, xAFAudio** outputs);<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-ramp-up_wrap\"><div class=\"documentor-section  section-1672\" id=\"audio-object-ramp-up\" data-section-id=\"1672\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.5.<\/span><span class=\"title-text\">Audio Object Ramp-Up<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-ramp-up')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function is called every time an audio interrupt is received and when the audio object is in the transition state of switching from &#8220;MUTE&#8221; state to &#8220;NORMAL \/ STOP&#8221; processing state. The <strong><em>calc()<\/em><\/strong> function is called from here with &#8220;NORMAL \/ STOP&#8221; as the active state and the output is ramped up linearly. The ramp-up time is fixed as 50 ms. The ramp step and number of times this function need to be called is computed during the start of the ramp period.<\/p>\n<p>This function takes pointers to input and output audio streams and is called by the <strong><em>CAudioProcessing<\/em><\/strong> class when an audio interrupt is received.<\/p>\n<pre>void CAudioObject::rampUp(xAFAudio** inputs, xAFAudio** outputs);<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-ramp-down_wrap\"><div class=\"documentor-section  section-1671\" id=\"audio-object-ramp-down\" data-section-id=\"1671\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.6.<\/span><span class=\"title-text\">Audio Object Ramp-Down<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-ramp-down')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function is called every time an audio interrupt is received and when the audio object is in the transition state of switching from &#8220;<em>NORMAL<\/em> \/ S<em>TOP&#8221;<\/em> to &#8220;<em>MUTE&#8221;<\/em> processing state. The <em>calc()<\/em> function is called from here with NORMAL \/ STOP as the active state and the output is ramped down linearly. The ramp-down time is fixed as 50 ms. The ramp step and number of times this function need to be called is computed during the start of the ramp period.<\/p>\n<p>This function takes pointers to input and output audio streams and is called by the <em>CAudioProcessing<\/em> class when an audio interrupt is received.<\/p>\n<pre>void CAudioObject::rampDown(xAFAudio** inputs, xAFAudio** outputs);<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 10, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-ramp-down-up_wrap\"><div class=\"documentor-section  section-1670\" id=\"audio-object-ramp-down-up\" data-section-id=\"1670\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.3.7.<\/span><span class=\"title-text\">Audio Object Ramp-DownUp<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-ramp-down-up')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This function is called every time an audio interrupt is received and when the audio object is in the transition state of switching from &#8220;NORMAL&#8221; to &#8220;STOP&#8221; or &#8220;STOP&#8221; to &#8220;NORMAL&#8221; processing state. The transition is in two parts \u2013 ramp down from the present state to the MUTE state followed by ramp up from MUTE state to the target state. The calc() function is called from here with present state as the active state during ramp down and target state as the active state during ramp up. Linear ramping is applied and the ramp down time and ramp up time are fixed at 50 ms each. The ramp step and number of times this function need to be called is computed during the start of the ramp period.<\/p>\n<p>This function takes pointers to input and output audio streams and is called by the <strong><em>CAudioProcessing<\/em><\/strong> class when an audio interrupt is received.<\/p>\n<pre>void CAudioObject::rampDownUp(xAFAudio** inputs, xAFAudio** outputs);<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"debug-and-monitoring_wrap\"><div class=\"documentor-section  section-619\" id=\"debug-and-monitoring\" data-section-id=\"619\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.4.<\/span><span class=\"title-text\">Debug and Monitoring<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#debug-and-monitoring')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p class=\"text\">A number of features are planned for debugging and monitoring but currently, live streaming is implemented and described below<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on September 11, 2020<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"live-streaming-of-state-variable-or-state-memory_wrap\"><div class=\"documentor-section  section-637\" id=\"live-streaming-of-state-variable-or-state-memory\" data-section-id=\"637\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.4.1.<\/span><span class=\"title-text\">Live streaming of state variable or state memory<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#live-streaming-of-state-variable-or-state-memory')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>To enable live streaming for a particular state variable, below steps needs to be performed by the audio object.<\/p>\n<p>1. The XML section of the state variable has to be updated to convey that state variable is streamable to GTT. The optional variable after the bit converter has to be set to true to enable the state variable streaming.<br \/>\nThe code snippet from <strong><em>CTemplate::getXmlObjectTemplate<\/em><\/strong> function conveys to GTT that the state variable \u201cState1Value\u201d is enabled for streaming by setting the optional variable after bit converter to true.<br \/>\n<img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4697\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/074.jpg\" alt=\"\" width=\"513\" height=\"281\" \/><\/p>\n<p>2. For uploading data from framework to GTT, the following public functions have to overridden or implemented:<\/p>\n<ul>\n<li>CAudioObject::getStateMemForLiveStreamingPtr<\/li>\n<li>CAudioObject::getDataFormatForLiveStreamingPtr<\/li>\n<\/ul>\n<table style=\"border-collapse: collapse; width: 100%; height: 1621px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 1040px;\">\n<td style=\"width: 100%; height: 1040px;\">\n<p><span style=\"font-size: 12pt;\"><span style=\"text-decoration: underline;\"><strong>CAudioObject::getStateMemForLiveStreamingPtr ()<\/strong><\/span> take in 4 arguments representing <strong><em>streamIndext, subBlockId<\/em><\/strong>, pointer to hold memory address of the state variable <em><strong>(stateMem)<\/strong><\/em> and the number of the bytes to be streamed<em><strong> (len)<\/strong>.<\/em><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">The <strong><em>streamIndext<\/em><\/strong> and <em><strong>subBlockId<\/strong><\/em> are passed into the audio object to enable the calculation of which channel of the state variable to be streamed. Based on the calculation done, the audio object has to update the variables <em><strong>stateMem<\/strong><\/em> and <em><strong>len.<\/strong><\/em><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">The code snippet from <strong><em>CTemplate::getStateMemForLiveStreamingPtr<\/em><\/strong> shows the example implementation. In this example code, subblock is not used for state variable and hence <strong><em>subBlockId<\/em><\/strong> has to be always zero. The first state variable (with streamIndex 0) is mute which is not enabled for streaming in XML file. The state variables (streamIndext\u00a01 to 6) is enabled for streaming in XML file and stateMem and len is updated.<br \/>\n<img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8247\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/statemem.jpg\" alt=\"\" width=\"719\" height=\"712\" \/><br \/>\nThe <span class=\"emph\">len<\/span> argument of the function getStateMemForLiveStreamingPtr conveys that how many bytes are going to be streamed. If only one float value is going to be streamed then value for <span class=\"emph\">len<\/span> is 4. If <strong>n<\/strong> number of float values need to be streamed, then variable <span class=\"emph\">len<\/span> has to be 4 times <strong>n<\/strong>. Also, audio object has to make sure that <span class=\"emph\">len<\/span> number of bytes are allocated for the state variable and the starting address is assigned to<span class=\"emph\"> stateMem<\/span> variable.<br \/>\n<\/span><\/td>\n<\/tr>\n<tr style=\"height: 581px;\">\n<td style=\"width: 100%; height: 581px;\">\n<p><span style=\"font-size: 12pt;\"><span style=\"text-decoration: underline;\"><strong>CAudioObject::getDataFormatForLiveStreamingPtr()<\/strong><\/span> take in 2 arguments representing <strong>streamIndext<\/strong> and <strong>subBlockId<\/strong>.<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">The <strong>streamIndext<\/strong> and <strong>subBlockId<\/strong> are passed into the audio object to return the data format of the state variable to be streamed.<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">The code snippet from <strong>CTemplate::getDataFormatForLiveStreamingPtr<\/strong> shows the example implementation. In this example code, subblock is not used for state variable and hence<strong> subBlockId<\/strong> has to be always zero. The first state variable (with <strong>streamIndex<\/strong> 0) is mute which is not enabled for streaming in XML file. The state variables (<strong>streamIndext<\/strong> 1 to 6) is enabled for streaming in XML file and the corresponding data format is returned from this function.<br \/>\n<img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8248\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/statemem1.jpg\" alt=\"\" width=\"882\" height=\"432\" \/><br \/>\n<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>3. Data from framework to GTT is sent based on the value <span class=\"emph\">commands per second<\/span> of the state variable which is sent from GTT.<\/p>\n<p>The framework does the below calculation to decide on which call it needs to send data to GTT.<\/p>\n<ul>\n<li>Number of blocks per second = SampleRate \/ BlockLength<\/li>\n<li><strong>Blocks per message<\/strong> = Number of blocks per second \/<strong> commands per second<\/strong><\/li>\n<\/ul>\n<p>The amount of data to be send is based on the below calculation.<\/p>\n<ul>\n<li><strong>Bytes per messag<\/strong>e = Header size + len<br \/>\nwhere<\/p>\n<ul>\n<li>Header size is 5.<\/li>\n<li>len is in bytes.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The framework sends Bytes per message amount of data to GTT for every Blocks per message.<\/p>\n<p><strong>Example #1:<\/strong><br \/>\nSampleRate = 48000, BlockLength = 64, len = 4 and commands per second = 10<\/p>\n<p>Number of blocks per second = 48000 \/ 64 = 750<br \/>\nBlocks per message = 750 \/ 10 = 75<br \/>\nBytes per message = 5 + 4 = 9<br \/>\nThe framework sends 9 bytes of data to GTT for every 75th block.<br \/>\nBytes per second = (9 * 10) bytes per sec = 90 bytes per sec<\/p>\n<p><strong>Example #2:<\/strong><br \/>\nSampleRate = 48000, BlockLength = 64, len = 128 and commands per second = 6<\/p>\n<p>Number of blocks per second = 48000 \/ 64 = 750<br \/>\nBlocks per message = 750 \/ 6 = 125<br \/>\nBytes per message = 5 + 128 = 133<br \/>\nThe framework sends 133 bytes of data to GTT for every 125th block.<br \/>\nBytes per second = (133 * 6) bytes per sec = 798 bytes per sec<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"background-method_wrap\"><div class=\"documentor-section  section-620\" id=\"background-method\" data-section-id=\"620\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">5.5.<\/span><span class=\"title-text\">Background Method<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#background-method')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Some objects may require CPU intensive tasks that do not need to execute immediately. For this purpose xAF offers the background process. To enable this functionality the object will override <strong><em>backgroundMethod<\/em><\/strong> and <strong><em>hasBackgroundMethod<\/em><\/strong><em><strong>.<\/strong> hasBackgroundMethod<\/em> needs to return true. Within the method, the object can do whatever it wants. This method will be interrupted by other threads; even the object\u2019s calc method. For this reason, the logic in this method <strong>must be implemented<\/strong> in a protective, thread-safe manner.<\/p>\n<pre class=\"text\">virtual void CAudioObject::backgroundMethod () {};\r\nvirtual bool CAudioObject::hasBackgroundMethod () const\r\n{\r\n    return FALSE;\r\n}<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-template_wrap\"><div class=\"documentor-section  section-643\" id=\"audio-object-template\" data-section-id=\"643\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">6.<\/span><span class=\"title-text\">Audio object Examples<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-template')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p class=\"text\"><span style=\"font-size: 12pt;\">A new audio object will implement the following functions depending on functionality. See the header files for the associated classes for detailed comments.<\/span><\/p>\n<p><strong>In the class which inherits CAudioObject &#8211; ie: CYourAudioObject.cpp<\/strong><\/p>\n<p class=\"text\"><span style=\"font-size: 12pt;\">Abstract Methods (required implementation)<\/span><\/p>\n<pre class=\"text\">xUInt32 CAudioObject::getSize() const \r\n<\/pre>\n<p>Virtual Methods (optional implementation &#8211; depending on object features). This is not a complete list but contains the major virtual methods.<\/p>\n<pre class=\"text\">void      CAudioObject::init()\r\nvoid      CAudioObject::calc(xFloat32** inputs, xFloat32** outputs)\r\nvoid      CAudioObject::tuneXTP(xSInt32 subblock, xSInt32 startMemBytes, xSInt32 sizeBytes, xBool shouldAttemptRamp)\r\nvoid      CAudioObject::controlSet(xSInt32 index, xFloat32 value)\r\nxAF_Error CAudioObject::controlSet(xSInt32 index, xUInt32 sizeBytes, const void * const pValues)\r\nvoid      CAudioObject::assignAdditionalConfig()\r\nxInt8*    CAudioObject::getSubBlockPtr(xUInt16 subBlock)\r\nxSInt32   CAudioObject::getSubBlockSize(xUInt16 subBlock)\r\n<\/pre>\n<p><strong>In the class which inherits CAudioObjectToolbox &#8211; ie: CYourAudioObjectToolbox.cpp<\/strong><\/p>\n<pre class=\"text\">const CAudioObjectToolbox::tObjectDescription*          CAudioObjectToolbox::getObjectDescription()\r\nconst CAudioObjectToolbox::tModeDescription*            CAudioObjectToolbox::getModeDescription(xUInt32 mode)\r\nconst CAudioObjectToolbox::additionalSfdVarDescription* CAudioObjectToolbox::getAdditionalSfdVarsDescription(xUInt32 index)\r\nxAF_Error                                               CAudioObjectToolbox::getObjectIo(ioObjectConfigOutput* configOut)\r\nxUInt32                                                 CAudioObjectToolbox::getXmlSVTemplate(tTuningInfo* info, xInt8* buffer, xUInt32 maxLen)\r\nxUInt32                                                 CAudioObjectToolbox::getXmlObjectTemplate(tTuningInfo* info, xInt8* buffer, xUInt32 maxLen)\r\nxUInt32                                                 CAudioObjectToolbox::getXmlFileInfo(tTuningInfo* info, xInt8* buffer, xUInt32 maxLen)\r\nvoid                                                    CAudioObjectToolbox::createStaticMetadata()\r\nvoid                                                    CAudioObjectToolbox::createDynamicMetadata(ioObjectConfigInput&amp; configIn, ioObjectConfigOutput&amp; configOut)\r\n<\/pre>\n<p><strong>In the class which inherits CMemoryRecordProperties &#8211; ie: CYourAudioObjectMemRecs.cpp<\/strong><\/p>\n<pre class=\"text\">xUInt8 CMemoryRecordProperties::getMemRecords(xAF_memRec* memTable, xAF_memRec&amp; scratchRecord, xInt8 target, xInt8 format)\r\n<\/pre>\n<p>Source code for AwxAudioObjExt audio object can be found in HarmanAudioworX installation folder. The path for the source code is<br \/>\n\\Program Files\\Harman\\HarmanAudioworX\\ext-reference-algorithms\\external\\inc<br \/>\n\\Program Files\\Harman\\HarmanAudioworX\\ext-reference-algorithms\\external\\src<\/p>\n<p>The code snippet for source and include files is provided in following sections for reference<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audioobject-example-template-cpp_wrap\"><div class=\"documentor-section  section-729\" id=\"audioobject-example-template-cpp\" data-section-id=\"729\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">6.1.<\/span><span class=\"title-text\">Example 1 - AwxAudioObjExt.cpp<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audioobject-example-template-cpp')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><pre>\/*!\r\n*   \\file      AwxAudioObjExt.cpp\r\n*   \\brief     Simple example Audio object for building outside from the xAF repo- Source file\r\n*   \\details   Implements a simple example fucntionality\r\n*   \\details   Project    Extendable Audio Framework\r\n*   \\copyright Harman\/Becker Automotive Systems GmbH\r\n*   \r\n       2022\r\n*   \r\n       All rights reserved\r\n*   \\author    xAF Team\r\n*\/\r\n\r\n\/*!\r\n*   xaf mandataory includes\r\n*\/\r\n#include \"AwxAudioObjExt.h\"\r\n#include \"XafMacros.h\"\r\n#include \"vector.h\"\r\n\r\nVERSION_STRING_AO(AwxAudioObjExt, AWXAUDIOOBJEXT);\r\nAO_VERSION(AwxAudioObjExt, AWXAUDIOOBJEXT);\r\n\r\n\/** here you can add all required include files required for    \r\n    the core functionality of your objects\r\n**\/\r\n\r\n#define MAX_CONFIG_MIN_GAIN_dB              (0.0f)\r\n#define MAX_CONFIG_MAX_GAIN_dB              (30.0f)\r\n#define MAX_GAIN_DEFAULT_GAIN_dB            (10.0f)\r\n#define CONTROL_GAIN_MIN                    (-128.0f)\r\n#define GAINDB_CONVERSION_FACTOR             (0.05f)\r\n\r\nCAwxAudioObjExt::CAwxAudioObjExt()\r\n    : m_Coeffs(NULL)\r\n    , m_Params(NULL), m_MemBlock(NULL), m_EnMemory(DISABLE_BLOCK)\r\n{\r\n}\r\n\r\nCAwxAudioObjExt::~CAwxAudioObjExt()\r\n{\r\n}\r\n\r\nvoid CAwxAudioObjExt::init()\r\n{   \r\n    m_Params = static_cast&lt;xFloat32*&gt;(m_MemRecPtrs[PARAM]);\r\n    m_Coeffs = static_cast&lt;xFloat32*&gt;(m_MemRecPtrs[COEFF]);\r\n\t\r\n\tif (ENABLE_BLOCK == m_EnMemory)\r\n\t{\r\n\t\tm_MemBlock = static_cast&lt;xFloat32*&gt;(m_MemRecPtrs[FLOATARRAY]);\r\n\t}\r\n\tif (static_cast(GAIN_WITH_CONTROL) == m_Mode)\r\n\t{\r\n\t\tm_NumControlIn = 1;\r\n\t\tm_NumControlOut = 0;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tm_NumControlIn = 0;\r\n\t\tm_NumControlOut = 0;\r\n\t}\r\n}\r\n\r\nvoid CAwxAudioObjExt::assignAdditionalConfig()\r\n{\r\n\txInt8*  addVars8Ptr = reinterpret_cast&lt;xInt8*&gt;(m_AdditionalSFDConfig);\r\n\t\/\/Assigning additional configuration variable \"Abstracted Tuning Memory\".\r\n\tif (static_cast&lt;void*&gt;(NULL) != m_AdditionalSFDConfig)\r\n\t{\r\n\t\tm_EnMemory = addVars8Ptr[m_NumAudioIn * sizeof(xFloat32)];\r\n\t}\r\n}\r\n\r\nxFloat32 CAwxAudioObjExt::getMaxGain(xSInt32 index)\r\n{\r\n\txFloat32*  addVars32Ptr = reinterpret_cast&lt;xFloat32*&gt;(m_AdditionalSFDConfig);\r\n\txFloat32 value = addVars32Ptr[index];\r\n\treturn value;\r\n}\r\n\r\nxInt8* CAwxAudioObjExt::getSubBlockPtr(xUInt16 subBlock)\r\n{\r\n    xInt8* ptr = NULL;\r\n  \r\n    \/\/ this is just an example of how memory could be split by an AO developer. There is no strict rule\r\n    \/\/ how memory has to be split for each subblock\r\n    \r\n    switch(subBlock)\r\n    {\r\n        case 0:\r\n        ptr = reinterpret_cast&lt;xInt8*&gt;(m_Params);\r\n        break;\r\n\r\n        case 1:\r\n        ptr = reinterpret_cast&lt;xInt8*&gt;(m_MemBlock);\r\n        break;\r\n        \r\n        default:\r\n        \/\/ by default we will return a null ptr, hence wrong subBlock was provided\r\n        break;\r\n    }\r\n\r\n    return ptr;\r\n}\r\n\r\nxSInt32 CAwxAudioObjExt::getSubBlockSize(xUInt16 subBlock)\r\n{\r\n    xSInt32 subBlockSize = 0;\r\n    \r\n    \/\/ this is just an example of how memory could be split by an AO developer. There is no strict rule\r\n    \/\/ how memory has to be split for each subblock\r\n    switch(subBlock)\r\n    {\r\n        case 0:\r\n        subBlockSize = static_cast(sizeof(xFloat32)) * static_cast(m_NumAudioIn) * NUM_PARAMS_PER_CHANNEL;\r\n        break;\r\n\r\n        case 1:\r\n        subBlockSize = (nullptr != m_MemBlock) ? (static_cast(sizeof(xFloat32)) * FLOAT_ARRAY_SIZE) : 0;\r\n        break;\r\n        \r\n        default:\r\n        \/\/ by default we will return a null ptr, hence wrong subBlock was provided\r\n        break;\r\n    }\r\n    return subBlockSize;\r\n}\r\n\r\nvoid CAwxAudioObjExt::calc(xAFAudio** inputs, xAFAudio** outputs)\r\n{\r\n\tif (static_cast(ENABLE_BLOCK) == m_EnMemory)\r\n\t{\r\n\t\txSInt32 numAudioIn = static_cast(m_NumAudioIn);\r\n\t\tfor (xSInt32 i = 0; i &lt; numAudioIn; i++)\r\n\t\t{\r\n\t\t\t\/\/ for example if m_MemBlock[0] is to mute all channels\r\n\t\t\txFloat32 factor = m_Coeffs[i] * m_MemBlock[0];\r\n\t\t\tscalMpy(factor, inputs[i], outputs[i], static_cast(m_BlockLength));\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\txSInt32 numAudioIn = static_cast(m_NumAudioIn);\r\n\t\tfor (xSInt32 i = 0; i &lt; numAudioIn; i++)\r\n\t\t{\r\n\t\t\tscalMpy(m_Coeffs[i], inputs[i], outputs[i], static_cast(m_BlockLength));\r\n\t\t}\r\n\t}\r\n}\r\n\r\nvoid CAwxAudioObjExt::calcGain(xSInt32 channelIndex, xFloat32 gainIndB)\r\n{\r\n\txFloat32 maxGainIndB = getMaxGain(channelIndex);\r\n\r\n\tLIMIT(gainIndB, CONTROL_GAIN_MIN, maxGainIndB);\r\n\tm_Params[channelIndex * NUM_PARAMS_PER_CHANNEL] = gainIndB;\r\n\r\n\txUInt32* mutePtr = reinterpret_cast&lt;xUInt32*&gt;(&amp;m_Params[(channelIndex * NUM_PARAMS_PER_CHANNEL) + 1u]);\r\n\r\n\tm_Coeffs[channelIndex] = (0 == *mutePtr) ? powf(MAX_GAIN_DEFAULT_GAIN_dB, gainIndB * GAINDB_CONVERSION_FACTOR) : 0.f;\r\n}\r\n\r\nvoid CAwxAudioObjExt::tuneXTP(xSInt32 subBlock, xSInt32 offsetBytes, xSInt32 sizeBytes, xBool shouldAttemptRamp)\r\n{\r\n\tif(0 == subBlock)\r\n\t{\r\n\t\txUInt32 channelu = static_cast(offsetBytes) &gt;&gt; 2u;\r\n\t\txSInt32 channel = static_cast(channelu) \/ NUM_PARAMS_PER_CHANNEL;\r\n\t\twhile (sizeBytes &gt; 0)\r\n\t\t{\r\n\t\t\tcalcGain(channel, m_Params[channel * NUM_PARAMS_PER_CHANNEL]);\r\n\t\t\tsizeBytes -= static_cast(NUM_PARAMS_PER_CHANNEL * sizeof(xFloat32));\r\n\t\t\tchannel++;\r\n\t\t}\r\n\t}\r\n\telse if(1 == subBlock)\r\n\t{ \/\/ handle float array related here\r\n\t  \/\/ values are available in m_MemBlock\r\n\t}\r\n\telse\r\n\t{\r\n\t}\r\n} \r\n\r\nxSInt32 CAwxAudioObjExt::controlSet(xSInt32 index, xFloat32 value)\r\n{\r\n\tif ((0 == index) &amp;&amp; (static_cast(GAIN_WITH_CONTROL) == m_Mode))\r\n\t{\r\n\t\txSInt32 numAudioIn = static_cast(m_NumAudioIn);\r\n\t\tfor (xSInt32 i = 0; i &lt; numAudioIn; i++)\r\n\t\t{\r\n\t\t\tcalcGain(i, value);\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}\r\n\r\nxUInt32 CAwxAudioObjExt::getSize() const\r\n{\r\n    return sizeof(*this);\r\n}\r\n\r\n<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-example-templatewin32-cpp_wrap\"><div class=\"documentor-section  section-730\" id=\"audio-object-example-templatewin32-cpp\" data-section-id=\"730\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">6.2.<\/span><span class=\"title-text\">Example 2 - AwxAudioObjExtToolbox.cpp<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-example-templatewin32-cpp')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><pre>\/*!\r\n*   \\file      AwxAudioObjExtToolbox.cpp\r\n*   \\brief     AwxAudioObjExt Toolbox Source file\r\n*   \\details   Implements the AwxAudioObjExt signal design API\r\n*   \\details   Project    Extendable Audio Framework\r\n*   \\copyright Harman\/Becker Automotive Systems GmbH\r\n*   \r\n       2020\r\n*   \r\n       All rights reserved\r\n*   \\author    xAF Team\r\n*\/\r\n\r\n\/*!\r\n*   xaf mandataory includes to handle the toolbox related data\r\n*\/\r\n#include \"AwxAudioObjExtToolbox.h\"\r\n#include \"XafXmlHelper.h\"\r\n#include \"AudioObjectProperties.h\"\r\n#include \"AwxAudioObjExt.h\"\r\n#include \"XafMacros.h\"\r\n#include \"AudioObject.h\"\r\n\r\n\r\n\r\n\/\/ the revision number may be different for specific targets\r\n#define MIN_REQUIRED_XAF_VERSION            (RELEASE_U)\r\n\/\/ mode specific defines\r\n#define AUDIO_IN_OUT_MIN                    (1)\r\n#define AUDIO_IN_OUT_MAX                    (255)\r\n#define EST_MEMORY_CONSUMPTION_NA           (0)         \/\/ memory consuption not available\/measured\r\n#define EST_CPU_LOAD_CONSUMPTION_NA         (0.f) \/\/ cpu load not available\/measured\r\n#define CONTROL_GAIN_MAX                   (30.0f)\r\n#define CONTROL_GAIN_MIN                   (-128.0f)\r\n#define CONTROL_GAIN_IN_LABEL              \"Gain\"\r\n#define MAX_CONFIG_MIN_GAIN_dB              (-12.0f)\r\n#define MAX_CONFIG_MAX_GAIN_dB              (30.0f)\r\n#define MAX_GAIN_DEFAULT_GAIN_dB            (10.0f)\r\n\r\nCAwxAudioObjExtToolbox::CAwxAudioObjExtToolbox()\r\n{\r\n}\r\n\r\nCAwxAudioObjExtToolbox::~CAwxAudioObjExtToolbox()\r\n{\r\n}\r\n\r\nstatic CAudioObjectToolbox::additionalSfdVarDescription theVar;\r\nconst CAwxAudioObjExtToolbox::additionalSfdVarDescription* CAwxAudioObjExtToolbox::getAdditionalSfdVarsDescription(xUInt32 index)\r\n\r\n{\r\n    CAudioObjectToolbox::additionalSfdVarDescription* ptr = &amp;theVar;\r\n    static CAudioObjectToolbox::MinMaxDefault addVar1 = { MAX_CONFIG_MIN_GAIN_dB ,MAX_CONFIG_MAX_GAIN_dB ,MAX_GAIN_DEFAULT_GAIN_dB }; \/\/Min,max,default values for additional config variable\r\n    static CAudioObjectToolbox::MinMaxDefault addVar2 = { 0, 1, 0 }; \/\/Min,max,default values\r\n    \r\n    static CAudioObjectToolbox::addVarsSize m_AddtionalVarSize1[NUM_DIMENSION_VAR] =\r\n    {\r\n        \/\/ size, label, start index, increment\r\n        {1, \"Max Gain per channel(dB)\", 0, 1}\r\n    };\r\n    static CAudioObjectToolbox::addVarsSize m_AddtionalVarSize2[NUM_DIMENSION_VAR] =\r\n    {\r\n        \/\/ size, label, start index, increment\r\n        {1, \"Disable: 0\\nEnable  : 1\", 0, 1}\r\n    };\r\n\r\n     if (index == 0)\r\n     {\r\n       theVar.mP_Label = \"Max Gain per channel\";\r\n       theVar.m_DataType = xAF_FLOAT_32;\r\n       theVar.mP_RangeSet = &amp;addVar1;\r\n       theVar.m_Dimension = 1;\r\n       theVar.m_DataOrder = xAF_NONE;\r\n       \/\/size varies according to the number of channels\r\n       m_AddtionalVarSize1[0].m_Size = static_cast(m_NumAudioIn);\r\n       theVar.mP_MaddVarsSize = m_AddtionalVarSize1;\r\n     }\r\n     else if (index == 1)\r\n     {\r\n         theVar.mP_Label = \"Abstracted Tuning Memory\";\r\n         theVar.m_DataType = xAF_UCHAR;\r\n         theVar.mP_RangeSet = &amp;addVar2;\r\n         theVar.m_Dimension = 1;\r\n         theVar.m_DataOrder = xAF_NONE;\r\n         theVar.mP_MaddVarsSize = m_AddtionalVarSize2;\r\n     }\r\n     else\r\n     {\r\n         \/* Invalid index. Return NULL *\/\r\n         ptr = NULL;\r\n     }\r\n     return ptr;\r\n}\r\n\r\n\r\nconst CAudioObjectToolbox::tObjectDescription* CAwxAudioObjExtToolbox::getObjectDescription()\r\n{\r\n    static const CAudioObjectToolbox::tObjectDescription descriptions =\r\n    {\r\n        1, 1, 0, 0, \"AwxAudioObjExt\", \"Simple Object to start with for 3rd party\/external objects integration\", \"External\", AWX_EXT_NUM_ADD_VARS, AWX_EXT_NUM_MODES\r\n    };\r\n    return &amp;descriptions;\r\n}\r\n\r\n\r\nconst CAudioObjectToolbox::tModeDescription* CAwxAudioObjExtToolbox::getModeDescription(xUInt32 mode)\r\n{\r\n    static const CAudioObjectToolbox::tModeDescription modeDescription[AWX_EXT_NUM_MODES] =\r\n    {\r\n        {\"Gain\", \"No control input\", 0, 0, \"\", CFG_NCHANNEL},\r\n        {\"GainWithControl\", \"One gain control input pin gets added\", 0, 0, \"\", CFG_NCHANNEL},\r\n    };\r\n    return (mode &lt; (sizeof(modeDescription) \/ sizeof(tModeDescription))) ? &amp;modeDescription[mode] : static_cast&lt;tModeDescription*&gt;(NULL);\r\n}\r\n\r\n\r\nxAF_Error CAwxAudioObjExtToolbox::getObjectIo(ioObjectConfigOutput* configOut)\r\n{\r\n    if (static_cast(GAIN_WITH_CONTROL) == m_Mode)\r\n    {\r\n        configOut-&gt;numControlIn = 1;\r\n        configOut-&gt;numControlOut = 0;\r\n    }\r\n    else \r\n    {\r\n        configOut-&gt;numControlIn = 0;\r\n        configOut-&gt;numControlOut = 0;\r\n    }\r\n\r\n    return xAF_SUCCESS;\r\n}\r\n\r\n\r\nxUInt32 CAwxAudioObjExtToolbox::getXmlObjectTemplate(tTuningInfo* info, xInt8* buffer, xUInt32 maxLen)\r\n{\r\n    initiateNewBufferWrite(buffer, maxLen);\r\n    \r\n    \/\/ add your tuning parameters here in order to show up in the tuning tool\r\n    \/\/ the number of params specified here, depends on the number to be tuned in GTT\r\n    \/\/ in this example we are exposing the tuning parameters as arrays split into 2 subblocks\r\n\r\n    \/\/template 1\r\n    xSInt32 numAudioIn = static_cast(m_NumAudioIn);\r\n    xSInt32 blockID = info-&gt;Global_Object_Count; \/\/ uniq to this instance\r\n    xUInt32 id = 0;\r\n\r\n    for (xSInt32 i = 0; i &lt; numAudioIn; i++)\r\n    {\r\n        \/\/Max value for each channel to show up shall be specified by this function\r\n        xFloat32 gainval = getMaxGain(i);\r\n        xAFOpenLongXMLTag(\"Object\");\r\n        string templateName = string(\"\").append(\"AwxAudioObjExtTuneTemplate\").append(xAFIntToString(i + 1)).append(xAFIntToString(blockID));\r\n        xAFAddFieldToXMLTag(\"Key\", templateName.c_str());\r\n        xAFEndLongXMLTag();\r\n        xAFWriteQuickXmlTag(\"ExplorerIcon\", \"Object\");\r\n        xAFWriteXmlTag(\"StateVariables\", XML_OPEN);\r\n        xAFWriteStateVariable(\"Gain\",                   \/\/ name                \r\n            id,                                         \/\/ id\r\n            NULL,                                       \/\/ control law\r\n            \"dB\",                                       \/\/ unit type\r\n            DataTypes[xAF_FLOAT],                       \/\/ data type\r\n            -128.0,                                     \/\/ min\r\n            gainval,                                    \/\/ max\r\n            0.0,                                        \/\/ default\r\n            0u,                                         \/\/ offset\r\n            NULL,                                       \/\/ encode value\r\n            NULL,                                       \/\/ decode value\r\n            DataTypeConverters[xAF_FLOAT],              \/\/ bit converter\r\n            false                                       \/\/ disable streaming\r\n        );\r\n        id++;\r\n\r\n        xAFWriteStateVariable(\"Mute\",                    \/\/ name                \r\n            id,                                          \/\/ id\r\n            NULL,                                        \/\/ control law\r\n            NULL,                                        \/\/ unit type\r\n            DataTypes[xAF_UINT],                         \/\/ data type\r\n            0.0,                                         \/\/ min\r\n            1.0,                                         \/\/ max\r\n            0.0,                                         \/\/ default\r\n            4u,                                          \/\/ offset\r\n            NULL,                                        \/\/ encode value\r\n            NULL,                                        \/\/ decode value\r\n            DataTypeConverters[xAF_UINT],                \/\/ bit converter\r\n            false                                        \/\/ disable streaming\r\n        );\r\n        id++;\r\n\r\n        xAFWriteXmlTag(\"StateVariables\", XML_CLOSE);\r\n        xAFWriteXmlTag(\"Object\", XML_CLOSE);\r\n\r\n    }\r\n\r\n    \/\/template 2\r\n    \/\/It shall be shown up in the State Variable Explorer if through additional configuration \"Abstracted Tuning Memory\" is set to 1 or enabled.\r\n    if (static_cast(ENABLE_BLOCK) == m_EnMemory)\r\n    {\r\n        xAFOpenLongXMLTag(\"Object\");\r\n        xAFAddFieldToXMLTag(\"Key\", \"AwxAudioObjExtArrayTemplate\");\r\n        xAFEndLongXMLTag();\r\n        xAFWriteQuickXmlTag(\"ExplorerIcon\", \"Object\");\r\n        xAFWriteXmlTag(\"StateVariables\", XML_OPEN);\r\n        xAFWriteStateVariableBuffer(\/* name = *\/ \"FloatArray\",\r\n            \/* id = *\/ id,\r\n            \/* type = *\/ FLOATARRAY_SV,\r\n            \/* size = *\/ FLOAT_ARRAY_SIZE,\r\n            \/* streamIdx = *\/ id,\r\n            \/* minVal = *\/ -1000.0,\r\n            \/* maxVal = *\/ 1000.0,\r\n            \/* defaultVal = *\/ 0.0,\r\n            \/* offset = *\/ 0,\r\n            \/* isStreamable = *\/ false);\r\n        \r\n        xAFWriteXmlTag(\"StateVariables\", XML_CLOSE);\r\n        xAFWriteXmlTag(\"Object\", XML_CLOSE);\r\n    }\r\n    return finishWritingToBuffer();\r\n}\r\n\r\n\r\nxUInt32 CAwxAudioObjExtToolbox::getXmlFileInfo(tTuningInfo* info, xInt8* buffer, xUInt32 maxLen)\r\n{\r\n    initiateNewBufferWrite(buffer, maxLen);\r\n    xUInt32 hiqnetInc = 0u;\r\n    xUInt8  subBlock = 0u;\r\n    xSInt32 blockID = info-&gt;Global_Object_Count; \/\/ uniq to this instance\r\n\r\n    xAFWriteObject(info-&gt;Name, static_cast(info-&gt;Global_Object_Count), hiqnetInc, static_cast(info-&gt;HiQNetVal), 0);\r\n\r\n    xAFWriteXmlTag(\"Objects\", XML_OPEN);\r\n    xSInt32 numAudioIn = static_cast(m_NumAudioIn); \/\/ m_NumAudioIn == m_NumAudioOut\r\n    \r\n    xAFWriteXmlObjectContainer(\"Gains\", hiqnetInc, subBlock, PARAM_CATEGORY);\r\n    xAFWriteXmlTag(\"Objects\", XML_OPEN);\r\n    for(xSInt32 i = 0; i &lt; numAudioIn; i++)\r\n    {        \r\n        string templateName = string(\"\").append(\"AwxAudioObjExtTuneTemplate\").append(xAFIntToString(i+1)).append(xAFIntToString(blockID));\r\n        xAFWriteXmlObjectTemplateInstance(templateName.c_str(), string(\"Ch\").append(xAFIntToString(i+1)).c_str(), i * 8, 1 + i); \r\n        \/\/ 8 is related here to the internal memory layout where a \"state\/tuning\" is related to a block of N-bytes and withing this needs to be offset\r\n        hiqnetInc++;\r\n    }\r\n    xAFWriteXmlTag(\"Objects\", XML_CLOSE);\r\n    xAFWriteXmlTag(\"Object\", XML_CLOSE); \/\/gains\r\n\r\n    if (static_cast(ENABLE_BLOCK) == m_EnMemory)\r\n    {        \r\n        xAFWriteXmlObjectBlockOffset(\"AwxAudioObjExtArrayTemplate\", \"FloatArrayMemory\", subBlock, static_cast(info-&gt;HiQNetVal), hiqnetInc, PARAM_CATEGORY);\r\n        hiqnetInc++;\r\n    }\r\n    xAFWriteXmlTag(\"Objects\", XML_CLOSE);\r\n\r\n    xAFWriteXmlTag(\"Object\", XML_CLOSE);\r\n\r\n    return finishWritingToBuffer();\r\n}\r\n\r\n\r\nvoid CAwxAudioObjExtToolbox::createStaticMetadata()\r\n{\r\n    m_StaticMetadata.minReqXafVersion = static_cast(MIN_REQUIRED_XAF_VERSION);\r\n\r\n    setAudioObjectVersion(AWXAUDIOOBJEXT_VERSION_MAJOR, AWXAUDIOOBJEXT_VERSION_MINOR, AWXAUDIOOBJEXT_VERSION_REVISION);\r\n    setTuningVersion     (AWXAUDIOOBJEXT_TUNING_VERSION_MAJOR, AWXAUDIOOBJEXT_TUNING_VERSION_MINOR);\r\n\r\n    m_StaticMetadata.supDataFormats.push_back(xAF_DATATYPE_FLOAT);\r\n\r\n    \/\/creation\/release date\r\n    setCreationDate(2022, 8, 4);\r\n\r\n    \/\/Simple AO supports in-place computation\r\n    m_StaticMetadata.inPlaceComputationEnabled = true;\r\n    \/\/This flag allows to set whether the object dynamically updates its additional vars based on input params\r\n    m_StaticMetadata.isAddVarUpdateRequired = true;\r\n}\r\n\r\nvoid CAwxAudioObjExtToolbox::createDynamicMetadata(ioObjectConfigInput&amp; configIn, ioObjectConfigOutput&amp; configOut)\r\n{\r\n    metaDataControlDescription ctrlDesc;\r\n    \/\/ define audio in metadata\r\n    m_DynamicMetadata.audioIn.Min = AUDIO_IN_OUT_MIN;\r\n    m_DynamicMetadata.audioIn.Max = AUDIO_IN_OUT_MAX;\r\n\r\n    \/\/ define audio out metadata\r\n    m_DynamicMetadata.audioOut.Min = AUDIO_IN_OUT_MIN;\r\n    m_DynamicMetadata.audioOut.Max = AUDIO_IN_OUT_MAX;\r\n\r\n    switch (configIn.mode)\r\n    {\r\n        case static_cast(GAIN_WITH_CONTROL) :\r\n        \/\/ define control in min, max and label values for the control pin\r\n            \r\n        ctrlDesc.Min = CONTROL_GAIN_MIN;\r\n        ctrlDesc.Max = CONTROL_GAIN_MAX;\r\n        ctrlDesc.Label = CONTROL_GAIN_IN_LABEL;\r\n        m_DynamicMetadata.controlIn.push_back(ctrlDesc);\r\n        break;\r\n\r\n        default:\r\n        break;\r\n    }\r\n\r\n    m_DynamicMetadata.estMemory = EST_MEMORY_CONSUMPTION_NA;\r\n    m_DynamicMetadata.estMIPS = EST_CPU_LOAD_CONSUMPTION_NA;\r\n}\r\n<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-example-templatememrecs-cpp_wrap\"><div class=\"documentor-section  section-2292\" id=\"audio-object-example-templatememrecs-cpp\" data-section-id=\"2292\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">6.3.<\/span><span class=\"title-text\">Example 3 - AwxAudioObjExtMemRecs.cpp<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-example-templatememrecs-cpp')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><pre>\/*!\r\n*   \\file      AwxiAudioObjExtMemRecs.cpp\r\n*   \\brief     Memory related description Source file\r\n*   \\details   Implements the audio object memory related API\r\n*   \\details   Project    Extendable Audio Framework\r\n*   \\copyright Harman\/Becker Automotive Systems GmbH\r\n*   \r\n       2020\r\n*   \r\n       All rights reserved\r\n*   \\author    xAF Team\r\n*\/\r\n\r\n\/*!\r\n*   include files required to request the dynamic memory\r\n*\/\r\n#include \"AwxAudioObjExtMemRecs.h\"\r\n\r\nxUInt8 CAwxAudioObjExtMemRecs::getMemRecords(xAF_memRec* memTable, xAF_memRec&amp; scratchRecord, xInt8 target, xInt8 format)\r\n{\r\n\txUInt8 numMemRecords = (static_cast(ENABLE_BLOCK) == m_EnMemory) ? static_cast(NUM_MEM_RECORDS) : static_cast(FLOATARRAY);\r\n\t\/\/m_Param memory\r\n    memTable[PARAM].alignment = 4;\r\n    memTable[PARAM].size = static_cast(static_cast(m_NumAudioIn) * NUM_PARAMS_PER_CHANNEL * sizeof(xFloat32));\r\n\tmemTable[PARAM].label = \"Tuning Parameters\";\r\n\r\n\t\/\/m_Coeff memory\r\n    memTable[COEFF].size = static_cast(static_cast(m_NumAudioIn) * sizeof(xFloat32));\r\n\tmemTable[COEFF].alignment = 4;\r\n\tmemTable[COEFF].label = \"Gain Values\";\r\n\r\n\t\/\/m_MemBlck memory(Abstracted Tuning Memory)\r\n\tif (static_cast(ENABLE_BLOCK) == m_EnMemory)\r\n\t{\r\n\t\tmemTable[FLOATARRAY].size = FLOAT_ARRAY_SIZE * sizeof(xFloat32);\r\n\t\tmemTable[FLOATARRAY].alignment = 4;\r\n\t\tmemTable[FLOATARRAY].label = \"Abstracted Tuning Memory values\";\r\n\t}\r\n    return numMemRecords;\r\n}\r\n<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audioobject-example-template-h_wrap\"><div class=\"documentor-section  section-731\" id=\"audioobject-example-template-h\" data-section-id=\"731\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">6.4.<\/span><span class=\"title-text\">Example 4 - AwxAudioObjExt.h<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audioobject-example-template-h')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><pre>\/\/ ============================================================\r\n\/\/ (C) 2017 Harman International Industries, Incorporated.\r\n\/\/ Confidential &amp; Proprietary. All Rights Reserved.\r\n\/\/ ============================================================\r\n\r\n\/**\r\n*   \\file       AwxAudioObjExt.h\r\n*   \\brief      Simple demo object Audio object to start a development of a new audio object- Header file\r\n*   \\details    Project    Extendable Audio Framework\r\n*   \\copyright  Harman\/Becker Automotive Systems GmbH\r\n*   \r\n        2017\r\n*   \r\n        All rights reserved\r\n*   \\author     xAF Team\r\n*   \\date       Nov 28, 2023\r\n*\/\r\n\r\n#ifndef AWXAUDIOOBJEXT_H\r\n#define AWXAUDIOOBJEXT_H\r\n\r\n\/*!\r\n*   xaf mandataory includes\r\n*\/\r\n#include \"AudioObject.h\"\r\n\r\n#define AWXAUDIOOBJEXT_VERSION_MAJOR             (0x01)\r\n#define AWXAUDIOOBJEXT_VERSION_MINOR             (0x01)\r\n#define AWXAUDIOOBJEXT_VERSION_REVISION          (0x06)\r\n#define AWXAUDIOOBJEXT_TUNING_VERSION_MAJOR      (0x01)\r\n#define AWXAUDIOOBJEXT_TUNING_VERSION_MINOR      (0x00)\r\n\r\n\/** here you can add all required include files required for    \r\n    the core functionality of your objects\r\n**\/\r\n\r\n#define AWX_AUDIO_OBJ_EXT_NUM_PARAMS         1\r\n#define FLOAT_ARRAY_SIZE                     10\r\n#define NUM_DIMENSION_VAR                    1\r\n\r\n\/**\r\n*    \\brief Simple example object to provide a starting point for a new audio object \r\n*\/\r\nclass CAwxAudioObjExt : public CAudioObject\r\n{\r\npublic:\r\n    static AOVersion version;\r\n    CAwxAudioObjExt();\r\n    virtual ~CAwxAudioObjExt();\r\n\r\n    \/**\r\n    *   Refer AudioObject.h for description\r\n    *\/\r\n\r\n\t\/*\r\n     *   It returns the class size of the given audio object.\r\n     *\/\r\n    xUInt32 getSize() const OVERRIDE;\r\n\r\n\t\/*\r\n     This function initializes all the object variables and parameters. In this method, the object shall initialize all its memory to appropriate values.\r\n    *\/\r\n    void init() OVERRIDE;\r\n    void calc(xAFAudio** inputs, xAFAudio** outputs) OVERRIDE;\r\n\r\n\t\/**\r\n     *    \\brief  This method is called when an object receives updated tuning data.\r\n     *    \\param  subblock               index selects the subblock\r\n     *    \\param  offsetBytes               points the offset in param memory (bytes)\r\n     *    \\param  sizeBytes                   number of parameters to be updated (bytes)\r\n     *    \\param  shouldAttemptRamp      whether or not this data should be attempt to apply instantly, or AO should attempt ramping\r\n     *\/\r\n    void tuneXTP(xSInt32 subblock, xSInt32 adrBytes, xSInt32 sizeBytes, xBool shouldAttemptRamp) OVERRIDE;\r\n\r\n\t\/**\r\n\t*    \\brief  Retrieves pointer to the start of the subblock\r\n\t*    \\param  subBlock subblock number\r\n\t*    \\return start address of the subblock\r\n\t*\/\r\n    xInt8* getSubBlockPtr(xUInt16 subBlock) OVERRIDE;\r\n\r\n\t\/**\r\n\t*    Returns the size of the sub block indicated by 'subBlock'\r\n\t*    \\param  subBlock the ID of the state subBlock we want to get the size of\r\n\t*    \\return size of subBlock\r\n\t*\/\r\n\r\n    xSInt32 getSubBlockSize(xUInt16 subblock) OVERRIDE;\r\n\r\n\t\/**\r\n    *   Assigns the additional configuration as the object requires.\r\n    *\/\r\n\tvoid assignAdditionalConfig() OVERRIDE;\r\n\r\n\t\/**\r\n     *    Control method to set the new value\r\n     *    \\param index - pin index of the object's control input we are writing to\r\n     *    \\param value - value we are writing\r\n     *\/\r\n\txSInt32 controlSet(xSInt32 index, xFloat32 param) OVERRIDE;\r\n\r\n\t\/**\r\n     *    \\brief  It reads the array of applied gain values through additional configuration \"Max Gain per channel\" for each channel.\r\n     *    \\param    index  denotes the channel index\r\n     *    \\return   Gain value read for each channel.\r\n     *\/\r\n    xFloat32 getMaxGain(xSInt32 index);\r\n\r\n\tenum AddnlVars {MAX_GAIN_PER_CHANNEL, THIRD_PARTY_MEM_BLK , AWX_EXT_NUM_ADD_VARS };\r\n\tenum Modes { GAIN, GAIN_WITH_CONTROL, AWX_EXT_NUM_MODES };\r\n\tenum MemAccess { DISABLE_BLOCK, ENABLE_BLOCK };\r\n\tenum memoryRecords { PARAM, COEFF, FLOATARRAY, NUM_MEM_RECORDS } memRecs;\r\n    enum PARAMS { NUM_PARAMS_PER_CHANNEL = 2 };\r\n\txInt8 m_EnMemory;\r\n\r\nprotected:\r\n    xFloat32* m_Coeffs;                                         \/\/\/&lt; internal pointer to COEFF memrec\r\n    xFloat32* m_Params;                                         \/\/\/&lt; internal pointer to PARAM memrec\r\n\txFloat32* m_MemBlock;                                       \/\/\/&lt; internal pointer to FLOATARRAY memrec\r\n\r\nprivate:\r\n\t\/**\r\n     *    \\brief  for each channel, checks the gain limits and calculates gain coefficient\r\n     *    \\param    channel     channel index\r\n     *    \\param    gainIndB    gain in dB\r\n     *\/\r\n    void calcGain(xSInt32 channelIndex, xFloat32 gainIndB);\r\n};\r\n#endif \/\/AWXAUDIOOBJEXT_H\r\n\r\n\r\n<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-example-templatetoolbox-h_wrap\"><div class=\"documentor-section  section-2293\" id=\"audio-object-example-templatetoolbox-h\" data-section-id=\"2293\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">6.5.<\/span><span class=\"title-text\">Example 5 - AwxAudioObjExtToolbox.h<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-example-templatetoolbox-h')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><pre>\/\/ ============================================================\r\n\/\/ (C) 2017 Harman International Industries, Incorporated.\r\n\/\/ Confidential &amp; Proprietary. All Rights Reserved.\r\n\/\/ ============================================================\r\n\r\n\/**\r\n*   \\file      AwxAudioObjExtToolbox.h\r\n*   \\brief     AwxAudioObj Audio Object Toolbox - Header file\r\n*   \\details   Project    Extendable Audio Framework\r\n*   \\copyright Harman\/Becker Automotive Systems GmbH\r\n*   \r\n       2017\r\n*   \r\n       All rights reserved\r\n*   \\author    xAF Team\r\n*   \\date      March 28, 2023\r\n*\/\r\n\r\n#ifndef AWXAUDIOOBJEXT_TOOLBOX_H\r\n#define AWXAUDIOOBJEXT_TOOLBOX_H\r\n\r\n\/*!\r\n*   xaf mandataory includes\r\n*\/\r\n#include \"AwxAudioObjExtMemRecs.h\"\r\n#include \"AudioObjectToolbox.h\"\r\n#include \"XafDefs.h\"\r\n\r\n\/** here you can add all required include files required for    \r\n    the core functionality of your objects\r\n**\/\r\n\r\nclass CAwxAudioObjExtToolbox : public CAudioObjectToolbox, public CAwxAudioObjExtMemRecs\r\n{\r\npublic:\r\n    \/**\r\n    *    Default ctor \/ dtor to initialite member variables of the audio object\r\n    *\/\r\n    CAwxAudioObjExtToolbox();\r\n    virtual ~CAwxAudioObjExtToolbox();\r\n\r\n\t\/**\r\n    *    Returns the object description\r\n    *    \\return pointer to structure describing object configuration.\r\n    *\/\r\n    const tObjectDescription*   getObjectDescription() OVERRIDE;\r\n   \r\n\t\/**\r\n     *    Writes object template information to the buffer returns number of bytes written\r\n     *    \\param  info   audio object tuning info.\r\n     *    \\param  buffer buffer for XML output.\r\n     *    \\param  maxLen maximal length of the buffer.\r\n     *    \\return size of generated xml file.\r\n     *\/\r\n\txUInt32 getXmlObjectTemplate(tTuningInfo* info, xInt8* buffer, xUInt32 maxLen) OVERRIDE;\r\n    \r\n\t\/**\r\n     *    \\brief  Returns the overall object description used in the object\r\n     *            within the device description file\r\n     *    \\param  info pointer to TuningInfo structure\r\n     *    \\param  buffer pointer to buffer used for file creation.\r\n     *    \\param  maxlen max allowed size of generated file.\r\n     *    \\return size of generated device.ddf file.\r\n     *\/\r\n\txUInt32 getXmlFileInfo (tTuningInfo* info, xInt8* buffer, xUInt32 maxLen) OVERRIDE;\r\n    \r\n\t\/**\r\n    *    Returns the mode description of object\r\n    *    \\param  mode    index of the selected mode\r\n    *    \\return pointer to the object mode description\r\n    *\/\r\n\tconst tModeDescription* getModeDescription  (xUInt32 mode) OVERRIDE;\r\n    \r\n\t\/**\r\n    *    This function sets the object configuration based on user settings indicated in GTT\r\n    *    \\param  configOut   the configuration of the object sent back to the tool\r\n    *    \\return error code\r\n    *\/\r\n\txAF_Error getObjectIo(ioObjectConfigOutput* configOut) OVERRIDE;\r\n\r\n\t\/**\r\n     *    Returns the additional variable description\r\n     *    \\param  index   index of the additional parameter\r\n     *    \\return instance of additional variable description\r\n     *\/\r\n\tconst additionalSfdVarDescription* getAdditionalSfdVarsDescription(xUInt32  index) OVERRIDE;\r\n    \r\n\t\/**\r\n      *    \\brief  Creates metadata entries for the specific audio object\r\n      *            this function must be overridden by each object supporting\r\n      *            the metadata feature. Otherwise default data will be created.\r\n      *\/\r\n\tvoid createStaticMetadata () OVERRIDE;\r\n\r\n\t\/**\r\n     *    \\brief  Creates mode and configuration dependent metadata entries for the specific audio object\r\n     *            this function must be overridden by each object supporting\r\n     *            the metadata feature.\r\n     *    \\param  configIn  the configuration of audio in, out and num elements passed in by the design tool\r\n     *    \\param  configOut the configuration of the object sent back to the tool\r\n     *\/\r\n    void createDynamicMetadata(ioObjectConfigInput&amp; configIn, ioObjectConfigOutput&amp; configOut) OVERRIDE;\r\nprotected:    \r\n};\r\n#endif \/\/AWXAUDIOOBJEXT_TOOLBOX_H\r\n<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"audio-object-example-templatememrecs-h_wrap\"><div class=\"documentor-section  section-2294\" id=\"audio-object-example-templatememrecs-h\" data-section-id=\"2294\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">6.6.<\/span><span class=\"title-text\">Example 6 - AwxAudioObjExtMemRecs.h<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#audio-object-example-templatememrecs-h')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><pre>\/\/ ============================================================\r\n\/\/ (C) 2017 Harman International Industries, Incorporated.\r\n\/\/ Confidential &amp; Proprietary. All Rights Reserved.\r\n\/\/ ============================================================\r\n\r\n\/**\r\n*   \\file      AwxAudioObjExtMemRecs.h\r\n*   \\brief     Simple demo Audio Object MemRecs - Header file\r\n*   \\details   Project    Extendable Audio Framework\r\n*   \\copyright Harman\/Becker Automotive Systems GmbH\r\n*   \r\n       2017\r\n*   \r\n       All rights reserved\r\n*   \\author    xAF Team\r\n*   \\date      July 7, 2021\r\n*\/\r\n\r\n#ifndef AWXAUDIOOBJEXT_MEM_RECS_H\r\n#define AWXAUDIOOBJEXT_MEM_RECS_H\r\n\r\n\/*!\r\n*   xaf mandataory includes\r\n*\/\r\n#include \"AwxAudioObjExt.h\"\r\n#include \"MemRecordProperties.h\"\r\n\r\n\/** here you can add all required include files required for    \r\n    the core functionality of your objects\r\n**\/\r\n\r\n\r\nclass CAwxAudioObjExtMemRecs : public CAwxAudioObjExt, public CMemoryRecordProperties\r\n{\r\npublic:\r\n    \r\n    xUInt8 getMemRecords(xAF_memRec* memTable, xAF_memRec&amp; scratchRecord, xInt8 target, xInt8 format) OVERRIDE;    \r\n};\r\n#endif \/\/AWXAUDIOOBJEXT_MEM_RECS_H\r\n<\/pre>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"general-guidelines_wrap\"><div class=\"documentor-section  section-725\" id=\"general-guidelines\" data-section-id=\"725\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">7.<\/span><span class=\"title-text\">General Guidelines<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#general-guidelines')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"hardware-abstraction_wrap\"><div class=\"documentor-section  section-726\" id=\"hardware-abstraction\" data-section-id=\"726\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">7.1.<\/span><span class=\"title-text\">Hardware Abstraction<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#hardware-abstraction')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Hardware abstraction is being done at Audio Object functions level such as calc, init etc.<\/p>\n<p class=\"heading\"><strong>Audio Object Function Level Abstraction<\/strong><\/p>\n<p>When the audio object function implementations are significantly different across various platforms, platform specific functions should be in different cpp files (file per core). A new cpp file needs to be introduced for every object that has any core-specific code. The object will still have one header file across all platforms. Dll specific functions should be part of Win32 specific files.<\/p>\n<p class=\"heading\"><strong>Folder Structure<\/strong><\/p>\n<p>The folder structure will look like the following:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-21382\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig2-1.jpg\" alt=\"\" width=\"391\" height=\"296\" \/> <img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-21383\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig1-1.jpg\" alt=\"\" width=\"389\" height=\"289\" \/><\/p>\n<p class=\"heading\"><strong>Override Defines<\/strong><\/p>\n<p>Each object will also have an \u201cOBJECT\u201d_OVERRIDE define. This define may be in the object header. However, for the xAF basic audio objects and the core objects, they have been combined into <em>build\\processor\\&#8221;PLATFORM&#8221;\\objectOverride&#8221;PLATFORM<\/em>&#8220;.<em>cmake<\/em>\u00a0file that shall be included in the build process.<\/p>\n<p>For non-Sharc platforms, the API function specific defines are available in AudioFramework.h and the Biquad specific defines are available in <em>private\\src\\framework\\filter\\CMakeLists.txt<\/em>:<\/p>\n<p class=\"text\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-21390\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig1-3.jpg\" alt=\"\" width=\"604\" height=\"197\" \/><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-21391\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig2-3.jpg\" alt=\"\" width=\"742\" height=\"272\" \/><\/p>\n<p>For example, build\\processor\\armv8a\\objectOverrideArmv8a.cmake will look like the following:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21393\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig1-4.jpg\" alt=\"\" width=\"1031\" height=\"255\" \/><\/p>\n<p>For SHARC based platforms, it is not possible to define the override macro as a logical expression of individual API macros as done above. Here the logical operation is done separately with the<em> math<\/em> directive and subsequently assigned to the overriding macro. Both the API function specific defines and the Biquad specific defines are available in this file build\\processor\\sharc\\objectOverrideSharc.cmake:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-21394\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig2-4.jpg\" alt=\"\" width=\"646\" height=\"520\" \/><\/p>\n<p>The FIR object has Sharc specific implementation for init() and calc(). The FIR_OVERRRIDE define will be the union of XAF_INIT and XAF_CALC defines as given below:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21388\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig2-2.jpg\" alt=\"\" width=\"605\" height=\"87\" \/><\/p>\n<p class=\"heading\"><strong>Files<\/strong><\/p>\n<p>In the generic implementation of the object, every function that is overridden in optimization files should be surrounded by an ifdef check. Using the example above, the generic file <em>FIR.cpp<\/em> would look like this:<\/p>\n<p class=\"text\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21396\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig1-5.jpg\" alt=\"\" width=\"1020\" height=\"346\" \/><\/p>\n<p>The Sharc file &#8211; <em>FIRSharc.cpp<\/em> &#8211; in this case should override both init() and calc():<\/p>\n<p class=\"text\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21397\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig2-5.jpg\" alt=\"\" width=\"1023\" height=\"380\" \/><\/p>\n<p class=\"heading\"><strong>Build System<\/strong><\/p>\n<p class=\"text\">Based on the target processor, the build system should always include the generic cpp implementation and the processor specific implementation. For example, when compiling for Sharc for the xAF basic audio objects:<\/p>\n<p class=\"heading\"><strong>Generic Files<\/strong><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21398\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig1-6.jpg\" alt=\"\" width=\"1007\" height=\"275\" \/><\/p>\n<p class=\"heading\"><strong>SHARC files<\/strong><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21399\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig2-6.jpg\" alt=\"\" width=\"1019\" height=\"224\" \/><\/p>\n<p class=\"text\">\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"hardware-abstraction-for-header-files_wrap\"><div class=\"documentor-section  section-1431\" id=\"hardware-abstraction-for-header-files\" data-section-id=\"1431\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">7.2.<\/span><span class=\"title-text\">Hardware Abstraction for Header files<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#hardware-abstraction-for-header-files')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>This hardware abstraction separates out platform specific member variables and member functions from audio object header file and keeps in hardware abstraction class. Implementation of this class is done in platform specific .cpp file. Accessing the hardware abstraction class members in audio object is done by forward declaring the class in later and instantiating this as a class member. Memory allocation and assignment is done for this instance in initMemRecord and init of the object. Sometimes, it may be needed to access audio object data members inside hardware abstraction class. This requirement is taken care by declaring a back pointer in hardware abstraction class and assigning it to audio object pointer in constructor function. Implementation for ToneControl audio object is completed and code snippets for the same is given below<\/p>\n<p class=\"heading\"><strong>Hardware Abstraction Class<\/strong><\/p>\n<p>Below is the implementation example of hardware abstraction class for ToneControl C66 implementation. Here m_ToneCtrlInst is the back pointer to access ToneControl data members in Tone Control hardware abstraction class which is initialized in constructor with CToneControl.<\/p>\n<p class=\"text\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7695\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/10\/Capture.png\" alt=\"\" width=\"385\" height=\"252\" \/><\/p>\n<p class=\"heading\"><strong>Instance of Hardware Abstraction class in Audio Object<\/strong><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7696\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/10\/Capture-1.png\" alt=\"\" width=\"389\" height=\"278\" \/><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7697\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/10\/Capture1.png\" alt=\"\" width=\"301\" height=\"61\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"memory-enums_wrap\"><div class=\"documentor-section  section-727\" id=\"memory-enums\" data-section-id=\"727\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">7.3.<\/span><span class=\"title-text\">Memory Enums<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#memory-enums')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Memory Enums shall be used for clarity and to avoid errors when allocating the memory required by the object. For example, the AudioToControl AO enum and<em> getMemRecords()<\/em> method are presented below.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-21403\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig1-7.jpg\" alt=\"\" width=\"554\" height=\"252\" \/><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21402\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/HA_Fig2-7.jpg\" alt=\"\" width=\"1026\" height=\"280\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"overlays-2_wrap\"><div class=\"documentor-section  section-728\" id=\"overlays-2\" data-section-id=\"728\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">7.4.<\/span><span class=\"title-text\">Overlays<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#overlays-2')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>Instead of dereferencing parameter and state memory as <strong><em>m_Params[0]<\/em><\/strong> and <strong><em>m_States[0]<\/em><\/strong>, overlays can be used where applicable. The same concept can be applied to coefficient memory if needed. The example below is presented for the gain object that contains three tunable parameters: gain value, invert, and mute.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4898\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/105.jpg\" alt=\"\" width=\"674\" height=\"232\" \/><\/p>\n<p>Below is an example of how the parameters above can be used during tuning:<\/p>\n<p class=\"text\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4899\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/106.jpg\" alt=\"\" width=\"652\" height=\"220\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"how-to-add-external-audio-object-into-audioworx-package_wrap\"><div class=\"documentor-section  section-2321\" id=\"how-to-add-external-audio-object-into-audioworx-package\" data-section-id=\"2321\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">8.<\/span><span class=\"title-text\">Adding external audio object into AudioworX package<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#how-to-add-external-audio-object-into-audioworx-package')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p>External audio objects can be added to the framework without re-compiling the libraries provided by AudioworX. There are following use cases to be supported:<\/p>\n<ul>\n<li>Third party audio object code to be compiled and linked (Source and headers placed in specific folder)<\/li>\n<li>Third party audio object is already pre-compiled and libraries needs to be linked (header + library)<\/li>\n<\/ul>\n<p>General assumption is that each use case can be satisfied for multiple 3rd party objects which are added to the extAudioObject.lib which itself needs to be linked to the application code on the target or to the xAFVirtualamp.dll based on one of the 3 mentioned use cases. It must be ensured all use cases can be used in parallel for different objects which means, every 3rd party object can be integrated individually by following one of the 3 proposed solutions or a combination of them. After a successful compilation and linking process a post-build step shall be applied to validate that all mandatory APIs for all added objects have been implemented correctly.<\/p>\n<p class=\"heading\"><strong>Common pre-requisites for all use cases<\/strong><\/p>\n<ul>\n<li>Define unique audio object id\n<ul>\n<li><em>#define OBJ_TEMPLATE 9001<\/em><\/li>\n<li>extendable-audio-framework\\external\\inc\\ExternalObjAudioIds.h or project specific path and name<\/li>\n<li>make sure the defined id is in the range of 9002 and 9999 and not used by any other object ID<\/li>\n<li>object name, c++ class name and header file names are matching the name used in the #define. E.g. user is creating MyObject -&gt;\n<ul>\n<li>#define OBJ_MYOBJECT 9002;<\/li>\n<li>C++ class name CMyObject (C is mandatory, camel case is optional)<\/li>\n<li>MyObject.h<\/li>\n<li>MyObjectMemRecs.h<\/li>\n<li>MyObjectToolbox.h<\/li>\n<\/ul>\n<\/li>\n<li>Tell the build script which files to be picked up\n<ul>\n<li>Directly in cmake by adding cpp files and libraries to be compiled and linked<\/li>\n<li>Path to a CmakeLists.txt file containing all required information<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"heading\"><strong>Third party code to be compiled and linked (Source and headers placed in specific folder)<\/strong><\/p>\n<p>The external 3rd party build solution allows the developer to add source files, header files and libraries into a predefined folder structure. The Template audio object shall be used as a reference example on how to implement the third party code the for the external object. The CMakeLists.txt in the external folder must be modified accordingly to include the newly added cpp file(s) and library(s).<\/p>\n<p>Folder structure for external audio object.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17839\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/folder_structure.jpg\" alt=\"\" width=\"459\" height=\"898\" \/><\/p>\n<p class=\"heading\"><strong>Third party object is pre-compiled and needs to be linked only (header + library)<\/strong><\/p>\n<p>This use case assumes that external object(s) has been build according to AWX specifications and the result of this build is supposed to be linked to other audio objects in the xAFVirtualAmp.dll. To achieve this, the developer must add the following files into the external sub folders:<\/p>\n<ul>\n<li>Inc\n<ul>\n<li>Myobject.h<\/li>\n<li>MyobjectMemRecs.h<\/li>\n<li>MyobjectToolbox.h<\/li>\n<\/ul>\n<\/li>\n<li>Lib\n<ul>\n<li>xafMyObject-lib_release.ext (.ext ==.lib, .dlb, etc. based on the target)<\/li>\n<li>MyObjectPrivate.ext<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The folder structure and naming inside the lib folder must match the ones which are released within the xaf\\public\\lib\\. The developer must ensure, that libraries are available for all supported targets (WIN64, Sharc, etc.) and placed properly in the correct sub-folders. In addition to that, the CMakeLists.txt must be changed to link the additionally added libraries. The Release cmake file will have a section with proper comments on how to do so. There will be additional .bat file will be provided to make it convenient for the end user for linking and creating .dll<\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><div class=\"doc-sectionwrap\" id=\"8-1-building-external-ao_wrap\"><div class=\"documentor-section  section-2323\" id=\"8-1-building-external-ao\" data-section-id=\"2323\"><h2 class=\"doc-sec-title\" style=\"clear:none;line-height:33px;font-family:Montserrat,sans-serif;font-size:25px;font-weight:700;font-style:normal;color:#3c3c3c;border-bottom: 1px dotted #e6e6e6;\"> <span class=\"doc-sec-count\" style=\"display:inline-block\">8.1.<\/span><span class=\"title-text\">Building External AO<\/span> <span class=\"doc-sec-link doc-noprint\" onclick=\"prompt('Press Ctrl + C, then Enter to copy to clipboard','https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F4420#8-1-building-external-ao')\"><span class=\"icon-hyperlink doc-icons\"><\/span><\/span> <div class=\"documentor-social doc-noprint\"><\/div><\/h2><div class=\"doc-sec-content\" ><p class=\"heading\"><strong>Prerequisites<\/strong><\/p>\n<p>1. Developer should generate the corresponding libraries before starting the build process execution. Otherwise, there will be errors when executing the batch file <strong>Build.bat<\/strong>:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17858 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_error_01.png\" alt=\"\" width=\"1114\" height=\"286\" \/><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17859 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_error_02.png\" alt=\"\" width=\"1111\" height=\"286\" \/><\/p>\n<p>For generating xAF libraries:<\/p>\n<pre><strong>python build.py --platform=WinPc --target=Win64 --program=allExtObjects --profile=Release<\/strong><\/pre>\n<p>For generating AWX VirtualAmp:<\/p>\n<pre><strong>python build.py --target=Win64 --program=virtualAmp --profile=Release --group=all<\/strong><\/pre>\n<p>2.\u00a0 Place the the external audio object&#8217;s source code under external\\src\\<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-17872 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_cpp.png\" alt=\"\" width=\"274\" height=\"183\" \/><\/p>\n<p>3. Place the external audio object header file under external\\inc\\ .\u00a0 The header file name should be equal to the external audio object class name. For example, if the audio object name is CTemplate, the header file name should be Template.h.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17873 size-full alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_header-e1660686193942.png\" alt=\"\" width=\"285\" height=\"254\" \/><\/p>\n<p>4.\u00a0 Make sure the external audio object&#8217;s pre-processor macro is defined in file external\\inc\\ExternalObjAudioIds.h. The name should be <strong>OBJ_&#8221;header file name&#8221; <\/strong> and the value should be in the range between 9002 and 9999.<\/p>\n<p>E.g. Audio Object Template ID:<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17861 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_ID.png\" alt=\"\" width=\"420\" height=\"118\" \/><\/p>\n<p>5. If additional libraries need to be linked, add them in the file CmakeLists.txt located in:<\/p>\n<p>extendable-audio-framework\\external\\src\\<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17870 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_cmakelists_01.png\" alt=\"\" width=\"560\" height=\"93\" \/><\/p>\n<p class=\"heading\"><strong>Steps for building Audio Object Template<\/strong><\/p>\n<p>1. Open a command prompt window in Admin mode.<\/p>\n<p>2. Execute the batch file Build.bat<\/p>\n<p>3. After the build process is complete, the corresponding VirtualAmpExternal.dll file will be available at the path \\external\\virtualamp\\output\\build_dir_WIN64_Release\\Release.<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17864 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_build_02.png\" alt=\"\" width=\"964\" height=\"358\" \/><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-17865 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_build_03.png\" alt=\"\" width=\"460\" height=\"162\" \/><\/p>\n<p>4. The generated .dll file can be imported as an audio library into GTT to update the toolbox with the newly added audio object(s).<\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17887 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_GTT_04.png\" alt=\"\" width=\"292\" height=\"340\" \/><\/p>\n<p><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17875 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_GTT_03.png\" alt=\"\" width=\"1208\" height=\"495\" \/><\/p>\n<p class=\"note\">If the developer needs to use <strong>debug<\/strong> build mode to make sure everything is working as expected, the file <strong>Build.bat<\/strong> can be modified accordingly by changing -DCMAKE_BUILD_TYPE=&#8221;Release&#8221; to <strong>-DCMAKE_BUILD_TYPE=&#8221;Debug&#8221; <\/strong>and &#8211;config Release to <strong>&#8211;config Debug<\/strong>.<br \/>\n<img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17884 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_Debug_01.png\" alt=\"\" width=\"849\" height=\"209\" \/><\/p>\n<p>&nbsp;<\/p>\n<p class=\"note\">To debug the audio object in Visual Studio, the developer has to select the option <strong>Debug-&gt;Attach to Process&#8230;\u00a0<\/strong>Then, select Attach to:\u00a0<strong>Native code.\u00a0<\/strong>Finally, filter out the desired process:<br \/>\n&#8211; Toolbox:<br \/>\n<img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17886 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_Debug_03.png\" alt=\"\" width=\"657\" height=\"542\" \/><br \/>\n&#8211; Calc function and tuning:<br \/>\n<img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" class=\"wp-image-17885 alignnone\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2022\/08\/AOT_Debug_02.png\" alt=\"\" width=\"658\" height=\"543\" \/><\/p>\n<\/div><div class=\"documentor-help\"><div class=\"doc-mdate doc-noprint\">Last updated on May 13, 2024<\/div><div class=\"negative-feedbackform doc-noprint\">\n\t\t\t\t\t<\/div><div class=\"feedback-msg doc-noprint\"><\/div><\/div><\/div><\/div><!--.\/doc-sectionwrap--><\/div><!--.doc-sec-container--><div id=\"sugestedit_popup44\" class=\"sugestedit_popup\">\n\t\t\t\t<a class=\"modal_close\"><\/a>\n\t\t\t\t<form name=\"documentor-suggestform\" method=\"post\" class=\"documentor-suggestform\">\n\t\t\t\t\t<div class=\"doc-frmdiv\" style=\"font-weight: bold;\">Suggest Edit\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"doc-frmdiv\">\n\t\t\t\t\t\t<input type=\"text\" name=\"sec_title\" class=\"sedit-sectitle txtinput\" value=\"\" \/>\n\t\t\t\t\t<\/div><div class=\"doc-frmdiv\">\n\t\t\t\t\t\t\t<input type=\"text\" name=\"name\" class=\"txtinput\" placeholder=\"Name\" required \/>\n\t\t\t\t\t\t<\/div><div class=\"doc-frmdiv\">\n\t\t\t\t\t\t\t<input type=\"email\" class=\"emailinput\" placeholder=\"Email\" name=\"email\" required \/> \n\t\t\t\t\t\t<\/div><div class=\"doc-frmdiv\">\n\t\t\t\t\t\t\t<textarea name=\"content\" class=\"textareainput\" placeholder=\"Post your suggestion...\" required><\/textarea>\n\t\t\t\t\t\t<\/div><div class=\"doc-frmdiv\"><label> Captcha :&nbsp; <\/label><span class=\"doc-sedit-captcha\"><\/span><\/div><input type=\"hidden\" class=\"sedit-secid\" name=\"secid\" value=\"\" \/>\n\t\t\t\t\t<input type=\"hidden\" class=\"sedit-postid\" name=\"sedit_postid\" value=\"\" \/>\n\t\t\t\t\t<input type=\"hidden\" class=\"sedit-docid\" name=\"docid\" value=\"44\" \/>\n\t\t\t\t\t<button class=\"docsubmit-suggestform\"> Submit <\/button>\n\t\t\t\t<\/form>\n\t\t\t<\/div><script type=\"text\/javascript\">\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tjQuery(\"#documentor-44\").documentor({\n\t\t\t\t\tdocumentid\t: 44,\n\t\t\t\t\tdocid\t\t: \"documentor-44\",\n\t\t\t\t\tanimation\t: \"\",\n\t\t\t\t\tindexformat\t: \"1\",\n\t\t\t\t\tpformat\t\t: \"decimal\",\n\t\t\t\t\tcformat\t\t: \"decimal\",\t\t\t\t\t\n\t\t\t\t\tsecstyle\t: \"clear:none;line-height:17px;font-family:Montserrat,sans-serif;font-size:12px;font-weight:normal;font-style:normal;color:#000000;\",\n\t\t\t\t\tsecelement  : \"2\",\n\t\t\t\t\tactnavbg_default: \"1\",\n\t\t\t\t\tactnavbg_color\t: \"#000000\",\n\t\t\t\t\tenable_ajax\t: \"0\",\n\t\t\t\t\tload\t\t: \"0\",\n\t\t\t\t\tscrolling\t: \"1\",\n\t\t\t\t\tfixmenu\t\t: \"1\",\n\t\t\t\t\tskin\t\t: \"mint\",\n\t\t\t\t\tscrollBarSize\t: \"6\",\n\t\t\t\t\tscrollBarColor\t: \"#000000\",\n\t\t\t\t\tscrollBarOpacity: \"1\",\n\t\t\t\t\twindowprint\t: \"0\",\n\t\t\t\t\tmenuTop: \"5\",\n\t\t\t\t\tsocialshare\t: 0,\n\t\t\t\t\tsharecount\t: 1,\n\t\t\t\t\tfbshare\t\t: 1,\n\t\t\t\t\ttwittershare\t: 1,\n\t\t\t\t\tgplusshare\t: 1,\n\t\t\t\t\tpinshare\t: 1,\n\t\t\t\t\ttogglechild\t: 1,\n\t\t\t\t\tnoResultsStr: \"No results found!\",\n\t\t\t\t});\t\n\t\t\t});<\/script><div class=\"cleardiv cleardiv-rtl\"><\/div><\/div><!--\/.document-wrapper--><div class=\"cleardiv cleardiv-rtl\"><\/div><\/div><div class=\"cleardiv\"> <\/div><div id=\"documentor-44-end\"><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":4401,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","footnotes":""},"coauthors":[165],"_links":{"self":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/pages\/4420"}],"collection":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4420"}],"version-history":[{"count":4,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/pages\/4420\/revisions"}],"predecessor-version":[{"id":5741,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/pages\/4420\/revisions\/5741"}],"up":[{"embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/pages\/4401"}],"wp:attachment":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4420"}],"wp:term":[{"taxonomy":"author","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=4420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}