TRVAudioEvent

<< Click to display table of contents >>

TRVAudioEvent

Unit [VCL and LCL] MRVType;

Unit [FMX] fmxMRVType;

type

  TRVAudioEvent = procedure(Sender: TObject; AStream: TMemoryStream;
    var ADataSize : Integer; const AAudioIndex : Word;
    var AStartTime: Int64; var ADuration: Cardinal;
    var ASamplesPerSec: Integer; var ABitsPerSample : TRVBitsPerSample;
    var AChannels: Integer) of object;

AStream contains sound data, ASamplesPerSec, ABitsPerSample, AChannels contain sound parameters.

Only starting ADataSize bytes in AStream contain sound, other content is undefined.

AAudioIndex may be non-zero if this sound is received from TRVCamReceiver. In this case, this is an index of media channel of TRVCamSender which sent these audio data.

AStartTime is a time from the beginning of sound recording/playing to the beginning of this sound fragment, in milliseconds.

ADuration is a length of this sound fragment, in milliseconds.

This is the type of the following events:

TCustomRVAudioOutput.OnGetAudio

TCustomRVMicrophone.OnGetAudio

TRVCamSender.OnEncodeAudiio

 

You can use this event, for example, for writing sound to a file, or to modify sound before processing.