audiosession

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemAudioSession = "[System Process]"
)

Variables

View Source
var (
	UninitializedAudioSessionError = errors.New("Audio Session uninitialized")
)

Functions

This section is empty.

Types

type AudioSession

type AudioSession struct {
	ProcessExecutable string

	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(audioSessionEnumerator *wca.IAudioSessionEnumerator, audioSessionNumber int) (*AudioSession, error)

New takes in a *wca.IAudioSessionControl and wraps it as an *AudioSession with some nice helper methods to do common tasks like SetVolumeLevel, etc.

func (*AudioSession) Cleanup

func (a *AudioSession) Cleanup() error

Cleanup will release and remove any pointers or leftover devices from the creation process.

func (*AudioSession) SetVolumeLevel

func (a *AudioSession) SetVolumeLevel(v float32) error

SetVolumeLevel takes a float between 0-1 and it will set the volume of the audio session to that value.

Jump to

Keyboard shortcuts

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