Module pnmixerlib::support_audio [] [src]

Helper functions of the audio subsystem.

These functions are not directly connected to the Audio struct, but are important helpers.

Enums

VolDir

The direction of a volume change.

Functions

audio_reload

Reload the audio system.

get_playable_card_names

Get all playable card names.

get_playable_chan_names

Get all playable channel names.

lrint

Kinda mimics lrint from libm. If the direction of the volume change is Up then calls ceil(), if it's Down, then calls floor(), otherwise returns the value unchanged.

percent_to_vol

Converts the percentage of the volume level (0-100) back to the actual low-level representation of the volume, which depends on the volume range.

vol_change_to_voldir

Convert a volume change to the VolDir type.

vol_to_percent

Converts the actual volume of the audio configuration, which depends on the volume range, to a scale of 0-100, reprenting the percentage of the volume level.