monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilitytesting
Maintainerongy
Safe HaskellNone

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 BoolSource

return True if the device is muted

getVolumeRaw :: VOLHandle -> IO IntSource

Get the raw volume value from alsa

getVolumePercent :: VOLHandle -> IO IntSource

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.

getVOLHandleSource

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 -> BoolSource

Check if there was an error creating the handle

getPollFDs :: VOLHandle -> IO [Fd]Source

Get PollFds for polling interface