EMIPLIB  1.2.1
Public Types | Public Member Functions | List of all members
MIPOSSInputOutput Class Reference

An Open Sound System (OSS) input and output component. More...

#include <mipossinputoutput.h>

Inheritance diagram for MIPOSSInputOutput:
Inheritance graph
[legend]
Collaboration diagram for MIPOSSInputOutput:
Collaboration graph
[legend]

Public Types

Public Member Functions

bool open (int sampRate, int channels, MIPTime interval, AccessMode accessMode=WriteOnly, const MIPOSSInputOutputParams *pParams=0)
 Opens the soundcard device. More...
 
int getSamplingRate () const
 Returns the sampling rate which is used. More...
 
uint32_t getRawAudioSubtype () const
 Returns the raw audio subtype which is used by the component. More...
 
bool close ()
 Closes the device. More...
 
- Public Member Functions inherited from MIPComponent
virtual void lock ()
 Locks the current component. More...
 
virtual void unlock ()
 Unlocks the current component. More...
 
virtual bool processFeedback (const MIPComponentChain &chain, int64_t feedbackChainID, MIPFeedback *feedback)
 Add feedback information about this component. More...
 
std::string getComponentName () const
 Returns the name of the component. More...
 
- Public Member Functions inherited from MIPErrorBase
std::string getErrorString () const
 Returns the last known error description. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MIPComponent
 MIPComponent (const std::string &componentName)
 Create a component with the specified name. More...
 
- Protected Member Functions inherited from MIPErrorBase
void setErrorString (const std::string &str) const
 Stores an error description. More...
 

Detailed Description

This component is an Open Sound System (OSS) soundcard input and output component. The device accepts two kinds of messages: MIPSYSTEMMESSAGE_WAITTIME messages and 16 bit raw audio messages. The first type of message uses the input part of the component, the second type is sent to the output part of the component. Messages produced by this component are 16 bit raw audio messages. A trivial echo chain would have an object of this type as start component and a connection from this object to this object, thereby immediately playing back the captured audio.

Member Enumeration Documentation

This is used to specify the access mode for the device. Use MIPOSSInputOutput::ReadOnly to only capture audio, MIPOSSInputOutput::WriteOnly to only play back audio and MIPOSSInputOutput::ReadWrite to do both. The device must support full duplex mode to be opened in ReadWrite mode.

Member Function Documentation

bool MIPOSSInputOutput::close ( )
uint32_t MIPOSSInputOutput::getRawAudioSubtype ( ) const
inline
int MIPOSSInputOutput::getSamplingRate ( ) const
inline
bool MIPOSSInputOutput::open ( int  sampRate,
int  channels,
MIPTime  interval,
AccessMode  accessMode = WriteOnly,
const MIPOSSInputOutputParams pParams = 0 
)

Using this function, a soundcard device is opened and initialized.

Parameters
sampRateThe sampling rate (e.g. 8000, 22050, 44100, ...)
channelsThe number of channels (e.g. 1 for mono, 2 for stereo)
intervalThis interval is used to capture audio and to play back audio.
accessModeSpecifies the access mode for the device.
pParamsAdditional parameters. If set to null, default values will be used.

The documentation for this class was generated from the following file: