monky-2.0.0.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 #

The handle exported by this module

destroyVOLHandle :: VOLHandle -> IO () #

Close the mixer handle and unload alsa library

getMute :: VOLHandle -> IO Bool #

return True if the device is muted

getVolumeRaw :: VOLHandle -> IO Int #

Get the raw volume value from alsa

getVolumePercent :: VOLHandle -> IO Int #

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

0% does not equal a muted device.

updateVOLH :: VOLHandle -> IO () #

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 #

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 #

Check if there was an error creating the handle

getPollFDs :: VOLHandle -> IO [Fd] #

Get PollFds for polling interface