| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.PortAudio
Contents
- withPortAudio :: IO a -> IO a
- data Error
- = NotInitialized
- | UnanticipatedHostError
- | InvalidChannelCount
- | InvalidSampleRate
- | InvalidDevice
- | InvalidFlag
- | SampleFormatNotSupported
- | BadIODeviceCombination
- | InsufficientMemory
- | BufferTooBig
- | BufferTooSmall
- | NullCallback
- | BadStreamPtr
- | TimedOut
- | InternalError
- | DeviceUnavailable
- | IncompatibleHostApiSpecificStreamInfo
- | StreamIsStopped
- | StreamIsNotStopped
- | InputOverflowed
- | OutputUnderflowed
- | HostApiNotFound
- | InvalidHostApi
- | CanNotReadFromACallbackStream
- | CanNotWriteToACallbackStream
- | CanNotReadFromAnOutputOnlyStream
- | CanNotWriteToAnInputOnlyStream
- | IncompatibleStreamHostApi
- | BadBufferPtr
- getDevices :: IO ([Device Input], [Device Output])
- data Device t = Device {}
- data Input
- data Output
- withStream :: (Storable i, Storable o) => Double -> Int -> Maybe (StreamParameters Input i) -> Maybe (StreamParameters Output o) -> StreamFlags -> (Status -> Vector i -> IOVector o -> IO StreamCallbackResult) -> IO r -> IO r
- data StreamCallbackResult
- data StreamParameters t a
- streamParameters :: forall t f a. (Applicative f, Foldable f, PortAudioSample a) => Device t -> Double -> Maybe (StreamParameters t (f a))
- class PortAudioSample a
- data Closed = Closed
- noConnection :: Maybe (StreamParameters t Closed)
- data Status = Status {
- currentTime :: !Double
- inputBufferAdcTime :: !Double
- outputBufferDacTime :: !Double
- inputUnderflow :: !Bool
- inputOverflow :: !Bool
- outputUnderflow :: !Bool
- outputOverflow :: !Bool
- primingOutput :: !Bool
- data StreamFlags
- clipOff :: StreamFlags
- ditherOff :: StreamFlags
- neverDropInput :: StreamFlags
- primeOutputBuffersUsingStreamCallback :: StreamFlags
Initialization
withPortAudio :: IO a -> IO a Source #
Constructors
Devices
Constructors
| Device | |
Fields | |
Opening a stream
Arguments
| :: (Storable i, Storable o) | |
| => Double | sampling rate |
| -> Int | buffer size |
| -> Maybe (StreamParameters Input i) | |
| -> Maybe (StreamParameters Output o) | |
| -> StreamFlags | |
| -> (Status -> Vector i -> IOVector o -> IO StreamCallbackResult) | callback |
| -> IO r | |
| -> IO r |
data StreamCallbackResult Source #
Stream parameters
data StreamParameters t a Source #
Instances
| Storable (StreamParameters t a) Source # | |
streamParameters :: forall t f a. (Applicative f, Foldable f, PortAudioSample a) => Device t -> Double -> Maybe (StreamParameters t (f a)) Source #
class PortAudioSample a Source #
Minimal complete definition
paSampleFormat
noConnection :: Maybe (StreamParameters t Closed) Source #
This is Nothing, but it explicitly specifies the stream type with zero-width unit type.
Timestamps and status flags
Constructors
| Status | |
Fields
| |
Stream flags
data StreamFlags Source #
Instances