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

Win32/WinCE Soundcard output component. More...

#include <mipwinmmoutput.h>

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

Public Member Functions

bool open (int sampRate, int channels, MIPTime blockTime=MIPTime(0.020), MIPTime bufferTime=MIPTime(10.0), bool highPriority=false, UINT deviceID=WAVE_MAPPER)
 Open the soundcard playback device. More...
 
bool close ()
 Close the soundcard playback 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 allows playing back sound on Win32 and WinCE platforms. It uses the MS-Windows Multimedia SDK waveOut... functions. The component accepts raw audio messages using signed 16 bit little endian encoding. No messages are generated by the component.

Member Function Documentation

bool MIPWinMMOutput::close ( )

Using this function, the previously opened device is closed.

bool MIPWinMMOutput::open ( int  sampRate,
int  channels,
MIPTime  blockTime = MIPTime(0.020),
MIPTime  bufferTime = MIPTime(10.0),
bool  highPriority = false,
UINT  deviceID = WAVE_MAPPER 
)

This function opens the sound playback device.

Parameters
sampRateThe sampling rate (e.g. 8000, 22050, 44100, ...)
channelsThe number of channels (e.g. 1 for mono, 2 for stereo)
blockTimeAudio data with a length corresponding to this parameter is sent to the soundcard device during each iteration.
bufferTimeThe component allocates a number of buffers to store audio data in. This parameter specifies how much data these buffers can contain, specified as a time interval. Note that this is not the amount of buffering introduced by the component.
highPriorityIf true, the thread of the chain in which this component resides will receive the highest priority. This will guarantee a smooth playback.

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