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

Safe HaskellSafe-Inferred

Sound.Honk.Internal

Contents

Description

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

Synopsis

Types

newtype BeepFd Source

Constructors

BeepFd CInt 

Core functions

beepOpen :: IO BeepFdSource

Open a handle to the console.

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

beepDoSource

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 aSource

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