TRVCamReceiver.OnDecodeAudio

Top  Previous  Next

Occurs when audio data are received.

type // defined in MRVType unit
  TRVDecodeAudioEvent = procedure(Sender: TObject; AStream: TMemoryStream;
    var ASamplesPerSec: TRVSamplesPerSecvar ABitsPerSample : TRVBitsPerSample;
    var DoDefault : Boolean) of object;
property OnDecodeAudio: TRVDecodeAudioEvent;

Parameters:

AStream contains audio data. Normally, it is raw data with the parameters ASamplesPerSec and ABitsPerSample, but they could be encoded in TRVCamSender.OnEncodeAudio event.

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.