SoundIoFilter Class Reference
[Audio I/O and Signal Processing]

Audio Filtering and Signal Processing Interface. More...

#include <soundio.h>

Inheritance diagram for SoundIoFilter:

Inheritance graph
[legend]
Collaboration diagram for SoundIoFilter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SoundIoFilter ()
 Standard constructor.
virtual ~SoundIoFilter ()
 Standard destructor.
virtual bool FltPrepare (SoundIoFormat const &fmt, bool up, bool dn, ErrorInfo *error=0)=0
 Request filter to prepare for stream processing.
virtual void FltCleanup (void)=0
 Release filter from stream processing.
virtual SoundIoBuffer const * FltProcess (bool up, SoundIoBuffer const &src, SoundIoBuffer &dest)=0
 Request processing of a sample buffer.


Detailed Description

Audio Filtering and Signal Processing Interface.

Member Function Documentation

virtual bool FltPrepare ( SoundIoFormat const &  fmt,
bool  up,
bool  dn,
ErrorInfo error = 0 
) [pure virtual]

Request filter to prepare for stream processing.

As part of starting stream processing, SoundIoPump will invoke this method on all registered filters.

Parameters:
[in] fmt PCM audio format to be used in the stream
[in] up true if samples will move up through this filter, false otherwise.
[in] dn true if samples will move down through this filter, false otherwise.
[out] error Error information structure. If this method fails and returns false, and error is not 0, error will be filled out with information on the cause of the failure.
Return values:
true Filter is prepared and ready to process samples.
false Filter is not prepared, effectively vetoing stream setup. This will cause SoundIoPump::Start() to fail.
For full duplex streams, both up and down will be true. For single direction streams, either up or down will be true.

If this method succeeds, future calls to FltProcess() may be made.

Note:
Each successful call to FltPrepare() will have a corresponding call to FltCleanup().

virtual void FltCleanup ( void   )  [pure virtual]

Release filter from stream processing.

As part of terminating stream processing, SoundIoPump will invoke this method on all registered filters.

After this method returns, no further calls to FltProcess() will be made until the next successful call to FltPrepare().

Note:
Each successful call to FltPrepare() will have a corresponding call to FltCleanup().

virtual SoundIoBuffer const* FltProcess ( bool  up,
SoundIoBuffer const &  src,
SoundIoBuffer dest 
) [pure virtual]

Request processing of a sample buffer.

The SoundIoPump object handles transfer of samples between two SoundIo objects, referred to as its bottom and top endpoints. Between the endpoints, filters may be stacked to intercept and process samples as they pass between the endpoints.

Sample data in a bidirectional pump configuration is transferred first from top to bottom, then bottom to top. In such a configuration, for each packet of sample data transferred, each filter will receive a FltProcess() call with up = false, then another FltProcess() call with up = true.

Parameters:
up true if the samples are moving up through the filter stack, false otherwise.
src Buffer containing source samples for filter
dest Buffer to contain result samples from filter, if modification is required.


The documentation for this class was generated from the following file:
Generated on Fri Jan 9 05:58:40 2009 for libhfp by  doxygen 1.5.4