iosobjective-caudioaudiounitremoteio

What is the unit of measurement of raw audio data from Remote I/O unit?


I am recording the raw audio data using Remote I/O unit as given below:

static OSStatus performRender(void *inRefCon,
                              AudioUnitRenderActionFlags *ioActionFlags,
                              const AudioTimeStamp *inTimeStamp,
                              UInt32 inBusNumber,
                              UInt32 inNumberFrames,
                              AudioBufferList *ioData)
{
    OSStatus err = noErr;
    if (*callbackStruct.audioChainIsBeingReconstructed == NO)
    {
        err = AudioUnitRender(callbackStruct.rioUnit, ioActionFlags, inTimeStamp, 1, inNumberFrames, ioData);
        {
            [callbackStruct.bufferManager CopyAudioDataToDrawBuffer:(Float32 *)ioData->mBuffers[0].mData frames:inNumberFrames];
        }
    }
    return err;
}

What is the unit of measurement of this raw audio data ( mBuffers[0].mData, which is a void pointer if you look up the AudioBuffer structure ).

Is it Pascal or milliVolts (mV) ? Thanks in advance.


Solution

  • It is neither - it could one of a number of audio data formats Common ones are:

    Where the min and max values are smallest and largest samples values that can be represented without clipping.

    In order calculate the output voltage, you would need to determine the gain of the remainder of the audio system. You can assume that SPL in pascals has a more or less linear relationship with output power which is proportional to V^2.