DirectSound-0.0.0: Partial binding to the Microsoft DirectSound API.

Safe HaskellNone

Sound.Win32.DirectSound

Description

Partial binding to the DirectSound API.

Synopsis

Documentation

peekMaybe :: Storable a => Ptr a -> IO (Maybe a)

withMaybe :: Storable a => Maybe a -> (Ptr a -> IO b) -> IO b

type Method obj fun = Ptr obj -> fun

type HWND = HANDLE

data DSCaps

type IID = GUID

type RefIID = Ptr IID

data DSFXDesc

data Channels

Constructors

Mono 
Stereo 

data Format

Constructors

SampleInt16 
SampleFloat 

makeWaveFormatX

Arguments

:: Int

sample rate

-> Int

number of channels

-> Format

sample format

-> WaveFormatX 

data GUID

Constructors

GUID 

Instances

type AddRef = IO ()

type Release = IO ()

data Driver

Constructors

Driver 

Instances

type DSEnumCallbackA a = Ptr GUID -> CString -> CString -> Ptr a -> IO Bool

type SBLock = DWORD -> DWORD -> Ptr (Ptr ()) -> Ptr DWORD -> Ptr (Ptr ()) -> Ptr DWORD -> DWORD -> IO HRESULT

type SBPlay = DWORD -> DWORD -> DWORD -> IO HRESULT

type SetPan = LONG -> IO HRESULT

type SBUnlock = Ptr () -> DWORD -> Ptr () -> DWORD -> IO HRESULT

data ISoundBuffer8Vtbl

newtype IDSNotify8

Constructors

IDSNotify8 

Instances

data Portion a

Constructors

Portion !(Ptr a) !Word32 

Instances

setupDoubleBuffering :: SoundBuffer -> IO DoubleBuffering

Sets up the sound buffer for double buffered continous playback

type FillBufferCallback a = Ptr a -> Word32 -> IO ()

the second argument is number of frames, not bytes!

playWithDoubleBuffering :: SoundBuffer -> FillBufferCallback a -> IO (IO ())

Forks a new lightweight thread. Returns the action for stopping the playback.