|
|
|
Description |
PortAudio is a cross platform audio library which supports many different operatings systems.
|
|
Synopsis |
|
|
|
Documentation |
|
|
Constructors | NoError | | 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 | |
| Instances | |
|
|
|
Unchanging uniqe identifiers for each supported host API. The values
are guaranteed to be unique and will never change. This allows code to
be written which conditionally uses host API specific extensions.
| Constructors | InDevelopment | | DirectSound | | MME | | ASIO | | SoundManager | | CoreAudio | | OSS | | ALSA | | AL | | BeOS | | WDMKS | | JACK | | WASAPI | | AudioScienceHPI | |
| Instances | |
|
|
|
A type used to specify one or more sample formats.
- The floating point representation (PaFloat32) uses +1.0 and -1.0 as the maximum and minimum.
- (PaUInt8) considers 128 ground.
- The (PaNonInterleaved) flag indicates that a multichannel buffer is passed as a set of non-interleaved pointers. (WHAT?)
I don't think i want to support this.
| Constructors | PaFloat32 | | PaInt32 | | PaInt24 | | PaInt16 | | PaInt8 | | PaUInt8 | | PaCustomFormat | | PaNonInterleaved | |
| Instances | |
|
|
|
A structure containing information about a particular host API.
| Constructors | | Instances | |
|
|
|
Structure used to return information about a host error condition.
| Constructors | | Instances | |
|
|
|
A structure providing information and capabilities of PortAudio devices. Devices may support
input, output or both.
| Constructors | DeviceInfo | | deviceInfoStructVersion :: Int | | deviceInfoName :: String | | deviceInfoHostApi :: HostApiIndex | | deviceInfoMaxInputChannels :: Int | | deviceInfoMaxOutputChannels :: Int | | deviceInfoDefaultLowInputLatency :: PaTime | | deviceInfoDefaultLowOutputLatency :: PaTime | | deviceInfoDefaultHighInputLatency :: PaTime | | deviceInfoDefaultHighOutputLatency :: PaTime | | deviceInfoDefaultSampleRate :: Double | |
|
| Instances | |
|
|
|
Parameters for one direction (input or output) of a stream.
| Constructors | StreamParameters | | streamParametersDevice :: DeviceIndex | | streamParametersChannelCount :: Int | | streamParametersSampleFormat :: SampleFormat | | streamParametersSuggestedLatency :: PaTime | | streamParametersHostApiSpecificStreamInfo :: Ptr () | |
|
| Instances | |
|
|
|
A structure containing unchanging information about an open stream.
| Constructors | StreamInfo | | streamInfoStructVersion :: Int | | streamInfoInputLatency :: PaTime | | streamInfoOutputLatency :: PaTime | | streamInfoSampleRate :: Double | |
|
| Instances | |
|
|
|
32 bit floating point representation.
|
|
|
This is a format specifier to be used with functions like
openDefaultStream. It specifies a 32 bit floating point representation.
|
|
|
32 bit integer representation.
|
|
|
This is a format specifier to be used with functions like
openDefaultStream. It specifies a 32 bit integer representation.
|
|
|
16 bit integer representation
|
|
|
This is a format specifier to be used with functions like
openDefaultStream. It specifies a 16 bit integer representation.
|
|
|
8 bit integer representation
|
|
|
This is a format specifier to be used with functions like
openDefaultStream. It specifies a 8 bit integer representation.
|
|
|
8 bit unsigned integer representation
|
|
|
This is a format specifier to be used with functions like
openDefaultStream. It specifies a 8 bit unsigned integer representation.
|
|
|
Type to represent the monotonic time in seconds which can be
used for synchronisation.
|
|
|
A PaStream can provide multiple channels of real-time
streaming audio input and output to a client application.
type PaStream = IntPtr
| Instances | |
|
|
paNullPtr |
|
|
Used to enumerate host APIs at runtime. The values of
this range from 0 to (getHostApiCount - 1)
|
|
|
The index of a PortAudio device.
|
|
|
A special DeviceIndex value indicating that no device
is available or should be used.
|
|
|
A special DeviceIndex value indicating that the device(s)
to be used are specified in the host api specific stream
info structure.
|
|
|
Retrieve the release number of the current PortAudio build.
|
|
|
Retrieve the textual version of the current PortAudio build.
|
|
|
Perform a port audio action in the context
of the PortAudio library.
This initializes the library, performs the
supplied actions, and then terminates the
library. This is the reccomended way to use
the library.
withPortAudio :: IO a -> IO (Maybe a) -- ^ Returns (Just a) on success or Nothing on failure.
|
|
|
:: IO (Either String ErrorCode) | (Right NoError) on success. (Left err) on failure.
| Library initialization function. Call this before using
PortAudio. The functions getVersion, getVersionText, and
getErrorText may be called before initialize is called.
|
|
|
|
:: IO (Either String ErrorCode) | (Right NoError) on success. (Left err) on failure.)
| Library termination function. Call this after PortAudio
is no longer needed.
|
|
|
|
Perform an action with a stream.
|
|
|
|
|
:: PortAudioFormat a | | => Int | Number of input channels
| -> Int | Number of output channels
| -> a | Sample Format. Should only use one of: paUInt8, paInt8, paInt16, paInt32, or paFloat32.
| -> Double | Sample Rate
| -> Int | Frames Per Buffer
| -> IO (Either String (PaStream a)) | (Right PaStream) on success, (Left err) on failure.
| A Simplified version of openStream which opens the default input and/or output device(s).
|
|
|
|
|
|
|
Close a PortAudio stream. If the audio streem is active,
any pending buffers are discarded as if abortStream had been called.
|
|
|
Commences audio processing.
|
|
|
Terminates audio processing. It blocks until all pending
audio buffers have been played.
|
|
|
Terminates audio processing immediately without waiting for
pending buffers to complete.
|
|
|
|
|
|
|
|
|
Retrieve a StreamInfo containing information about the specified stream.
|
|
|
Determine the current time for the stream according to the sample clock used to generate the buffer timestamps.
|
|
|
Retrieve CPU usage information (value between 0.0 and 1.0) for the specified stream.
Note: A usage level of 0.0 is potentially an error (no specific error condition is defined by PortAudio).
|
|
|
Get the number of frames that can be read from the stream without blocking.
|
|
|
Get the number of frames which can be written to the stream without blocking.
|
|
|
:: IO (Either String Int) | (Left err) on failure, (Right int) on success.
| Retrieve the number of available host APIs. Even if a host API
is available it may have no devices available.
|
|
|
|
Returns the index of the default host API.
|
|
|
Gets a structure containing information about a specific host API. FINISH
|
|
|
Retrieve the number of available devices or Nothing if there are none.
|
|
|
Retrieve the index of the default input device or Nothing if there are none.
|
|
|
Retrieve the index of the default output device or Nothing if there are none.
|
|
|
Retrieve a DeviceInfo structure containing information about the specified device.
|
|
|
Retrieve the size of a given sample format in bytes.
|
|
|
Convert a static host API uniqe identifier to a runtime host API index. FINISH
|
|
|
Convert a host-API-specific device index to a standard PortAudio device index. FINISH
|
|
|
|
|
|
:: | | => PaStream a | | -> IO (Either String Bool) | (Right bool) on success, (Left err) on failure.
| Determines whether the stream is stopped.
|
|
|
|
:: | | => PaStream a | | -> IO (Either String Bool) | (Right bool) on success, (Left err) on failure.
| Determines whether the stream is active.
|
|
|
|
Put the caller to sleep for at least n milliseconds.
The function may sleep longer than requested so don't rely on this for accurate
musical timing.
|
|
|
Split a list into as many at most n-lengthed lists as possible.
This is useful for interleaving audio channels.
|
|
|
|
Produced by Haddock version 2.4.2 |