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 object processing state changes
- Custom actions
- Control set
- Custom xTP commands
- Audio Object processing state
- Refresh control (not yet supported in GTT)
- Prepared for Swoosh (not yet supported on MPC GUI side)
- Below two APIs are changed from previous version of xAF and it is aligned in AudioworX CCB meeting
- IxTPInterpreter::handleSlotUpdate()
- m_MasterPresetControl is a class and not a structure. Hence integrator should use :MasterPresetControl.m_SlotMap
- IxTPInterpreter::loadDefaultSlot()
- m_MasterPresetControl is a class and not a structure. Hence integrator should use :MasterPresetControl.xAFGetDefaultSlot(m_SlotRequested)
xTPInterpreter
- switchInstanceState method was renamed to switchCoreObjectState
- m_MasterPresetControl type has changed from xAFMasterPresetControl to CMasterPresetControl
- core object id (16-bit) is being used instead of instance id (8-bit) for below virtual methods mentioned.
- virtual methods modified
- xAF_Error switchCoreObjectState(MessageBuffer& message, xUInt8 core, xUInt16 coreObjID, CalcStates targetState, xFloat32 fadeTime) const;
- xAF_Error onStateChange(MessageBuffer& msgBuf, xUInt8 core, xUInt16 coreObjectID, CalcStates rampState)
- xAF_Error onSlotLoaded(MessageBuffer& msgBuf, xUInt8 core, xUInt16 coreObjectID, slotloadingstatus status)
- new virtual method has been added
- xAF_Error filterPresets()
- xAF_Error processAction(const xAFAction& action)
- xAF_Error handleFileUpdate(xUInt16 fileID)
- xAF_Error handleFileMapUpdateInternal()
AudioCore
- swoosh support added (switch between current and new preset without ramping)
ChunkParser
- getCheckSum() const
- getCheckSumAlgorithm const
SetiParser
- Added support for swoosh (optional parameter in the constructor)
- SETIParser(CAudioProcessingBase* framework, xBool swooshEnabled = false);
Seti Files
- added a new chunk type for audio object state changes per preset
Device load slot status
- slotloadingstatus enum extended by 2 additional states
- enum slotloadingstatus
{
XTP_DEVICE_SLOT_LOADED = 0x00,
XTP_DEVICE_SLOT_LOADING_IN_PROGRESS,
XTP_DEVICE_SLOT_LOAD_NOT_POSSIBLE,
XTP_DEVICE_NUM_LOAD_SLOT_STATUS
};
- enum slotloadingstatus
FileController
File Controller feature allows user to select and manage multiple files on the embedded device (DSP side). GTT’s file controller UI is used for this purpose.
- xTPInterpreter module is updated to support file controller related xTP commands.
- StaticStorageInterface class has getSize virtual method to be implemented by platform
-
- FLMP and ANYFILE are added as flash file types
-
-
- FLMP is for filemap. There is single filemap file per device. it contains information about all files. each file has fileID, name, size and checksum.
- ANYFILE is for pcm, wav or any other file. Each file has a unique id.
-
StaticStorageInterface* openMemoryStorage(memAlloc alloc, flashfileType type, xUInt32 coreID, xUInt32 instanceID, IOBase::AccessMode mode, xUInt16 contextID);
-
Platform already implements this function. Platform passes this function during xtp interpreter initialization. Implementation has to updated to handle newly added flashfiletypes — FLMP and ANYFILE
- when type is FLMP, coreID/instanceID/contextID are not relevant. FLMP is single file per device.
- when type is ANYFILE, contextID is fileID. Each file is identified by a unique fileID. coreID and instanceID are not relevant.
-
- IxTPInterpreter::onXTPMessageFileController()
- Method handles all the xTP commands related to the file controller.
- IxTPInterpreter::handleFileMapUpdate()
- Virtual method that is called by IxTPInterpreter after filemap is received. Platform implements this function. Filemap parsing with DeviceParser is done here
- IxTPInterpreter::handleFileUpdate()
- Virtual method that is called by IxTPInterpreter after a file is received. It is optional for platform to implement this.
- DeviceParser::readFileControllerProps()
- Parses filemap. used by platform’s implementation of IxTPInterpreter::handleFileMapUpdate()
- DeviceParser::getFileControllerResults()
- For getting a copy of filemap data structure xAFFileMap. Used by IxTPInterpreter::handleFileMapUpdate() after sucessfully parsing filemap.
-
-
AudioCore or AudioCoreBase instatiation
-
virtual StaticStorageInterface* getOpenStoragePtr(flashfileType type, unsigned int contextualData, IOBase::AccessMode mode) const = 0;
- Platform already implements this virtual method when instantiating AudioCore or AudioCoreBase class. In order to support the newly added flashfiletypes — FLMP and ANYFILE, platform has to update the implementation of this function.
-
Logger
A logger is introduced that has 5 severity levels which are, ‘CRITICAL’, ‘ERROR’, ‘WARNING’, ‘INFO’ & ‘DEBUG’. 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.
| Implementation |
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: void logger(xAFLogLevel level, const xInt8* const fmtStr, …) const 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: void xAFLogMessage(xAFLogLevel logLevel, xAFLogObject objType, xUInt32 objectID, const xInt8* message) |
| Usage | Example log statements for audio object:
Example log statements for the framework is:
Logs for audio objects are disabled by default. The macro to enable them in cmake is: XAFLOG_CONFIG_AO. Another option to enable them is to use the cmd line argument while executing the python build script (–logConfigAO=logLevel; logLevels=[‘none’, ‘critical’, ‘error’, ‘warning’, ‘info’, ‘debug’]) |
| Backwards incompatible change | The earlier logging mechanism had two functions for setting and getting the logger function, which are now removed.
|