pamidicontrol

package
v0.0.0-...-6727c14 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlaybackStream PulseAudioTargetType = "PlaybackStream"
	RecordStream                        = "RecordStream"
	Sink                                = "Sink"
	Source                              = "Source"
)

Variables

This section is empty.

Functions

func Run

func Run()

Types

type Config

type Config struct {
	MidiActions    []MidiAction
	InputMidiName  string
	OutputMidiName string
}

type MidiAction

type MidiAction struct {
	ActionType MidiActionType

	Channel    uint8
	Controller uint8

	MaxInputValue uint

	Action PulseAudioAction
}

type MidiActionType

type MidiActionType string
const (
	ControlChange MidiActionType = "ControlChange"
)

type MidiClient

type MidiClient struct {
	PAClient       *PAClient
	MidiActions    []MidiAction
	InputMidiName  string
	OutputMidiName string
}

func (*MidiClient) ListDevices

func (c *MidiClient) ListDevices() ([]string, []string, error)

func (*MidiClient) Run

func (c *MidiClient) Run()

type PAClient

type PAClient struct {
	*pulseaudio.Client
	// contains filtered or unexported fields
}

func NewPAClient

func NewPAClient(c *pulseaudio.Client) *PAClient

func (*PAClient) NewPlaybackStream

func (c *PAClient) NewPlaybackStream(path dbus.ObjectPath)

func (*PAClient) PlaybackStreamRemoved

func (c *PAClient) PlaybackStreamRemoved(path dbus.ObjectPath)

func (*PAClient) ProcessVolumeAction

func (c *PAClient) ProcessVolumeAction(action PulseAudioAction, volume float32) error

func (*PAClient) RefreshStreams

func (c *PAClient) RefreshStreams() error

type PulseAudioAction

type PulseAudioAction struct {
	TargetType PulseAudioTargetType
	TargetName string

	ActionType PulseAudioActionType
}

type PulseAudioActionType

type PulseAudioActionType string
const (
	VolumeChange PulseAudioActionType = "VolumeChange"
	Mute                              = "Mute"
)

type PulseAudioTargetType

type PulseAudioTargetType string

Jump to

Keyboard shortcuts

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