TRVCamSender.OnEncodeAudio

Top  Previous  Next

Occurs when sender is about to send audio data from AudioSource.

type // defined in MRVType unit
  TRVEncodeAudioEvent = procedure(Sender: TObject; AStream: TMemoryStream;
    var ASamplesPerSec: TRVSamplesPerSecvar ABitsPerSample : TRVBitsPerSampleof object;
property OnEncodeAudio: TRVEncodeAudioEvent;

AStream contains raw audio data. Parameters of these data are specified in ASamplesPerSec and ABitsPerSample.

You can encode audio in another format and write it back to AStream. You can also modify values of ASamplesPerSec and ABitsPerSample that will be sent to the network.

See also:

TRVCamReceiver.OnDecodeAudio

TRVMicrophone.BitsPerSample, SamplesPerSec