CGestalt.h File Reference

#include "CSL_Types.h"
#include <stdarg.h>
#include <string>

Go to the source code of this file.


Classes

class  csl::CGestalt
class  csl::Model
 Forward declaration. More...
class  csl::Observer

Namespaces

namespace  csl
 < we use the STL vector, map, and string classes

Defines

#define SAFE_MALLOC(ptr, type, len)
#define SAFE_FREE(ptr)

Enumerations

enum  csl::LogLevel { csl::kLogInfo, csl::kLogWarning, csl::kLogError, csl::kLogFatal }

Functions

void csl::logMsg (char *format,...)
 default is kLogInfo severity
void csl::logMsg (LogLevel level, char *format,...)
void csl::vlogMsg (char *format, va_list args)
void csl::vlogMsg (LogLevel level, char *format, va_list args)
bool csl::sleepUsec (float dur)
 sleep for dur usec, msec or sec
bool csl::sleepMsec (float dur)
bool csl::sleepSec (float dur)
float csl::fRand (void)
 A variety of random-number functions.
float csl::fRand2 (void)
 float between -1 and 1
float csl::fRand3 (float minV, float maxV)
 float in range min - max
float csl::fRand4 (float base, float range)
 float in range base +- (range * base)
float csl::fRand5 (float base, float range)
 float in range base +- range
float csl::fRand6 (float val)
 float in range 0 +- val
float csl::fRandZ (void)
 0 - 1 (name: zero)
float csl::fRand1 (void)
 -1 - 1 (one)
float csl::fRandM (float minV, float maxV)
 min - max (min/max)
float csl::fRandR (float base, float range)
 b +- (r * b) (range)
float csl::fRandB (float base, float range)
 b +- r (base)
float csl::fRandV (float val)
 0 +- v (val)
bool csl::coin ()
 Answer true or false.
bool csl::coin (float bias)
 Answer true or false with a bias (bias 1 --> always true).


Define Documentation

#define SAFE_MALLOC ( ptr,
type,
len   ) 

Value:

ptr = new type[len];                                \
    if ((char *) ptr == NULL)                           \
        throw MemoryError("can't allocate buffer");     \
    memset(ptr, 0, len * sizeof(ptr))
Useful Macros

Referenced by csl::Buffer::allocateBuffers(), csl::BinauralPanner::BinauralPanner(), csl::BinauralSourceCache::BinauralSourceCache(), csl::HRTF::HRTF(), csl::IFFT::IFFT(), and csl::LSoundFile::readBufferFromFile().

#define SAFE_FREE ( ptr   ) 


Generated on Thu Sep 17 23:14:16 2009 for CSL by  doxygen 1.5.8