LMMS
Loading...
Searching...
No Matches
ysfx_api_eel.cpp File Reference
#include "ysfx.hpp"
#include "ysfx_api_eel.hpp"
#include "ysfx_utils.hpp"
#include <cstring>
#include <cstdlib>
#include <cstddef>
#include "WDL/ptrlist.h"
#include "WDL/assocarray.h"
#include "WDL/mutex.h"
#include "WDL/eel2/eel_strings.h"
#include "WDL/eel2/eel_misc.h"
#include "WDL/eel2/eel_fft.h"
#include "WDL/eel2/eel_mdct.h"
#include "WDL/eel2/eel_atomic.h"

Macros

#define EEL_STRING_STDOUT_WRITE(x, len)
#define EEL_STRING_MAXUSERSTRING_LENGTH_HINT   ysfx_string_max_length
#define EEL_ATOMIC_SET_SCOPE(opaque)
#define EEL_ATOMIC_ENTER   mutex->lock()
#define EEL_ATOMIC_LEAVE   mutex->unlock()

Functions

void ysfx_api_init_eel ()
void ysfx_eel_string_initvm (NSEEL_VMCTX vm)
eel_string_context_stateysfx_eel_string_context_new ()
void ysfx_eel_string_context_free (eel_string_context_state *state)
void ysfx_eel_string_context_update_named_vars (eel_string_context_state *state, NSEEL_VMCTX vm)
bool ysfx_string_access (ysfx_t *fx, ysfx_real id, bool for_write, void(*access)(void *, WDL_FastString &), void *userdata)
bool ysfx_string_get (ysfx_t *fx, ysfx_real id, std::string &txt)
bool ysfx_string_set (ysfx_t *fx, ysfx_real id, const std::string &txt)
void ysfx_string_lock (ysfx_t *fx)
void ysfx_string_unlock (ysfx_t *fx)
const char * ysfx_string_access_unlocked (ysfx_t *fx, ysfx_real id, WDL_FastString **fs, bool for_write)
void NSEEL_HOSTSTUB_EnterMutex ()
void NSEEL_HOSTSTUB_LeaveMutex ()

Variables

static ysfx::mutex atomic_mutex

Macro Definition Documentation

◆ EEL_ATOMIC_ENTER

#define EEL_ATOMIC_ENTER   mutex->lock()

◆ EEL_ATOMIC_LEAVE

#define EEL_ATOMIC_LEAVE   mutex->unlock()

◆ EEL_ATOMIC_SET_SCOPE

#define EEL_ATOMIC_SET_SCOPE ( opaque)
Value:
ysfx::mutex *mutex = ((opaque) ? &((ysfx_t *)(opaque))->atomic_mutex : &atomic_mutex);
pthread_mutex_t mutex
Definition Controller.C:6
#define opaque
Definition eelscript.h:281
struct ysfx_s ysfx_t
Definition ysfx.h:103
static ysfx::mutex atomic_mutex
Definition ysfx_api_eel.cpp:37

◆ EEL_STRING_MAXUSERSTRING_LENGTH_HINT

#define EEL_STRING_MAXUSERSTRING_LENGTH_HINT   ysfx_string_max_length

◆ EEL_STRING_STDOUT_WRITE

#define EEL_STRING_STDOUT_WRITE ( x,
len )
Value:
{ fwrite(x,len,1,stdout); fflush(stdout); }
unsigned x[BMAX+1]
Definition inflate.c:1586

Function Documentation

◆ NSEEL_HOSTSTUB_EnterMutex()

void NSEEL_HOSTSTUB_EnterMutex ( )

◆ NSEEL_HOSTSTUB_LeaveMutex()

void NSEEL_HOSTSTUB_LeaveMutex ( )

◆ ysfx_api_init_eel()

void ysfx_api_init_eel ( )

◆ ysfx_eel_string_context_free()

void ysfx_eel_string_context_free ( eel_string_context_state * state)

◆ ysfx_eel_string_context_new()

eel_string_context_state * ysfx_eel_string_context_new ( )

◆ ysfx_eel_string_context_update_named_vars()

void ysfx_eel_string_context_update_named_vars ( eel_string_context_state * state,
NSEEL_VMCTX vm )

◆ ysfx_eel_string_initvm()

void ysfx_eel_string_initvm ( NSEEL_VMCTX vm)

◆ ysfx_string_access()

bool ysfx_string_access ( ysfx_t * fx,
ysfx_real id,
bool for_write,
void(* access )(void *, WDL_FastString &),
void * userdata )

◆ ysfx_string_access_unlocked()

const char * ysfx_string_access_unlocked ( ysfx_t * fx,
ysfx_real id,
WDL_FastString ** fs,
bool for_write )

◆ ysfx_string_get()

bool ysfx_string_get ( ysfx_t * fx,
ysfx_real id,
std::string & txt )

◆ ysfx_string_lock()

void ysfx_string_lock ( ysfx_t * fx)

◆ ysfx_string_set()

bool ysfx_string_set ( ysfx_t * fx,
ysfx_real id,
const std::string & txt )

◆ ysfx_string_unlock()

void ysfx_string_unlock ( ysfx_t * fx)

Variable Documentation

◆ atomic_mutex

ysfx::mutex atomic_mutex
static