macosx-core-0.0.0: Partial bindings to Core* libraries in Mac OS XContentsIndex
System.MacOSX.CoreAudio
Contents
some basic types
more types
HostTime
low-level whatever
enumerations
properties
Description

Partial binding to CoreAudio. At the moment only HostTime and parts of the HAL (Hardware Abstraction Layer) is supported.

See http://developer.apple.com/documentation/MusicAudio/Reference/CACoreAudioReference/AudioHardware/

Synopsis
type Device = UInt32
type Stream = UInt32
data AudioValueRange = AudioValueRange Float64 Float64
data Direction
= In
| Out
type AudioDeviceIOProc a b = UInt32 -> Ptr AudioTimeStamp -> Ptr (AudioBufferList a) -> Ptr AudioTimeStamp -> Ptr (AudioBufferList a) -> Ptr AudioTimeStamp -> Ptr b -> IO OSStatus
type AudioDeviceIOProcFloat c = AudioDeviceIOProc Float c
mkAudioDeviceIOProc :: AudioDeviceIOProc a b -> IO (FunPtr (AudioDeviceIOProc a b))
data AudioTimeStamp = AudioTimeStamp {
ats_SampleTime :: Float64
ats_HostTime :: UInt64
ats_RateScalar :: Float64
ats_WordClockTime :: UInt64
ats_SMPTETime :: SMPTETime
ats_Flags :: UInt32
ats_Reserved :: UInt32
}
data SMPTETime = SMPTETime {
smpte_Counter :: UInt64
smpte_Type :: UInt32
smpte_Flags :: UInt32
smpte_Hours :: SInt16
smpte_Minutes :: SInt16
smpte_Seconds :: SInt16
smpte_Frames :: SInt16
}
data AudioBuffer a = AudioBuffer {
ab_NumberChannels :: UInt32
ab_DataByteSize :: UInt32
ab_Data :: Ptr a
}
data AudioBufferList a = AudioBufferList [AudioBuffer a]
pokeAudioBufferList :: Ptr (AudioBufferList a) -> AudioBufferList a -> IO Int
peekAudioBufferList :: Ptr (AudioBufferList a) -> IO (AudioBufferList a)
audioGetCurrentHostTime :: IO UInt64
audioConvertHostTimeToNanos :: UInt64 -> IO UInt64
audioConvertNanosToHostTime :: UInt64 -> IO UInt64
audioGetCurrentTimeInNanos :: IO UInt64
audioDeviceStart :: Device -> FunPtr (AudioDeviceIOProc a b) -> IO OSStatus
audioDeviceStop :: Device -> FunPtr (AudioDeviceIOProc a b) -> IO OSStatus
audioDeviceAddIOProc :: Device -> FunPtr (AudioDeviceIOProc a b) -> Ptr b -> IO OSStatus
audioDeviceRemoveIOProc :: Device -> FunPtr (AudioDeviceIOProc a b) -> IO OSStatus
enumerateAudioDevices :: IO [Device]
enumerateAudioStreams :: Device -> IO ([Stream], [Stream])
audioDeviceGetProperty :: Storable a => Device -> Int -> Direction -> String -> IO (Maybe a)
audioDeviceGetPropertyList :: Storable a => Device -> Int -> Direction -> String -> IO (Maybe [a])
audioDeviceGetPropertyString :: Device -> Int -> Direction -> String -> IO (Maybe String)
audioDeviceGetPropertyCFString :: Device -> Int -> Direction -> String -> IO (Maybe String)
audioDeviceSetProperty :: Storable a => Device -> UInt32 -> Direction -> String -> a -> IO OSStatus
audioDeviceName :: Device -> IO String
some basic types
type Device = UInt32
type Stream = UInt32
data AudioValueRange
Constructors
AudioValueRange Float64 Float64
show/hide Instances
data Direction
Constructors
In
Out
more types
type AudioDeviceIOProc a b = UInt32 -> Ptr AudioTimeStamp -> Ptr (AudioBufferList a) -> Ptr AudioTimeStamp -> Ptr (AudioBufferList a) -> Ptr AudioTimeStamp -> Ptr b -> IO OSStatus

Arguments:

  • device :: UInt32,
  • currentTimeStamp :: Ptr AudioTimeStamp,
  • input :: Ptr (AudioBufferList a),
  • inputTimeStamp :: Ptr AudioTimeStamp,
  • output :: Ptr (AudioBufferList a),
  • outputTimeStamp :: Ptr AudioTimeStamp,
  • clientData :: Ptr b.
type AudioDeviceIOProcFloat c = AudioDeviceIOProc Float c
mkAudioDeviceIOProc :: AudioDeviceIOProc a b -> IO (FunPtr (AudioDeviceIOProc a b))
data AudioTimeStamp
Constructors
AudioTimeStamp
ats_SampleTime :: Float64
ats_HostTime :: UInt64
ats_RateScalar :: Float64
ats_WordClockTime :: UInt64
ats_SMPTETime :: SMPTETime
ats_Flags :: UInt32
ats_Reserved :: UInt32
show/hide Instances
data SMPTETime
Constructors
SMPTETime
smpte_Counter :: UInt64
smpte_Type :: UInt32
smpte_Flags :: UInt32
smpte_Hours :: SInt16
smpte_Minutes :: SInt16
smpte_Seconds :: SInt16
smpte_Frames :: SInt16
show/hide Instances
data AudioBuffer a
Constructors
AudioBuffer
ab_NumberChannels :: UInt32
ab_DataByteSize :: UInt32
ab_Data :: Ptr a
show/hide Instances
data AudioBufferList a
Constructors
AudioBufferList [AudioBuffer a]
pokeAudioBufferList :: Ptr (AudioBufferList a) -> AudioBufferList a -> IO Int
Returns the number of bytes written.
peekAudioBufferList :: Ptr (AudioBufferList a) -> IO (AudioBufferList a)
Does not need the length of the list, as it is stored in the memory.
HostTime
audioGetCurrentHostTime :: IO UInt64
audioConvertHostTimeToNanos :: UInt64 -> IO UInt64
audioConvertNanosToHostTime :: UInt64 -> IO UInt64
audioGetCurrentTimeInNanos :: IO UInt64
low-level whatever
audioDeviceStart :: Device -> FunPtr (AudioDeviceIOProc a b) -> IO OSStatus
audioDeviceStop :: Device -> FunPtr (AudioDeviceIOProc a b) -> IO OSStatus
audioDeviceAddIOProc :: Device -> FunPtr (AudioDeviceIOProc a b) -> Ptr b -> IO OSStatus
audioDeviceRemoveIOProc :: Device -> FunPtr (AudioDeviceIOProc a b) -> IO OSStatus
enumerations
enumerateAudioDevices :: IO [Device]
enumerateAudioStreams :: Device -> IO ([Stream], [Stream])
input and output streams
properties
audioDeviceGetProperty
:: Storable a
=> Devicedevice id
-> Intchannel
-> Directiondirection (input/output)
-> Stringfour character ID of the property
-> IO (Maybe a)
audioDeviceGetPropertyList :: Storable a => Device -> Int -> Direction -> String -> IO (Maybe [a])
audioDeviceGetPropertyString :: Device -> Int -> Direction -> String -> IO (Maybe String)
audioDeviceGetPropertyCFString :: Device -> Int -> Direction -> String -> IO (Maybe String)
audioDeviceSetProperty :: Storable a => Device -> UInt32 -> Direction -> String -> a -> IO OSStatus
audioDeviceName :: Device -> IO String
Produced by Haddock version 2.4.1