EMIPLIB
Public Types | Public Member Functions | Static Public Member Functions

MIPPAInputOutput Class Reference

A PortAudio input and output component. More...

#include <mippainputoutput.h>

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

List of all members.

Public Types

enum  AccessMode
 

Indicates the access mode for the device.

More...

Public Member Functions

bool open (int sampRate, int channels, MIPTime interval, AccessMode accessMode=WriteOnly, MIPTime bufferTime=MIPTime(10.0))
 Opens the soundcard device.
bool close ()
 Closes the device.

Static Public Member Functions

static bool initializePortAudio (std::string &errorString)
 Initializes the PortAudio library and stores an error message if something goes wrong.
static void terminatePortAudio ()
 De-initializes the PortAudio library.

Detailed Description

This component is a PortAudio soundcard input and output component. The device accepts two kinds of messages: MIPSYSTEMMESSAGE_WAITTIME messages and 16 bit little endian raw audio messages (native endianness). The first 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 native endian raw audio messages.


Member Enumeration Documentation

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


Member Function Documentation

bool MIPPAInputOutput::close ( )
bool MIPPAInputOutput::open ( int  sampRate,
int  channels,
MIPTime  interval,
AccessMode  accessMode = WriteOnly,
MIPTime  bufferTime = MIPTime(10.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.
bufferTimeSpecifies how much memory is preallocated internally.
static void MIPPAInputOutput::terminatePortAudio ( ) [static]

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