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

GapeAudioDriver Class Reference

A simple object which drives a chain of GapeUnits by continually sending out ticks. More...

#include <gapeaudiodriver.h>

Inheritance diagram for GapeAudioDriver::

GapeUnit List of all members.

Public Slots

void start ()
 Starts the driving thread.

void pause ()
 Pauses the thread until unPause() is called.

void unPause ()
 Unpauses the thread - if its not paused, does nothing harmlessly.

bool isPaused ()
 Determines if the thread is paused. More...

virtual void receiveTick (const GapeFloat *values, int numValues)
 Pure virtual function that all subclasses of GapeUnit must define. More...


Public Methods

 GapeAudioDriver ()
 The constructor.

 ~GapeAudioDriver ()
 The destructor. More...


Detailed Description

A simple object which drives a chain of GapeUnits by continually sending out ticks.

(Using a helper) The GapeAudioDriver continually signals emitTick() - as soon as the unit chain which has been hooked to it have completed their receive and emit ticks, it will signal emitTick() again. In this manner, it will drive an application at the sampling rate if they are hooked up to a real time output, or as fast as possible if they are writing to disk or something. Be careful - if you mute all units in a chain being driven by an audio driver, the audio driver will become a runaway thread and hog the processor. In this case, you should also pause the driver.

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

Definition at line 23 of file gapeaudiodriver.h.


Constructor & Destructor Documentation

GapeAudioDriver::~GapeAudioDriver ( )
 

The destructor.

This will take care of stopping the thread as well.

Definition at line 55 of file gapeaudiodriver.cpp.


Member Function Documentation

bool GapeAudioDriver::isPaused ( ) [slot]
 

Determines if the thread is paused.

Returns:
true if the thread is paused.

Definition at line 72 of file gapeaudiodriver.cpp.

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

Pure virtual function that all subclasses of GapeUnit must define.

This function is the primary function in the GapeUnit environment. See class documentation for more info.

Parameters:
values   pointer to samples data being sent to the function
numValues   number of floating point values pointed to by "values" (ie number of channels of audio)

Reimplemented from GapeUnit.

Definition at line 60 of file gapeaudiodriver.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