monky-2.2.1.0: A system state collecting library and application

Maintainerongy
Stabilitytesting
PortabilityLinux
Safe HaskellNone
LanguageHaskell2010

Monky.Alsa

Description

This module provides access to basic audio information provided by the alsa audio system. This MAY work with pulse, but will report useless/inaccurate values.

Synopsis

Documentation

data VOLHandle Source #

The handle exported by this module

destroyVOLHandle :: VOLHandle -> IO () Source #

Close the mixer handle and unload alsa library

getMute :: VOLHandle -> IO Bool Source #

return True if the device is muted

getVolumeRaw :: VOLHandle -> IO Int Source #

Get the raw volume value from alsa

getVolumePercent :: VOLHandle -> IO Int Source #

Get the volume in percent (100% = loudest 0%=lowest)

0% does not equal a muted device.

updateVOLH :: VOLHandle -> IO () Source #

Update the volume handle.

This function has to be called to update the handle internally. Calling this will get the current state into the handle, which can then by queried by the other functions. Until this is called again, the results of other functions will not update to the current state of the system.

getVOLHandle Source #

Arguments

:: String

The audio-card to use

-> IO VOLHandle 

Create an VOLHandle

This function returns a type save error value if any alsa function fails

isLoaded :: VOLHandle -> Bool Source #

Check if there was an error creating the handle

getPollFDs :: VOLHandle -> IO [Fd] Source #

Get PollFds for polling interface