Audio management

Interfaces allow (or deny) access to a resource outside of a snap’s confinement, and audio recording and playback in Ubuntu Core is handled by the audio-record and audio-playback interfaces respectively. They each provide access to PulseAudio and will provide access to other sound servers in the future.

The design of both of these interfaces is based on the principle that the slot implementation of the audio service, such as PulseAudio, queries whether its audio-record slot is connected, leaving the audio service to mediate recording if it is.

On systems with snapd integration, PulseAudio’s mediation is limited and will only verify that the snap is connected to audio-record and not if the specific snap command plugs the interface.

For more details on how interfaces work, and how they’re connected, see Interface management.

PulseAudio is an integral part of all relevant modern Linux distributions and used in various mobile devices by multiple vendors.

PulseAudio features

  • Extensible plugin architecture (by loading dynamic loadable modules with dlopen())
  • Support for static linking of modules, allowing a single binary for all your needs
  • Module autoloading
  • Support for more than one sink/source
  • Good low latency behaviour
  • Very accurate latency measurement for playback and recording.
  • Client side latency interpolation
  • Embeddable into other software (the core is available as C library)
  • Completely asynchronous C API, complemented by two synchronous variants for simple use in synchronous applications
  • Simple command line interface for reconfiguring the daemon while running
  • Flexible, implicit sample type conversion and resampling
  • “Zero-Copy” architecture
  • May be used to combine multiple sound cards to one (with sample rate adjustment)
  • Ability to fully synchronize multiple playback streams
  • Various network audio streaming options