honk-1.3.0.0: Cross-platform interface to the PC speaker.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.Honk.Internal

Contents

Description

Low level FFI interface. You should rarely need to use this directly.

Synopsis

Types

newtype BeepFd Source

Constructors

BeepFd CInt 

Core functions

beepOpen :: IO BeepFd Source

Open a handle to the console.

Use withBeepFd instead if possible, since it keeps track of closing the handle automatically.

beepDo Source

Arguments

:: BeepFd

A console handle, as returned by beepOpen

-> Rational

Duration, in seconds

-> Double

Frequency of the beep, in hertz

-> IO () 

Perform a beep.

beepClose :: BeepFd -> IO () Source

Close the handle.

Convenience functions

withBeepFd :: (BeepFd -> IO a) -> IO a Source

Run a function that uses a BeepFd, opening and closing the handle automatically.