Portability | Linux |
---|---|
Stability | testing |
Maintainer | ongy |
Safe Haskell | None |
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 ()Source
Close the mixer handle and unload alsa library
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.
:: String | The audio-card to use |
-> IO VOLHandle |
Create an VOLHandle
This function returns a type save error value if any alsa function fails
getPollFDs :: VOLHandle -> IO [Fd]Source
Get PollFds for polling interface