CSL  5.2
CGestalt.cpp File Reference
#include "CGestalt.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <unistd.h>

Go to the source code of this file.

Macros

#define cheapPrintf(val)
#define UNDEFINED_IN_CRAM
#define SWALLOW_CR()
 Logging code: if verbosity.
#define TIMER_INTERVAL   0.25f
 Global Sleep functions that work for windows and mac/unix. Note the use of the global flag gStopNow, which interrupts timers.

Functions

string initFileName ()
 read/write the init file (typ. ~/.cslrc) The reader takes a char key, as in string initMsg(CGestalt::initFileText('T')); which looks for a line starting with "T " in the file and returns the part after the "T " The write function takes a key and a string to store.

Variables

static unsigned mNumInChannels = 2
 The actual start-up values are defined in CSL_Types.h.
static unsigned mNumOutChannels = 2
 stereo outputs
static unsigned mFrameRate = CSL_mFrameRate
 default sample rate (tested up to 96000)
static csl::sample mFramePeriod = 1.0f / (float) CSL_mFrameRate
 1 / default sample rate
static unsigned mBlockSize = CSL_mBlockSize
 typical block size (can be as small as 128 in real usage)
static unsigned mMaxBufferFrames = CSL_mMaxBufferFrames
 max block size (set large for zooming scopes)
static unsigned mSndFileFrames = CSL_mSndFileFrames
 max block size (set large for zooming scopes)
static unsigned mMaxSndFileFrames = CSL_mMaxSndFileFrames
 max block size (set large for zooming scopes)
static unsigned mVerbosity = CSL_mVerbosity
 very verbose
static unsigned mLoggingPeriod = CSL_mLoggingPeriod
 log CPU every 15 sec
static unsigned mOutPort = CSL_mOutPort
 RFS output port.
static std::string mDataFolder = CSL_DATA_DIR
 User's CSL data folder ()
static bool mStopNow = false
 flag to stop threads and timers

Macro Definition Documentation

#define cheapPrintf (   val)
Value:
if (val < 10) \
*xpos = '0'; \
else \
*xpos = '0' + (val / 10); \
*(xpos+1) = '0' + (val % 10)

Definition at line 161 of file CGestalt.cpp.

Referenced by csl::CGestalt::sndFileName().

#define UNDEFINED_IN_CRAM

Definition at line 194 of file CGestalt.cpp.

#define SWALLOW_CR ( )

Logging code: if verbosity.

Definition at line 205 of file CGestalt.cpp.

Referenced by csl::vlogMsg().

#define TIMER_INTERVAL   0.25f

Global Sleep functions that work for windows and mac/unix. Note the use of the global flag gStopNow, which interrupts timers.

Definition at line 332 of file CGestalt.cpp.

Referenced by csl::sleepUsec().


Function Documentation

string initFileName ( )

read/write the init file (typ. ~/.cslrc) The reader takes a char key, as in string initMsg(CGestalt::initFileText('T')); which looks for a line starting with "T " in the file and returns the part after the "T " The write function takes a key and a string to store.

Definition at line 92 of file CGestalt.cpp.

References CSL_INIT_FILE.

Referenced by csl::CGestalt::initFileText(), and csl::CGestalt::storeToInitFile().


Variable Documentation

unsigned mNumInChannels = 2
static

The actual start-up values are defined in CSL_Types.h.

stereo inputs by default

Definition at line 26 of file CGestalt.cpp.

Referenced by csl::AUIO::getInput(), csl::IO::getInput(), csl::CGestalt::numInChannels(), and csl::CGestalt::setNumInChannels().

unsigned mNumOutChannels = 2
static

stereo outputs

Definition at line 27 of file CGestalt.cpp.

Referenced by csl::CGestalt::numOutChannels(), and csl::CGestalt::setNumOutChannels().

csl::sample mFramePeriod = 1.0f / (float) CSL_mFrameRate
static

1 / default sample rate

Definition at line 30 of file CGestalt.cpp.

Referenced by csl::CGestalt::framePeriod(), and csl::CGestalt::setFrameRate().

unsigned mBlockSize = CSL_mBlockSize
static

typical block size (can be as small as 128 in real usage)

Definition at line 31 of file CGestalt.cpp.

Referenced by csl::CGestalt::blockSize(), and csl::CGestalt::setBlockSize().

unsigned mMaxBufferFrames = CSL_mMaxBufferFrames
static

max block size (set large for zooming scopes)

Definition at line 32 of file CGestalt.cpp.

Referenced by csl::CGestalt::maxBufferFrames(), and csl::CGestalt::setMaxBufferFrames().

unsigned mSndFileFrames = CSL_mSndFileFrames
static

max block size (set large for zooming scopes)

Definition at line 33 of file CGestalt.cpp.

Referenced by csl::CGestalt::setSndFileFrames(), and csl::CGestalt::sndFileFrames().

unsigned mMaxSndFileFrames = CSL_mMaxSndFileFrames
static

max block size (set large for zooming scopes)

Definition at line 34 of file CGestalt.cpp.

Referenced by csl::CGestalt::maxSndFileFrames(), and csl::CGestalt::setMaxSndFileFrames().

unsigned mVerbosity = CSL_mVerbosity
static

very verbose

Definition at line 36 of file CGestalt.cpp.

Referenced by csl::CGestalt::setVerbosity(), csl::CGestalt::verbosity(), and csl::vlogMsg().

unsigned mLoggingPeriod = CSL_mLoggingPeriod
static

log CPU every 15 sec

Definition at line 37 of file CGestalt.cpp.

Referenced by csl::CGestalt::loggingPeriod(), and csl::CGestalt::setLoggingPeriod().

unsigned mOutPort = CSL_mOutPort
static

RFS output port.

Definition at line 38 of file CGestalt.cpp.

Referenced by csl::CGestalt::outPort(), and csl::CGestalt::setOutPort().

std::string mDataFolder = CSL_DATA_DIR
static

User's CSL data folder ()

Definition at line 39 of file CGestalt.cpp.

Referenced by csl::CGestalt::dataFolder(), and csl::CGestalt::setDataFolder().

bool mStopNow = false
static

flag to stop threads and timers

Definition at line 40 of file CGestalt.cpp.

Referenced by csl::CGestalt::clearStopNow(), csl::CGestalt::setStopNow(), and csl::CGestalt::stopNow().