Search Results for

    Show / Hide Table of Contents

    Class AudioTool

    Audio data importing and processing utilities.

    Inheritance
    AudioTool
    Inherited Members
    AudioTool
    Assembly: FlaxEngine.dll
    File: Engine/Tools/AudioTool/AudioTool.h
    Syntax
    public class AudioTool

    Methods

    Convert24To32Bits(const byte* input)

    Converts a 24-bit signed integer into a 32-bit signed integer.

    Declaration
    public static int32 Convert24To32Bits(const byte* input)
    Parameters
    byte input

    The 24-bit signed integer as an array of 3 bytes.

    Returns
    int32

    The 32-bit signed integer.

    ConvertBitDepth(const byte* input, uint32 inBitDepth, byte* output, uint32 outBitDepth, uint32 numSamples)

    Converts a set of audio samples of a certain bit depth to a new bit depth.

    Declaration
    public static void ConvertBitDepth(const byte* input, uint32 inBitDepth, byte* output, uint32 outBitDepth, uint32 numSamples)
    Parameters
    byte input

    A set of input samples. Total size of the buffer should be *numSamples * inBitDepth / 8).

    uint32 inBitDepth

    The size of a single sample in the input array, in bits.

    byte output

    The pre-allocated buffer to store the output samples in. Total size of the buffer should be (numSamples * outBitDepth / 8).

    uint32 outBitDepth

    Size of a single sample in the output array, in bits.

    uint32 numSamples

    The total number of samples to process.

    ConvertFromFloat(const float* input, int32* output, uint32 numSamples)

    Converts a set of audio samples of floating point samples in range [-1, 1] to a 32-bit depth PCM data.

    Declaration
    public static void ConvertFromFloat(const float* input, int32* output, uint32 numSamples)
    Parameters
    float input

    A set of input samples. Total size of the buffer should be (numSamples * sizeof(float)). All input samples should be in range [-1, 1].

    int32 output

    The pre-allocated buffer to store the output samples in. Total size of the buffer should be numSamples * sizeof(float).

    uint32 numSamples

    The total number of samples to process.

    ConvertToFloat(const byte* input, uint32 inBitDepth, float* output, uint32 numSamples)

    Converts a set of audio samples of a certain bit depth to a set of floating point samples in range [-1, 1].

    Declaration
    public static void ConvertToFloat(const byte* input, uint32 inBitDepth, float* output, uint32 numSamples)
    Parameters
    byte input

    A set of input samples. Total size of the buffer should be (numSamples * inBitDepth / 8). All input samples should be signed integers.

    uint32 inBitDepth

    The size of a single sample in the input array, in bits.

    float output

    The pre-allocated buffer to store the output samples in. Total size of the buffer should be numSamples * sizeof(float).

    uint32 numSamples

    The total number of samples to process.

    ConvertToMono(const byte* input, byte* output, uint32 bitDepth, uint32 numSamples, uint32 numChannels)

    Converts a set of audio samples using multiple channels into a set of mono samples.

    Declaration
    public static void ConvertToMono(const byte* input, byte* output, uint32 bitDepth, uint32 numSamples, uint32 numChannels)
    Parameters
    byte input

    A set of input samples. Per-channels samples should be interleaved. Size of each sample is determined by bitDepth. Total size of the buffer should be (numSamples * numChannels * bitDepth / 8).

    byte output

    The pre-allocated buffer to store the mono samples. Should be of (numSamples * bitDepth / 8) size.

    uint32 bitDepth

    The size of a single sample in bits.

    uint32 numSamples

    The number of samples per a single channel.

    uint32 numChannels

    The number of channels in the input data.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat