2.2.19. Audio Outputs

Feeds accepting a AudioOutputFeedComponent argument during construction can output audio to the local default audio output device (e.g. speaker or headphones), an inter pipe for other feeds to access or a local window (visualized as a waveform).

For example, to output to the default audio output device:

    PxMedia::PeerLocalAudioFeed::FeedProperties props;
    props.label   = "label";
    props.channel = "channel";
    PxMedia::AudioInputFeedTestSignal inputAudio;
    PxMedia::AudioOutputFeedAuto      localOut;
    auto feed = PxMedia::PeerLocalAudioFeed::create(session, props, inputAudio, localOut);

To output to an inter pipe so another feed can use it as an input:

    PxMedia::PeerLocalAudioFeed::FeedProperties props;
    props.label   = "label";
    props.channel = "channel";
    PxMedia::AudioInputFeedTestSignal inputAudio;
    auto feed = PxMedia::PeerLocalAudioFeed::create(session, props, inputAudio, outInter);

When using AudioOutputFeedInter, all calls to makeInput() must be made before the output is passed to a feed create() call. Inputs obtained after the feed has been created will not be connected to the pipeline.

Each AudioInputFeedInter obtained from makeInput() can only be used in a single feed. Likewise, each AudioOutputFeedInter 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.

Known issue with wavescope outputs

There is a known issue in GStreamer 1.24.2, the version of GStreamer available on Ubuntu 24.04, which causes audio visualization plugins to accumulate waveform data indefinitely, making visualizations incorrect and causing high CPU usage. This was addressed in GStreamer 1.24.4 (see merge request). This affects AudioOutputFeedWavescope outputs on Ubuntu 24.04.