OpenNI 1.5.4: xn::AudioGenerator Class Reference

OpenNI

xn::AudioGenerator Class Reference

#include <XnCppWrapper.h>

Inheritance diagram for xn::AudioGenerator:

List of all members.

Public Member Functions

 AudioGenerator (XnNodeHandle hNode=NULL)
 AudioGenerator (const NodeWrapper &other)
XnStatus Create (Context &context, Query *pQuery=NULL, EnumerationErrors *pErrors=NULL)
void GetMetaData (AudioMetaData &metaData) const
const XnUChar * GetAudioBuffer () const
XnUInt32 GetSupportedWaveOutputModesCount () const
XnStatus GetSupportedWaveOutputModes (XnWaveOutputMode *aSupportedModes, XnUInt32 &nCount) const
XnStatus SetWaveOutputMode (const XnWaveOutputMode &OutputMode)
XnStatus GetWaveOutputMode (XnWaveOutputMode &OutputMode) const
XnStatus RegisterToWaveOutputModeChanges (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
void UnregisterFromWaveOutputModeChanges (XnCallbackHandle hCallback)

Detailed Description

Purpose: An audio generator node generates audio data.

Event: 'Wave Output Mode Change'

Signals that the node's current configuration's Wave Output Mode has been changed to some other wave output mode.

Use RegisterToWaveOutputModeChanges() and UnregisterFromWaveOutputModeChanges() for using this event.

This event is raised by calling SetWaveOutputMode().


Constructor & Destructor Documentation

xn::AudioGenerator::AudioGenerator ( XnNodeHandle  hNode = NULL) [inline]

Ctor

Parameters:
[in]hNodeNode handle
xn::AudioGenerator::AudioGenerator ( const NodeWrapper other) [inline]

Member Function Documentation

XnStatus xn::AudioGenerator::Create ( Context context,
Query pQuery = NULL,
EnumerationErrors pErrors = NULL 
) [inline]

Creates an AudioGenerator node from available production node alternatives.

Remarks

See Understanding the Create() method for a detailed description of this method.

const XnUChar* xn::AudioGenerator::GetAudioBuffer ( ) const [inline]
For full details and usage, see xnGetAudioBuffer
void xn::AudioGenerator::GetMetaData ( AudioMetaData metaData) const [inline]

Gets the audio generator node's latest frame object, saving it in the xn::AudioMetaData object. This frame object is a snapshot of the generated label map data and its associated configuration information at a certain point in time. This saved frame object provides fast and easy access to the audio generator node's data and configuration information.

Parameters:
[out]metaDataStructure to be filled with the frame object.

Remarks:

This method is central in the use of the AudioGenerator node. Once the AudioGenerator node is generating data, after each 'Update Data' call, the application calls this method to get the node's frame object, which contains the data and all its associated properties.

XnStatus xn::AudioGenerator::GetSupportedWaveOutputModes ( XnWaveOutputMode aSupportedModes,
XnUInt32 &  nCount 
) const [inline]

Returns a list of the wave output modes that the AudioGenerator node supports.

Parameters:
[out]aSupportedModesBuffer to be filled with the list of wave output modes.
[in,out]nCount[in] Size of the array. [out] Number of modes returned.
XnUInt32 xn::AudioGenerator::GetSupportedWaveOutputModesCount ( ) const [inline]

Gets the node's number of supported wave output modes.

XnStatus xn::AudioGenerator::GetWaveOutputMode ( XnWaveOutputMode OutputMode) const [inline]

Gets the current AudioGenerator node's wave output mode. This output mode is used for generating the next audio packet.

Parameters:
[out]OutputModeCurrent wave output mode.

Remarks

The wave output mode is contained in the XnWaveOutputMode struct. Each wave output mode comprises settings for bits per sample, channel, and sample rate, as follows:

XnStatus xn::AudioGenerator::RegisterToWaveOutputModeChanges ( StateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle hCallback 
) [inline]

Registers an event handler for the 'Wave Output Mode Change' event.

Parameters:
[in]handlerCallback function to be invoked when the event is raised.
[in]pCookieUser's cookie, to be delivered to the callback.
[out]hCallbackHandle to the callback to be used for unregistering it.

For full details and usage of the parameters, see Registering to Events.

XnStatus xn::AudioGenerator::SetWaveOutputMode ( const XnWaveOutputMode OutputMode) [inline]

Sets the current wave output mode of the AudioGenerator node. This output mode is used for generating the next audio packet.

Parameters:
[in]OutputModeMode to set as the current wave output mode.

Remarks

The wave output mode is contained in the xn::XnWaveOutputMode struct. It comprises: bits per sample, channel, and sample rate.

void xn::AudioGenerator::UnregisterFromWaveOutputModeChanges ( XnCallbackHandle  hCallback) [inline]

Unregisters an event handler for the 'Wave Output Mode Change' event.

Parameters:
[in]hCallbackHandle received from registration.

For full details and usage of the parameter, see Unregistering from Events .


The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:07 for OpenNI 1.5.4 by   doxygen 1.7.5.1