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

GapeFileSampleUnit Class Reference

Used to play a sample from a file, and have control over frequency, etc. More...

#include <gapefunctionunit.h>

Inheritance diagram for GapeFileSampleUnit::

GapeFunctionUnit GapeUnit List of all members.

Public Slots

virtual void receiveTick (const GapeFloat *values, int numValues)
 If a function unit recieves a NULL tick it will emit a mono tick with the next sample in their waveform, otherwise it will add the next sample (scaled by the current gain) to as many channels of as it receives.


Public Methods

 GapeFileSampleUnit (QWidget *parent, const QString &file)
virtual ~GapeFileSampleUnit ()

Protected Methods

virtual void fillBuffer ()
 Pure virtual function which fills the FunctionUnit's internal buffer with data representing one period of a waveform. More...


Protected Attributes

WvIn* dataReader
QString* filename
bool validFile

Detailed Description

Used to play a sample from a file, and have control over frequency, etc.

Essentially fills our wavetable buffer from a file. The file specified must be smaller than GAPE_FILE_SAMPLE_UNIT_MAX_SIZE (in samples) which right now is about 4 secs at 44khz. If the file is multichannel, it gets mixed down to mono.

Parameters:
parent   the parent widget for our controller
filename   the name of our file, which can be no larger than GAPE_FILE_SAMPLE_UNIT_MAX_SIZE (in samples)
Author:
Dave Chisholm
Since:
Beta 1.0
Version:
Last Modified Beta 1.0

Definition at line 205 of file gapefunctionunit.h.


Member Function Documentation

void GapeFileSampleUnit::fillBuffer ( ) [protected, virtual]
 

Pure virtual function which fills the FunctionUnit's internal buffer with data representing one period of a waveform.

You must allocate storage for this buffer (which is designated by the sampleData pointer) and also set the length of the data (in samples) in the variable dataLength. Deallocation of the data is taken care of by the destructor.

Reimplemented from GapeFunctionUnit.

Definition at line 271 of file gapefunctionunit.cpp.


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