TRVCamSender.OnEncodeAudio

<< Click to display table of contents >>

TRVCamSender.OnEncodeAudio

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

You can use this event to compress or encrypt audio data.

property OnEncodeAudio: TRVAudioEvent;

AStream contains raw audio data. Only initial ADataSize bytes in this stream are used. Parameters of these data are specified in ASamplesPerSec, ABitsPerSample and AChannels.

AAudioIndex identifies the audio source (0 for AudioSource, 1 or greater for ExtraMediaSources).

ADuration is an audio length, in milliseconds.

You can encode audio in another format and write it back to AStream. Update ADataSize as well.

You can also modify values of ASamplesPerSec, ABitsPerSample, AChannels that will be sent to the network. If your modifications changed the sound duration, modify ADuration as well.

See also:

OnEncodeVideo

TRVCamReceiver.OnDecodeAudio

TRVMicrophone.BitsPerSample, SamplesPerSec