HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
hi::v1::audio_channel Class Reference

Public Member Functions

std::size_t index () const noexcept
 The index of the audio channel.
 
audio_direction direction () const noexcept
 The direction of audio.
 
std::string id () const noexcept
 A permanent id for the channel for this device.
 
std::string name () const noexcept
 The name of the audio channel according to the system.
 
std::size_t clip_count () noexcept
 The number of times the audio clipped since last read.
 
float peak () noexcept
 The maximum peak sample value since last read.
 
float rms (std::size_t num_samples) noexcept
 Get the running-RMS over the given number of samples.
 

Data Fields

bool enabled
 If the channel is enabled by the user.
 

Member Function Documentation

◆ clip_count()

std::size_t hi::v1::audio_channel::clip_count ( )
noexcept

The number of times the audio clipped since last read.

◆ direction()

audio_direction hi::v1::audio_channel::direction ( ) const
noexcept

The direction of audio.

◆ id()

std::string hi::v1::audio_channel::id ( ) const
noexcept

A permanent id for the channel for this device.

◆ index()

std::size_t hi::v1::audio_channel::index ( ) const
noexcept

The index of the audio channel.

The index is per direction. There is a index zero for both input and output direction.

◆ name()

std::string hi::v1::audio_channel::name ( ) const
noexcept

The name of the audio channel according to the system.

◆ peak()

float hi::v1::audio_channel::peak ( )
noexcept

The maximum peak sample value since last read.

◆ rms()

float hi::v1::audio_channel::rms ( std::size_t num_samples)
noexcept

Get the running-RMS over the given number of samples.

Granularity of the samples is the number of samples of an audio proc.

Parameters
num_samplesNumber of samples to take the running average over.

Field Documentation

◆ enabled

bool hi::v1::audio_channel::enabled

If the channel is enabled by the user.

The following situations exist.

  • input, enabled: Audio from device is available in the input buffer of the audio proc.
  • input, disabled: The input buffer is made silent, the peak and rms values are zero to.
  • output, enabled: Audio from the output buffer is copied to the audio device.
  • output, disabled: Silence is send to the audio device. The peak and rms values are zero.

The documentation for this class was generated from the following file: