2.2.19. Audio Inputs
Feeds accepting a AudioInputFeedComponent argument during construction can
accept audio input from a variety of sources:
providing the ability to capture and transmit audio from, respectively:
an audio device (e.g. a microphone)
a test signal generator
an output from another feed, via
AudioOutputFeedInter
For example, to test audio through a speaker:
PxMedia::AudioInputFeedTestSignal inputAudio;
auto feed = PxMedia::PeerLocalAudioFeed::create(session, props, inputAudio, localOut);
input_audio = media.AudioInputFeedTestSignal()
feed = media.PeerLocalAudioFeed.create(session, props, input_audio, local_out)
To visualize audio sourced from the output of another feed:
PxMedia::AudioInputFeedInter inputAudio = outputInter.makeInput();
auto feed = PxMedia::PeerLocalAudioFeed::create(session, props, inputAudio, localOut);
input_audio = output_inter.make_input()
feed = media.PeerLocalAudioFeed.create(session, props, input_audio, local_out)
AudioInputFeedInter instances must be obtained via
makeInput() before the associated
output is passed to a feed create() call. Each instance can only be used in a single
feed — violating either constraint is detected and surfaces as a PipelineElementBadProps
error when the affected feed is created.