CSL  6.0
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 SWALLOW_CR()
 Logging code: if verbosity. More...
 
#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. More...
 

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. More...
 

Variables

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

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 177 of file CGestalt.cpp.

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

#define SWALLOW_CR ( )

Logging code: if verbosity.

Definition at line 219 of file CGestalt.cpp.

#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 341 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 108 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 29 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 30 of file CGestalt.cpp.

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

float mFrameRateF = (float) CSL_mFrameRate
static

default sample rate (tested up to 96000)

Definition at line 33 of file CGestalt.cpp.

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

csl::sample mFramePeriod = 1.0f / mFrameRateF
static

1 / default sample rate

Definition at line 34 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 35 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 36 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 37 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 38 of file CGestalt.cpp.

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

unsigned mVerbosity = CSL_mVerbosity
static

very verbose

Definition at line 40 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 41 of file CGestalt.cpp.

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

unsigned mOutPort = CSL_mOutPort
static

RFS output port.

Definition at line 42 of file CGestalt.cpp.

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

string mDataFolder = CSL_DATA_DIR
static

User's CSL data folder ()

Definition at line 43 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 44 of file CGestalt.cpp.

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

unsigned sScreenWidth
static

screen width is global (so you can reference it without including this file)

Definition at line 46 of file CGestalt.cpp.

Referenced by csl::CGestalt::screenWidth(), and csl::CGestalt::setScreenWidth().

unsigned sScreenHeight
static

screen height is global

Definition at line 47 of file CGestalt.cpp.

Referenced by csl::CGestalt::screenHeight(), and csl::CGestalt::setScreenHeight().