Core Objects Design Details

The details given below are common to both the core objects:

  • Float To Fixed
  • Fixed To Float

Design Variables

  • Configurable number of channels
  • Supports all sample rates and block lengths
  • Floating point scalar value provided as Additional Variable

Platform Dependencies
This core object shall be accessed through the Audio Core class of the xAF framework. The platform shall not directly interact with this core object.

API

During Initialization:

  • coreObjectTypeID getType()
    Returns the core object ID :CORE_OBJ_FLOAT2FIXED (5) or CORE_OBJ_FIXED2FLOAT (6)
  • xFloat32 getProcTime()
    Returns the duration (in seconds) of one block of data.
  • xUInt32 getInputSampleRate()
    Returns the sample rate the object operates at.
  • xUInt32 getOutputSampleRate()
    Returns the sample rate the object operates at.
  • xUInt16 getInputBlockLength()
    Returns the input block length of the object.
  • xUInt16 getOutputBlockLength()
    Returns the output block length of the object.
  • xUInt16 getNumAudioInputs()
    Returns the number of input channels of the object.
  • xUInt16 getNumAudioOutputs()
    Returns the number of output channels of the object.
  • xAF_Error init(const CoreObjectInfo& objInfo, memAllocRef allocator, xUInt32& memoryAllocated)
    objInfo Struct that has base info and pointer to additional config data
    allocator Allocator method
    memoryAllocated Variable to return the amount of memory allocated[bytes]

CoreObjectInfo:
                          xUInt16 numInputs;          // Number of channels
                          xUInt16 inBlockLen;         // Input Block Length
                          xUInt32 inSampleRate;   // Operational sample rate
                          void* coreObjConfig;

Pointer to additional configuration data
Byte 0 – 3: Scalar value (4 bytes)

Audio Interrupts (Algorithm Execution):

  • xAF_Error calc(float** inputs, float** outputs)
    inputs: Pointer to audio input buffers
    outputs: Pointer to audio output buffers

_________________

Rate this post!