TRVCamReceiver.OnDecodeAudio

<< Click to display table of contents >>

TRVCamReceiver.OnDecodeAudio

Occurs when audio data are received.

type // defined in MRVType unit

  TRVDecodeAudioEvent = procedure(Sender: TObject;

    AStream: TMemoryStream; var ADataSize: Integer;

    const AAudioIndex: Word;
    var AStartTime: Int64, var ADuration: Cardinal; var ASamplesPerSec: Integer;
    var ABitsPerSample: TRVBitsPerSamplevar AChannels: Integer;
    var DoDefault: Boolean) of object;

 
property OnDecodeAudio: TRVDecodeAudioEvent;

Parameters:

AStream contains audio data. Only initial ADataSize bytes in this stream are used. Normally, it is raw data with the parameters ASamplesPerSec, ABitsPerSample, AChannels, but they could be encoded in TRVCamSender.OnEncodeAudio event.

ADuration is a sound duration, in milliseconds.

You can play sound yourself. If you do it, assign False to DoDefault parameter.

Otherwise, you can use this event to decode sound encoded in TRVCamSender.OnEncodeAudio.

See also

OnDecodeVideo