

Public Member Functions | |
| virtual SSIError | SSInBegin () |
| begins sample stream input | |
| virtual SSIError | SSInEnd () |
| ends sample stream input | |
| virtual SSIError | SSInRead () |
| requests a buffer of input | |
| virtual char * | SSInPtr () |
| returns a pointer to the current input sample buffer | |
| virtual long | SSInBytes () |
| returns the size of the SSInPtr() buffer in bytes | |
| virtual StreamType | SSInStreamType () |
| returns the CSSI subclass's stream type | |
| virtual SSIError | SSInRewind () |
| rewinds stream (not supported by all streams) | |
| GMap * | GenEnum () |
| enumerates signal generator plugins | |
| GDesc * | GenDesc () |
| see CGPlugIn::GetDesc() | |
| GPList * | GenPList () |
| see CGPlugIn::GetPList() | |
| bool | GenStart () |
| see CGPlugIn::Start() | |
| bool | GenStop () |
| see CGPlugIn::Stop() | |
| bool | GenSet (int nParam, float fValue, bool bApply=false) |
| see CGPlugIn::Set() | |
| bool | GenApply () |
| see CGPlugIn::Apply() | |
| bool | GenCommand (void *pVoid=NULL) |
| see CGPlugIn::Command() | |
| SSIError | GenSelect (char *pName) |
| selects a signal generator | |
Header: sigen.h
| virtual SSIError CSIGen::SSInBegin | ( | ) | [virtual] |
SSInBegin() begins sample stream input. Subclasses should call the base class function to init the Sample interface and reset the overflow counter.
Reimplemented from CSSI.
| virtual SSIError CSIGen::SSInEnd | ( | ) | [virtual] |
| virtual SSIError CSIGen::SSInRead | ( | ) | [virtual] |
SSInRead() requests a buffer of input. For continuous streams, this function can suspend, waiting for input samples. Subclasses should call the base class function to reset the Sample interface for the new buffer. After SSInRead() returns, SSInPtr() will point to the new sample data and SSInBytes() will indicate the number of bytes read.
Reimplemented from CSSI.
| virtual char* CSIGen::SSInPtr | ( | ) | [inline, virtual] |
SSInPtr() returns a pointer to the current input sample buffer. The buffer samples are channel-interleaved and in their native format (e.g., 8 or 16-bit int, float). The Sample interface provides a slightly higher-level of buffer access, retrieving samples one at a time in float format. Some SSIs might choose to only support one type of sample access.
Reimplemented from CSSI.
| virtual long CSIGen::SSInBytes | ( | ) | [inline, virtual] |
SSInBytes() returns the size of the SSInPtr() buffer in bytes.
Reimplemented from CSSI.
| GMap* CSIGen::GenEnum | ( | ) | [inline] |
The GenEnum() function enumerates signal generator plugins. The available plugins are returned in the GMap array. The GMap struct maps generator names (pGenName string field) to generator DLLs (pGenDLL string field). The generator name is used with GenSelect() to select and initialize the generator.
| bool CSIGen::GenCommand | ( | void * | pVoid = NULL |
) | [inline] |
| SSIError CSIGen::GenSelect | ( | char * | pName | ) |
The GenSelect() function selects a signal generator. To obtain a list of available generators, use the GenEnum() function. The generator is initially in a stopped state (samples are zeroed if rendering). To set initial conditions, call GenApply() before calling GenStart() to start sample generation. Generator parameters are set via the "parameter list" (see GenSet(), GenPList(), and the GPList struct). Calling GenApply() informs the plugin that parameters have been set.
Example 1 - Using gslab.h enums for parameter list access:
pGen->GenSelect( "sine" ); pGen->GetSet( Gsine::frequency, 1000.0f ); pGen->GetSet( Gsine::amplitude, 1.0f ); pGen->GenApply(); pGen->GenStart();
Example 2 - Using parameter list directly with GUI slider:
// init slider code fragment: pGen->GenSelect( "sine" ); pGen->GenStart(); // start with default params plist = pGen->GenPList(); int i = 0; while( plist[i].pName[0] ) { // slider id, string label, min value, max value, default value SliderInit( i, plist[i].pName, plist[i].fMin, plist[i].fMax, plist[i].fDef ); ++i; } // on slider movement code fragment: // Set() sets the plist fVal and bSet fields pGen->Set( nSliderID, fSliderValue ); pGen->GenApply();
gslab.h lists the slab3d generators and generator parameters. The default generator is "square".
| pName | generator name |