Maintainer | ongy |
---|---|
Stability | testing |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
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.
- data VOLHandle
- destroyVOLHandle :: VOLHandle -> IO ()
- getMute :: VOLHandle -> IO Bool
- getVolumeRaw :: VOLHandle -> IO Int
- getVolumePercent :: VOLHandle -> IO Int
- updateVOLH :: VOLHandle -> IO ()
- getVOLHandle :: String -> IO VOLHandle
- isLoaded :: VOLHandle -> Bool
- getPollFDs :: VOLHandle -> IO [Fd]
Documentation
destroyVOLHandle :: VOLHandle -> IO () #
Close the mixer handle and unload alsa library
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.
Create an VOLHandle
This function returns a type save error value if any alsa function fails
getPollFDs :: VOLHandle -> IO [Fd] #
Get PollFds for polling interface