/** Library initialization function - call this before using PortAudio.
- This function initialises internal data structures and prepares underlying
+ This function initializes internal data structures and prepares underlying
host APIs for use. With the exception of Pa_GetVersion(), Pa_GetVersionText(),
and Pa_GetErrorText(), this function MUST be called before using any other
PortAudio API functions.
/** Library termination function - call this when finished using PortAudio.
This function deallocates all resources allocated by PortAudio since it was
- initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has
+ initialized by a call to Pa_Initialize(). In cases where Pa_Initialise() has
been called multiple times, each call must be matched with a corresponding call
to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically
close any PortAudio streams that are still open.
/** Return information about the last host error encountered. The error
information returned by Pa_GetLastHostErrorInfo() will never be modified
- asyncronously by errors occurring in other PortAudio owned threads
+ asynchronously by errors occurring in other PortAudio owned threads
(such as the thread that manages the stream callback.)
This function is provided as a last resort, primarily to enhance debugging
by providing clients with access to all available error information.
- @return A pointer to an immutable structure constaining information about
+ @return A pointer to an immutable structure constraining information about
the host error. The values in this structure will only be valid if a
PortAudio function has previously returned the paUnanticipatedHostError
error code.
/** Retrieve the index of the default output device. The result can be
used in the outputDevice parameter to Pa_OpenStream().
- @return The default output device index for the defualt host API, or paNoDevice
+ @return The default output device index for the default host API, or paNoDevice
if no default output device is available or an error was encountered.
@note
configure their latency based on these parameters, otherwise they may
choose the closest viable latency instead. Unless the suggested latency
is greater than the absolute upper limit for the device implementations
- should round the suggestedLatency up to the next practial value - ie to
- provide an equal or higher latency than suggestedLatency wherever possibe.
+ should round the suggestedLatency up to the next practical value - ie to
+ provide an equal or higher latency than suggestedLatency wherever possible.
Actual latency values for an open stream may be retrieved using the
inputLatency and outputLatency fields of the PaStreamInfo structure
returned by Pa_GetStreamInfo().
stream will finish as soon as possible. If paComplete is returned, the stream
will continue until all buffers generated by the callback have been played.
This may be useful in applications such as soundfile players where a specific
- duration of output is required. However, it is not necessary to utilise this
+ duration of output is required. However, it is not necessary to utilize this
mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also
be used to stop the stream. The callback must always fill the entire output
buffer irrespective of its return value.
@see Pa_OpenStream, Pa_OpenDefaultStream
- @note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call
+ @note With the exception of Pa_GetStreamCpuLoad() it is not permissible to call
PortAudio API functions from within the stream callback.
*/
typedef int PaStreamCallback(
@param framesPerBuffer The number of frames passed to the stream callback
function, or the preferred block granularity for a blocking read/write stream.
The special value paFramesPerBufferUnspecified (0) may be used to request that
- the stream callback will recieve an optimal (and possibly varying) number of
+ the stream callback will receive an optimal (and possibly varying) number of
frames based on host requirements and the requested latency settings.
Note: With some host APIs, the use of non-zero framesPerBuffer for a callback
stream may introduce an additional layer of buffering which could introduce
that a non-zero framesPerBuffer value only be used when your algorithm
requires a fixed number of frames per stream callback.
- @param streamFlags Flags which modify the behaviour of the streaming process.
+ @param streamFlags Flags which modify the behavior of the streaming process.
This parameter may contain a combination of flags ORed together. Some flags may
only be relevant to certain buffer formats.
@param numOutputChannels The number of channels of sound to be delivered to the
stream callback or passed to Pa_WriteStream. It can range from 1 to the value
- of maxOutputChannels in the PaDeviceInfo record for the default output dvice.
+ of maxOutputChannels in the PaDeviceInfo record for the default output device.
If 0 the stream is opened as an output-only stream.
@param sampleFormat The sample format of both the input and output buffers
from when the stream is opened until it is closed. Starting and stopping the stream
does not affect the passage of time returned by Pa_GetStreamTime.
- This time may be used for syncronising other events to the audio stream, for
+ This time may be used for synchronizing other events to the audio stream, for
example synchronizing audio to MIDI.
@return The stream's current time in seconds, or 0 if an error occurred.
to maintain real-time operation. A value of 0.5 would imply that PortAudio and
the stream callback was consuming roughly 50% of the available CPU time. The
return value may exceed 1.0. A value of 0.0 will always be returned for a
- blocking read/write stream, or if an error occurrs.
+ blocking read/write stream, or if an error occurs.
*/
double Pa_GetStreamCpuLoad( PaStream* stream );