#include <gapeconsts.h>
Public Types | |
enum | PlaybackMode { LOOPING, ONEPLAY } |
The possible playback mode for a file - either loop over and over or just play once. | |
enum | TickMode { SEQUENTIAL, PARALLEL } |
Used by unitgroups that can tick either in sequential or parallel mode. More... | |
Static Public Methods | |
void | reportError (const char *error) |
Prints messages to "error.txt". More... | |
GapeIntSample | floatToInt (GapeFloat value) |
An inlined function which converts a GapeFloat to a GapeIntSample. More... | |
GapeFloat | IntToFloat (GapeIntSample value) |
An inlined function which converts a GapeintSample to a GapeFloat. More... | |
void** | expandArray (void **array, int *oldCapacity, int factor=2) |
Given an array of pointers, copies it into a larger array and returns the new array. More... | |
Static Public Attributes | |
int | sampleRate = 22050 |
All units that need to know the sampling rate must check this variable, which can be changed. More... | |
int | updateMutexPeriod = 441 |
Determines how often some units check for control changes. More... |
The important member of this class is the sampleRate variable, which can be checked at any time to determine the sample rate, and can be changed by the user in their actual program, without re-compilng GAPE (as opposed to defining it). This is the only way to set the sample rate - the sound and output classes check this class for their info. It also contains a handy error reporting method (allowing you to print to an "error'txt" file, since console printing in win9x is not the default.
Definition at line 96 of file gapeconsts.h.
|
Used by unitgroups that can tick either in sequential or parallel mode. For detila, see GapeParallelUnitGroup. Definition at line 106 of file gapeconsts.h. |
|
Prints messages to "error.txt".
Definition at line 24 of file gapeconsts.cpp. Referenced by GapeAccumulator::GapeAccumulator(), GapeAudioInput::GapeAudioInput(), GapeAudioOutput::GapeAudioOutput(), GapeFileReader::GapeFileReader(), GapeFileSampleUnit::fillBuffer(), GapeAudioPlot::receiveTick(), GapeAudioOutput::receiveTick(), GapeAudioInput::receiveTick(), GapeUnit::removeController(), GapeUnitGroup::removeUnit(), GapeAccumulator::resizeAccumulator(), GapeUnit::setFreq(), GapeAudioOutput::setNumChannels(), and GapeAudioInput::setNumChannels().
|
|
An inlined function which converts a GapeFloat to a GapeIntSample.
Definition at line 129 of file gapeconsts.h. Referenced by GapeAudioOutput::receiveTick().
|
|
An inlined function which converts a GapeintSample to a GapeFloat.
Definition at line 137 of file gapeconsts.h. Referenced by GapeAudioInput::receiveTick().
|
|
Given an array of pointers, copies it into a larger array and returns the new array.
Definition at line 30 of file gapeconsts.cpp. Referenced by GapeUnit::addController(), and GapeUnitGroup::addUnit().
|
|
All units that need to know the sampling rate must check this variable, which can be changed. I'm worried there could be multithreaded and muytex type issues here - ie sample rate changes, and not everyone know about it, someone assume the samplerate, etc. Perhaps I should include a listener broadcast notification thing and have getSampleRate which is mutexed? def = 22050hz Definition at line 6 of file gapeconsts.cpp. |
|
Determines how often some units check for control changes. Because updateMutex() is actually a slow function, even when a mutex is unlocked, we only check for control changes periodically, as opposed to every sample. A higher number will make for faster cpu perfomance, but slower response to slider pulls. Going any higher than 2000 or 4000 would be preety useless, since the cpu gain is minimal, (gain grows as 1/n) but the delay would start to become more audible. You can just leave it at the default of 441 (ie every 20 ms) Definition at line 7 of file gapeconsts.cpp. |