{"id":4712,"date":"2019-06-17T04:02:57","date_gmt":"2019-06-17T02:02:57","guid":{"rendered":"https:\/\/demdlx704as001.ad.harman.com\/?p=4712"},"modified":"2021-06-07T08:30:41","modified_gmt":"2021-06-07T06:30:41","slug":"steps-for-adding-external-audio-objects-to-the-framework-using-audio-object-library","status":"publish","type":"post","link":"https:\/\/audioworx.transfunnel.co\/old\/?p=4712","title":{"rendered":"Steps for adding external audio objects to the framework using audio object library"},"content":{"rendered":"<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Create the audio object as described above<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Build the library for the audio object and create corresponding header file for the audio object library to expose the functions. An example of a header file can be found under external\/inc\/Template.h<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">The object header file name should be similar to the audio object class name. For example if the audio object class name is CTemplate, the header file name should be Template.h<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Create a header file which contains object Ids for all the audio objects you want to create.<\/p>\n<p class=\"text\">Example object Id should be similar to Figure below. Also find the same file under \/external\/inc\/AudioIds.h<\/p>\n<p class=\"text\"><img decoding=\"async\" class=\"alignnone wp-image-4713\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/078.jpg\" alt=\"\" width=\"305\" height=\"101\" \/><\/p>\n<p class=\"text\">Name of the pre-processor definition should be OBJ_\u201cheader file name\u201c. For example if the name of the class is CDcBlocker, then the header file name should be DcBlocker.h and pre-processor definition in AudioIds.h should be #define OBJ_DCBLOCKER 1005<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Create a cmake configuration as shown in Figure 17-2and set the following variables<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\"><span class=\"emph\">EXTERNAL_OBJECT_INCLUDE:<\/span> Specify the folders which contains the audio object header files created.<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\"><span class=\"emph\">EXTERNAL_OBJECT_LIB :<\/span> Specify audio object libraries.<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\"><span class=\"emph\">OBJECT_ID_PATH:<\/span> Specify object ID file.<\/p>\n<p>&nbsp;<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4714\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/079.jpg\" alt=\"\" width=\"542\" height=\"164\" \/><\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Navigate to external\/ folder<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Type cmake.exe&#8221; . -DTARGET_ARCH=WIN32 -DCMAKE_BUILD_TYPE=Release -DEXTERNAL_OBJECT_CONFIG =&#8221;C:\/Object_config.cmake&#8221;<br \/>\nNote: Assuming Object_config.cmake is under C:\/<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">This will generate the xAFLibraries.sln under external\/ folder<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Open the solution file with administrator privilege and build the visual studio project<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">This will produce the xAF Libraries under public\/lib\/win32\/Debug folder if built for Debug mode<br \/>\nand public\/lib\/win32\/Release folder if built for Release mode<\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">The generated libraries will contain the newly created audio object(s)<\/p>\n<p class=\"text\">If user has a MSVC project to build the object library, it can be added to the xAFLibraries.sln for debugging purposes.<\/p>\n<h4 class=\"text\">Example #1 (Building with cmake on Summit)<\/h4>\n<p class=\"actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Navigate to &lt;car_audio_repo&gt;\/customer\/reference\/xaf_reference_app\/c66_app folder and below files are present<\/p>\n<ul class=\"bullet-points\">\n<li class=\"text\">objectconfigC66.cmake<\/li>\n<li class=\"text\">AudioIdsC66.h<\/li>\n<li class=\"text\">CMakeLists.txt<\/li>\n<\/ul>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">In file objectconfigC66.cmake, the variables EXTERNAL_OBJECT_INCLUDE, EXTERNAL_OBJECT_LIB and OBJECT_ID_PATH are set with audio objects to be built.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-4715\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/080.jpg\" alt=\"\" width=\"583\" height=\"213\" \/><\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">In file AudioIdsC66.h, IDs of the audio objects are present.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-4716\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/081.jpg\" alt=\"\" width=\"355\" height=\"136\" \/><\/p>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">In file CMakeLists.txt, add_subdirectory for &lt;xaf_repo&gt;\/external folder is done using objectconfigC66.cmake file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4717\" src=\"https:\/\/audioworx.transfunnel.co\/old\/wp-content\/uploads\/2019\/06\/082.jpg\" alt=\"\" width=\"638\" height=\"145\" \/><\/p>\n<h4 class=\"text\">Example #2 (Building with cmake on Win32 )<\/h4>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Navigate to &lt;awx_winpc_repo&gt; folder and below files are present.<\/p>\n<ul>\n<li class=\"text\">build.py<\/li>\n<li>CMakeLists.txt<\/li>\n<li class=\"text\">readMe.txt<\/li>\n<\/ul>\n<p class=\"text actions\" style=\"margin-top: 0px; text-indent: 0.2cm;\">Follow the steps listed in the readMe.txt file to generate the xAFVirtualAmp.dll file in the\u00a0 &lt;awx_winpc_repo&gt;\/public\/lib\/win32\/Release or &lt;awx_winpc_repo&gt;\/public\/lib\/win32\/Debug folder.<\/p>\n<p class=\"text\">\n<p class=\"text\">\n","protected":false},"excerpt":{"rendered":"<p>Create the audio object as described above Build the library for the audio object and create corresponding header file for the audio object library to expose the functions. An example of a header file can be found under external\/inc\/Template.h The object header file name should be similar to the audio object class name. For example [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","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":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[]},"categories":[54,10],"tags":[],"coauthors":[165],"_links":{"self":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4712"}],"collection":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/types\/post"}],"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=4712"}],"version-history":[{"count":7,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4712\/revisions"}],"predecessor-version":[{"id":13014,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/4712\/revisions\/13014"}],"wp:attachment":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4712"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=4712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}