Harman Logo
AUDIOWORX
  • Home
  • Documentation
  • Videos
  • Release Notes
Harman Logo
AUDIOWORX
  • Home
  • Documentation
  • Videos
  • Release Notes
Harman Logo
AUDIOWORX
  • Home
  • Documentation
  • Videos
  • Release Notes
  • Getting Started
  • User Guides
  • Developer Guides
  • Reference Projects

Table of Content

Audio Object Developers Guide

  1. Purpose of this Document
    1. Terms and Abbreviations
    2. Requirements
  2. Overview
    1. Audio Object Workflow
    2. Audio Object Class
  3. Audio Object Configuration
    1. Design Time Configuration
    2. Advanced Design Time Configuration
  4. Basic Features and APIs
    1. Constructor
    2. GetSize
    3. Init
    4. Calc
    5. TuneXTP
    6. Control
  5. Advanced Features and APIs
    1. Audio Object Additional Configuration
    2. Audio Object Sub Blocks
    3. Audio Object AO Switch Processing State
    4. Debug and Monitoring
    5. Background Method
  6. Audio object Examples
    1. Example 1 - AwxAudioObjExt.cpp
    2. Example 2 - AwxAudioObjExtToolbox.cpp
    3. Example 3 - AwxAudioObjExtMemRecs.cpp
    4. Example 4 - AwxAudioObjExt.h
    5. Example 5 - AwxAudioObjExtToolbox.h
    6. Example 6 - AwxAudioObjExtMemRecs.h
  7. General Guidelines
    1. Hardware Abstraction
    2. Hardware Abstraction for Header files
    3. Memory Enums
    4. Overlays
  8. Adding external audio object into AudioworX package
    1. Building External AO

Device Description File

  1. Terms and Abbreviations
  2. Purpose of this Document
  3. Root Element
  4. Node Elements
    1. Communication Parameters
    2. Identification of Target Device
  5. Virtual Device
  6. Objects
    1. Object
    2. Definition of a Table Object
    3. Definition of a Biquad Coefficients Object
  7. StateVariables
    1. Common
    2. NumericalSV
    3. EnumSV
    4. FilterTypeSV
    5. FloatArraySV
    6. Float16ArraySV
    7. FixedPoint16ArraySV
    8. StringSV
    9. FixedPointM_NArraySV
  8. TargetValue
    1. Common
    2. Target Value
    3. Block Target Value
  9. Templates
    1. StateVariables
  10. Revision History

Griffin Reference Projects User Guide

  1. Terms and Abbreviations
    1. Multi dll support for CAO
    2. Tuning Panel Compound Audio Object
  2. Purpose Of This Document
    1. Apply tuning to Compound Audio Object Template
    2. Testing New Post 2025
  • Audio Object Developers Guide
  • Example 4 - AwxAudioObjExt.h

6.4.Example 4 - AwxAudioObjExt.h

// ============================================================
// (C) 2017 Harman International Industries, Incorporated.
// Confidential & Proprietary. All Rights Reserved.
// ============================================================

/**
*   file       AwxAudioObjExt.h
*   brief      Simple demo object Audio object to start a development of a new audio object- Header file
*   details    Project    Extendable Audio Framework
*   copyright  Harman/Becker Automotive Systems GmbH
*   
        2017
*   
        All rights reserved
*   author     xAF Team
*   date       Nov 28, 2023
*/

#ifndef AWXAUDIOOBJEXT_H
#define AWXAUDIOOBJEXT_H

/*!
*   xaf mandataory includes
*/
#include "AudioObject.h"

#define AWXAUDIOOBJEXT_VERSION_MAJOR             (0x01)
#define AWXAUDIOOBJEXT_VERSION_MINOR             (0x01)
#define AWXAUDIOOBJEXT_VERSION_REVISION          (0x06)
#define AWXAUDIOOBJEXT_TUNING_VERSION_MAJOR      (0x01)
#define AWXAUDIOOBJEXT_TUNING_VERSION_MINOR      (0x00)

/** here you can add all required include files required for    
    the core functionality of your objects
**/

#define AWX_AUDIO_OBJ_EXT_NUM_PARAMS         1
#define FLOAT_ARRAY_SIZE                     10
#define NUM_DIMENSION_VAR                    1

/**
*    brief Simple example object to provide a starting point for a new audio object 
*/
class CAwxAudioObjExt : public CAudioObject
{
public:
    static AOVersion version;
    CAwxAudioObjExt();
    virtual ~CAwxAudioObjExt();

    /**
    *   Refer AudioObject.h for description
    */

	/*
     *   It returns the class size of the given audio object.
     */
    xUInt32 getSize() const OVERRIDE;

	/*
     This function initializes all the object variables and parameters. In this method, the object shall initialize all its memory to appropriate values.
    */
    void init() OVERRIDE;
    void calc(xAFAudio** inputs, xAFAudio** outputs) OVERRIDE;

	/**
     *    brief  This method is called when an object receives updated tuning data.
     *    param  subblock               index selects the subblock
     *    param  offsetBytes               points the offset in param memory (bytes)
     *    param  sizeBytes                   number of parameters to be updated (bytes)
     *    param  shouldAttemptRamp      whether or not this data should be attempt to apply instantly, or AO should attempt ramping
     */
    void tuneXTP(xSInt32 subblock, xSInt32 adrBytes, xSInt32 sizeBytes, xBool shouldAttemptRamp) OVERRIDE;

	/**
	*    brief  Retrieves pointer to the start of the subblock
	*    param  subBlock subblock number
	*    return start address of the subblock
	*/
    xInt8* getSubBlockPtr(xUInt16 subBlock) OVERRIDE;

	/**
	*    Returns the size of the sub block indicated by 'subBlock'
	*    param  subBlock the ID of the state subBlock we want to get the size of
	*    return size of subBlock
	*/

    xSInt32 getSubBlockSize(xUInt16 subblock) OVERRIDE;

	/**
    *   Assigns the additional configuration as the object requires.
    */
	void assignAdditionalConfig() OVERRIDE;

	/**
     *    Control method to set the new value
     *    param index - pin index of the object's control input we are writing to
     *    param value - value we are writing
     */
	xSInt32 controlSet(xSInt32 index, xFloat32 param) OVERRIDE;

	/**
     *    brief  It reads the array of applied gain values through additional configuration "Max Gain per channel" for each channel.
     *    param    index  denotes the channel index
     *    return   Gain value read for each channel.
     */
    xFloat32 getMaxGain(xSInt32 index);

	enum AddnlVars {MAX_GAIN_PER_CHANNEL, THIRD_PARTY_MEM_BLK , AWX_EXT_NUM_ADD_VARS };
	enum Modes { GAIN, GAIN_WITH_CONTROL, AWX_EXT_NUM_MODES };
	enum MemAccess { DISABLE_BLOCK, ENABLE_BLOCK };
	enum memoryRecords { PARAM, COEFF, FLOATARRAY, NUM_MEM_RECORDS } memRecs;
    enum PARAMS { NUM_PARAMS_PER_CHANNEL = 2 };
	xInt8 m_EnMemory;

protected:
    xFloat32* m_Coeffs;                                         ///< internal pointer to COEFF memrec
    xFloat32* m_Params;                                         ///< internal pointer to PARAM memrec
	xFloat32* m_MemBlock;                                       ///< internal pointer to FLOATARRAY memrec

private:
	/**
     *    brief  for each channel, checks the gain limits and calculates gain coefficient
     *    param    channel     channel index
     *    param    gainIndB    gain in dB
     */
    void calcGain(xSInt32 channelIndex, xFloat32 gainIndB);
};
#endif //AWXAUDIOOBJEXT_H


Last updated on October 24, 2024
« Example 3 - AwxAudioObjExtMemRecs.cppExample 5 - AwxAudioObjExtToolbox.h »
Help Guide Powered by Documentor
Suggest Edit
  • Careers
  • Contact
  • Sitemap
  • News

© 2024 HARMAN International. All Rights Reserved. Privacy Policy | Cookies | Terms of Use

If you are using a screen reader and are having problems using this website, please call (800) 645-7484 for assistance.