{"id":28801,"date":"2024-06-06T12:11:01","date_gmt":"2024-06-06T10:11:01","guid":{"rendered":"https:\/\/demdlx704as001.ad.harman.com\/?post_type=documentor-sections&#038;p=28801"},"modified":"2024-07-04T08:45:46","modified_gmt":"2024-07-04T06:45:46","slug":"potentially-relevant-changes","status":"publish","type":"post","link":"https:\/\/audioworx.transfunnel.co\/old\/?p=28801","title":{"rendered":"Potentially Relevant Changes"},"content":{"rendered":"<p class=\"heading\">MasterPresetController<\/p>\n<ul>\n<li>Methods of MasterPresetControl.h have been moved to CMasterPresetControl class and not available as static functions anymore. In order to call MPC related functions manually now an instance of the MPC class is required.<\/li>\n<li>xTPInterpreter, MPC and Device parser are extended due to custom actions and Core Object settings in Master preset controller :\n<ul>\n<li>Core object processing state changes<\/li>\n<li>Custom actions\n<ul>\n<li>Control set<\/li>\n<li>Custom xTP commands<\/li>\n<li>Audio Object processing state<\/li>\n<li>Refresh control (not yet supported in GTT)<\/li>\n<li>Prepared for Swoosh (not yet supported on MPC GUI side)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Below two APIs are changed from previous version of xAF and it is aligned in AudioworX CCB meeting<\/li>\n<li><em>IxTPInterpreter::handleSlotUpdate()\u00a0<\/em>\n<ul>\n<li>m_MasterPresetControl is a class and not a structure. Hence integrator should use :MasterPresetControl.m_SlotMap<\/li>\n<\/ul>\n<\/li>\n<li><em>IxTPInterpreter::loadDefaultSlot()\u00a0<\/em>\n<ul>\n<li>m_MasterPresetControl is a class and not a structure. Hence integrator should use :MasterPresetControl.xAFGetDefaultSlot(m_SlotRequested)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"heading\">xTPInterpreter<\/p>\n<ul>\n<li><strong>switchInstanceState <\/strong>method was renamed to <strong>switchCoreObjectState<\/strong><\/li>\n<li><strong>m_MasterPresetControl<\/strong> type has changed from <strong>xAFMasterPresetControl<\/strong> to <strong>CMasterPresetControl<\/strong><\/li>\n<li><strong>core object id<\/strong> (16-bit) is being used instead of <strong>instance id<\/strong> (8-bit) for below virtual methods mentioned.<\/li>\n<li>virtual methods <strong>modified<\/strong>\n<ul>\n<li>xAF_Error <strong>switchCoreObjectState<\/strong>(MessageBuffer&amp; message, xUInt8 core, <strong>xUInt16 coreObjID<\/strong>, CalcStates targetState, xFloat32 fadeTime) const;<\/li>\n<li>xAF_Error <strong>onStateChange<\/strong>(MessageBuffer&amp; msgBuf, xUInt8 core, <strong>xUInt16 coreObjectID<\/strong>, CalcStates rampState)<\/li>\n<li>xAF_Error onSlotLoaded(MessageBuffer&amp; msgBuf, xUInt8 core, <strong>xUInt16 coreObjectID<\/strong>, slotloadingstatus status)<\/li>\n<\/ul>\n<\/li>\n<li>new virtual method has been <strong>added<\/strong>\n<ul>\n<li>xAF_Error <strong>filterPresets<\/strong>()<\/li>\n<li>xAF_Error <strong>processAction<\/strong>(const xAFAction&amp; action)<\/li>\n<li>xAF_Error <strong>handleFileUpdate<\/strong>(xUInt16 fileID)<\/li>\n<li>xAF_Error <strong>handleFileMapUpdateInternal<\/strong>()<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"heading\">AudioCore<\/p>\n<ul>\n<li>swoosh support added (switch between current and new preset without ramping)<\/li>\n<\/ul>\n<p class=\"heading\">ChunkParser<\/p>\n<ul>\n<li>getCheckSum() <strong>const<\/strong><\/li>\n<li>getCheckSumAlgorithm <strong>const<\/strong><\/li>\n<\/ul>\n<p class=\"heading\">SetiParser<\/p>\n<ul>\n<li>Added support for swoosh (optional parameter in the constructor)\n<ul>\n<li>SETIParser(CAudioProcessingBase* framework, <strong>xBool swooshEnabled = false<\/strong>);<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"heading\">Seti Files<\/p>\n<ul>\n<li>added a new chunk type for audio object state changes per preset<\/li>\n<\/ul>\n<p class=\"heading\">Device load slot status<\/p>\n<ul>\n<li>slotloadingstatus enum extended by 2 additional states\n<ul>\n<li>enum slotloadingstatus<br \/>\n{<br \/>\nXTP_DEVICE_SLOT_LOADED = 0x00,<br \/>\nXTP_DEVICE_SLOT_LOADING_IN_PROGRESS,<br \/>\nXTP_DEVICE_SLOT_LOAD_NOT_POSSIBLE,<br \/>\nXTP_DEVICE_NUM_LOAD_SLOT_STATUS<br \/>\n};<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"heading\">FileController<\/p>\n<div>\n<p>File Controller feature allows user to select and manage multiple files on the embedded device (DSP side). GTT&#8217;s file controller UI is used for this purpose.<\/p>\n<ul>\n<li>xTPInterpreter module is updated to support file controller related xTP commands.\n<ul>\n<li>StaticStorageInterface class has <em>getSize<\/em> virtual method to be implemented by platform\n<div style=\"padding-left: 120px;\"><\/div>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div style=\"padding-left: 120px;\"><em>class StaticStorageInterface : public IOBase<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>{<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>\u00a0 \u00a0public:<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>\u00a0 \u00a0&#8230;<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>\u00a0 \u00a0virtual xUInt32 getSize() = 0;<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>};<\/em><\/div>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>FLMP<\/em> and <em>ANYFILE<\/em> are added as flash file types<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<div style=\"padding-left: 120px;\"><em>typedef enum FLASHFILETYPE<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>{<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>\u00a0 &#8230;<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>\u00a0 FLMP, \u00a0 \u00a0\/\/ file map<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>\u00a0 ANYFILE, \u00a0\/\/ any file including wav, pcm<\/em><\/div>\n<div style=\"padding-left: 120px;\"><em>} flashfileType;<\/em><\/div>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>FLMP<\/em> is for <em>filemap.<\/em> There is single filemap file per device. it contains information about all files. each file has fileID, name, size and checksum.<\/li>\n<li><em>ANYFILE\u00a0<\/em>is for pcm, wav or any other file. Each file has a unique id.<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><em>StaticStorageInterface* openMemoryStorage(memAlloc alloc, flashfileType type, xUInt32 coreID, xUInt32 instanceID, IOBase::AccessMode mode, xUInt16 contextID);<\/em><\/div>\n<ul>\n<li>\n<div>Platform already implements this function. Platform passes this function during xtp interpreter initialization. Implementation has to updated to handle newly added flashfiletypes &#8212; <em>FLMP<\/em> and <em>ANYFILE<\/em><\/div>\n<\/li>\n<li>when type is <em>FLMP<\/em>,\u00a0 <em>coreID\/<\/em>instanceID\/contextID are not relevant. <em>FLMP<\/em> is single file per device.<\/li>\n<li>when type is <em>ANYFILE<\/em>, <em>contextID<\/em> is fileID. Each file is identified by a unique <em>fileID<\/em>. <em>coreID<\/em> and <em>instanceID<\/em> are not relevant.<\/li>\n<\/ul>\n<\/li>\n<li><em>IxTPInterpreter::onXTPMessageFileController()<\/em>\n<ul>\n<li>Method handles all the xTP commands related to the file controller.<\/li>\n<\/ul>\n<\/li>\n<li><em>IxTPInterpreter::handleFileMapUpdate()<\/em>\n<ul>\n<li>Virtual method that is called by <em>IxTPInterpreter<\/em> after <em>filemap<\/em> is received. Platform implements this function. <em>Filemap<\/em> parsing with <em>DeviceParser<\/em> is done here<\/li>\n<\/ul>\n<\/li>\n<li><em>IxTPInterpreter::handleFileUpdate()<\/em>\n<ul>\n<li>Virtual method that is called by <em>IxTPInterpreter<\/em> after a file is received. It is optional for platform to implement this.<\/li>\n<\/ul>\n<\/li>\n<li><em>DeviceParser::readFileControllerProps()<\/em>\n<ul>\n<li>Parses filemap. used by platform&#8217;s implementation of <em>IxTPInterpreter::handleFileMapUpdate()<\/em><\/li>\n<\/ul>\n<\/li>\n<li>DeviceParser::getFileControllerResults()\n<ul>\n<li>For getting a copy of filemap data structure <em>xAFFileMap. <\/em>Used by <em>IxTPInterpreter::handleFileMapUpdate()<\/em> after sucessfully parsing <em>filemap.<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<div><em>AudioCore <\/em>or <em>AudioCoreBase<\/em> instatiation<\/div>\n<ul>\n<li>\n<div><em>virtual StaticStorageInterface* getOpenStoragePtr(flashfileType type, unsigned int contextualData, IOBase::AccessMode mode) const = 0;<\/em><\/div>\n<ul>\n<li>Platform already implements this virtual method when instantiating AudioCore or AudioCoreBase class. In order to support the newly added flashfiletypes &#8212; <em>FLMP<\/em> and <em>ANYFILE, <\/em>platform has to update the implementation of this function<em>.<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<p class=\"heading\">Logger<\/p>\n<p>A logger is introduced that has 5 severity levels which are, &#8216;CRITICAL&#8217;, &#8216;ERROR&#8217;, &#8216;WARNING&#8217;, &#8216;INFO&#8217; &amp; &#8216;DEBUG&#8217;. Audio objects and the framework\/system have their own separate flags for enabling logs. By default, the audio objects will have all its log statements compiled out. To see logs from the audio object, code has to be recompiled with the necessary flag.<\/p>\n<table style=\"border-collapse: collapse; width: 90.7502%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 18.8938%;\"><strong>Implementation<\/strong><\/td>\n<td style=\"width: 71.8564%;\">\n<p>To add log statements, the developer will inherit from the IxAFLog class declared in xaflog.h. Following this, the class that is logging will define a function called logger with the following argument list:<\/p>\n<p>void logger(xAFLogLevel level, const xInt8* const fmtStr, &#8230;) const<\/p>\n<p>The main purpose of this function is to access the type and ID of the object that is logging. For example, the type could indicate that it is the audio object that is logging, and the ID could indicate the block ID, virtual core ID and core object ID. The ID and the type are then passed on to another function that is implemented by the platform:<\/p>\n<p>void xAFLogMessage(xAFLogLevel logLevel, xAFLogObject objType, xUInt32 objectID, const xInt8* message)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 18.8938%;\"><strong>Usage<\/strong><\/td>\n<td style=\"width: 71.8564%;\">Example log statements for audio object:<\/p>\n<ul>\n<li>XAFLOG_AO_INFO(&#8220;Gain value for channel %d is %f\u201d, channel, m_Coeffs[channel]);<\/li>\n<li>XAFLOG_AO_DEBUG(\u201cValue of tuneSize = %d\u201d, tuneSize);<\/li>\n<li>XAFLOG_AO_ERROR(\u201cSubblock value exceeded!\u201d);<\/li>\n<\/ul>\n<p>Example log statements for the framework is:<\/p>\n<ul>\n<li>XAFLOG_INFO(&#8220;Start init audioObj\u201d);<\/li>\n<li>XAFLOG_WARNING(\u201cFailed to load configuration, defaulting to %d in and\u00a0 %d out, m_CurrentInputs, m_CurrentOutputs);<\/li>\n<li>XAFLOG_ERROR(\u201cQueryPerformanceFrequency failed!\u201d);<\/li>\n<\/ul>\n<p>Logs for audio objects are disabled by default. The macro to enable them in cmake is: <span class=\"ui-provider a b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak\" dir=\"ltr\">XAFLOG_CONFIG_AO. Another option to enable them is to use the cmd line argument while executing the python build script (&#8211;logConfigAO=logLevel; logLevels=[&#8216;none&#8217;, &#8216;critical&#8217;, &#8216;error&#8217;, &#8216;warning&#8217;, &#8216;info&#8217;, &#8216;debug&#8217;])\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 18.8938%;\"><strong>Backwards incompatible change<\/strong><\/td>\n<td style=\"width: 71.8564%;\">The earlier logging mechanism had two functions for setting and getting the logger function, which are now removed.<\/p>\n<ul>\n<li>void setLog(void(*log)(const xInt8* message))<\/li>\n<li>logDel getLog() const OVERRIDE;<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MasterPresetController Methods of MasterPresetControl.h have been moved to CMasterPresetControl class and not available as static functions anymore. In order to call MPC related functions manually now an instance of the MPC class is required. xTPInterpreter, MPC and Device parser are extended due to custom actions and Core Object settings in Master preset controller : Core [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":0,"comment_status":"closed","ping_status":"closed","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":"on","ocean_gallery_id":[]},"categories":[1],"tags":[],"coauthors":[198],"_links":{"self":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/28801"}],"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\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28801"}],"version-history":[{"count":33,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/28801\/revisions"}],"predecessor-version":[{"id":30181,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=\/wp\/v2\/posts\/28801\/revisions\/30181"}],"wp:attachment":[{"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28801"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/audioworx.transfunnel.co\/old\/index.php?rest_route=%2Fwp%2Fv2%2Fcoauthors&post=28801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}