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

Portabilitynon-portable (requires POSIX or Win32)
Maintainerchrisyco@gmail.com

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

-> Double

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.