Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

GapeAudioOutput Class Reference

This class provides real time sound output. More...

#include <gapeaudiooutput.h>

Inheritance diagram for GapeAudioOutput::

GapeUnit List of all members.

Public Slots

virtual void receiveTick (const GapeFloat *values, int numValues)
 Outputs the sample to the sound card, then emits it for any Units hooked up after it. More...

virtual void stop ()
virtual void start ()
virtual void setMute (bool b)
 Mutes the unit. More...

virtual void setNumChannels (int nc)
 We override this method, because we can not dynamically change the number of channels we are receivingor sending under most audio API's (ie directx, OSS). More...


Public Methods

 GapeAudioOutput (GapeController *c=NULL, int numChannels=1, int device=-1)
 The constructor. More...

virtual ~GapeAudioOutput ()

Detailed Description

This class provides real time sound output.

Its capabilities (ie channels and sample rates supported) are largely dependant on your sound card.

Author:
Dave Chisholm
Since:
Beta 1.0
Version:
Last Modified Beta 1.0

Definition at line 15 of file gapeaudiooutput.h.


Constructor & Destructor Documentation

GapeAudioOutput::GapeAudioOutput ( GapeController * c = NULL,
int numChannels = 1,
int device = -1 )
 

The constructor.

Parameters:
c   An optional graphical controller.
numChannels   The amount of output channels to request. If this is more than your sound card can handle, the class will write an error to the log, and no sound will play, but should not cause other problems.
device   This is for support of computers with multiple audio cards. To use default card, omit parameter or pass -1.

Definition at line 5 of file gapeaudiooutput.cpp.


Member Function Documentation

void GapeAudioOutput::receiveTick ( const GapeFloat * values,
int numValues ) [virtual, slot]
 

Outputs the sample to the sound card, then emits it for any Units hooked up after it.

Parameters:
values   The sample.
numValues   The number of channels - if this is not what we expect, things are handled as follows. Extra channels are discarded, and if we expected more channels than we were sent, the remaining channels are filled with 0.

Reimplemented from GapeUnit.

Definition at line 64 of file gapeaudiooutput.cpp.

void GapeAudioOutput::setMute ( bool b ) [virtual, slot]
 

Mutes the unit.

Parameters:
b   true to mute, false to unmute

Reimplemented from GapeUnit.

Definition at line 37 of file gapeaudiooutput.cpp.

void GapeAudioOutput::setNumChannels ( int nc ) [inline, virtual, slot]
 

We override this method, because we can not dynamically change the number of channels we are receivingor sending under most audio API's (ie directx, OSS).

You'll need to construct a new object in this case.

Reimplemented from GapeUnit.

Definition at line 45 of file gapeaudiooutput.h.


The documentation for this class was generated from the following files:
Generated at Thu Jun 21 13:28:50 2001 for GAPE by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001