Download Now

    Reference TAudioMixEvent

    Declared in Codebot.Hardware.pas on line 283

    TAudioMixEvent is called by the mixer for a block of samples a program makes itself. Samples holds Count samples of silence, to be filled in or left alone. The samples are at DefSampleRate, and each block follows on from the one before, so a generator keeps its own phase between calls.
    The event is called on the audio thread. It must be quick, and must not raise exceptions, allocate memory, or use strings or other managed types. Values it shares with the rest of the program should be simple ones which are written whole, such as a number or a Boolean.
    TAudioMixEvent = procedure(Sender: TObject; Samples: PAudioSample; Count: Integer) of object;

    See also