LMMS
Loading...
Searching...
No Matches
Util.cpp File Reference
#include "Util.h"
#include <vector>
#include <cassert>
#include <math.h>
#include <stdio.h>
#include <err.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "ThreadShims.h"
#include <errno.h>
#include <string.h>

Classes

struct  pool_entry

Typedefs

typedef std::vector< pool_entrypool_t
typedef pool_t::iterator pool_itr_t

Functions

float VelF (float velocity, unsigned char scaling)
float getdetune (unsigned char type, unsigned short int coarsedetune, unsigned short int finedetune)
bool fileexists (const char *filename)
void set_realtime ()
void os_sleep (long length)
std::string legalizeFilename (std::string filename)
void invSignal (float *sig, size_t len)
float * getTmpBuffer ()
void returnTmpBuffer (float *buf)
void clearTmpBuffers (void)
float interpolate (const float *data, size_t len, float pos)
float cinterpolate (const float *data, size_t len, float pos)

Variables

prng_t prng_state = 0x1234
Config config
float * denormalkillbuf
pool_t pool

Typedef Documentation

◆ pool_itr_t

typedef pool_t::iterator pool_itr_t

◆ pool_t

typedef std::vector<pool_entry> pool_t

Function Documentation

◆ cinterpolate()

float cinterpolate ( const float * data,
size_t len,
float pos )

◆ clearTmpBuffers()

void clearTmpBuffers ( void )

◆ fileexists()

bool fileexists ( const char * filename)

◆ getdetune()

float getdetune ( unsigned char type,
unsigned short int coarsedetune,
unsigned short int finedetune )

◆ getTmpBuffer()

float * getTmpBuffer ( )

◆ interpolate()

float interpolate ( const float * data,
size_t len,
float pos )

◆ invSignal()

void invSignal ( float * sig,
size_t len )

◆ legalizeFilename()

std::string legalizeFilename ( std::string filename)

◆ os_sleep()

void os_sleep ( long length)

Os independent sleep in microsecond

◆ returnTmpBuffer()

void returnTmpBuffer ( float * buf)

◆ set_realtime()

void set_realtime ( )

Try to set current thread to realtime priority program priority

Todo

see if the right pid is being sent

see if this is having desired effect, if not then look at pthread_attr_t

◆ VelF()

float VelF ( float velocity,
unsigned char scaling )

Variable Documentation

◆ config

◆ denormalkillbuf

float* denormalkillbuf

the buffer to add noise in order to avoid denormalisation

◆ pool

pool_t pool

◆ prng_state

prng_t prng_state = 0x1234