micamp

package
v0.0.0-...-e5c115e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, micSourceNamePrefix string) *module

New creates the microphone amplitude (micamp) module for barista. It is used to give a visual indication that audio is passing through the microphone.

Default output will be:

  • When the mic is muted or doesn't receive any audio: NaN .......... 🎙

  • When the mic is receiving audio: 0% .......... 🎙 50% :::::..... 🎙 100% :::::::::: 🎙

  • When the amplitude isn't between 0-100: ERR 200% (amp=2.000) 🎙

Parameters:

  • ctx: context which when done will stop the stream and gracefully shut down the pulse audio client.

  • micSourceNamePrefix: The prefix of the microphone name as seen by the pulse audio description (which can be found using `pactl list sources`). If it's empty (`""`) then the pulse audio default source will be used.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL