LMMS
Loading...
Searching...
No Matches
lv2apply.c File Reference
#include <assert.h>
#include <math.h>
#include <sndfile.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lilv/lilv.h"

Classes

struct  Param
struct  Port
struct  LV2Apply

Typedefs

typedef struct Param Param

Enumerations

enum  PortType { TYPE_CONTROL , TYPE_AUDIO }

Functions

static int fatal (LV2Apply *self, int status, const char *fmt,...)
static SNDFILE * sopen (LV2Apply *self, const char *path, int mode, SF_INFO *fmt)
static void sclose (const char *path, SNDFILE *file)
static bool sread (SNDFILE *file, unsigned file_chans, float *buf, unsigned buf_chans)
static int cleanup (int status, LV2Apply *self)
static int create_ports (LV2Apply *self)
static void print_version (void)
static int print_usage (int status)
int main (int argc, char **argv)

Typedef Documentation

◆ Param

typedef struct Param Param

Control port value set from the command line

Enumeration Type Documentation

◆ PortType

enum PortType

Port type (only float ports are supported)

Enumerator
TYPE_CONTROL 
TYPE_AUDIO 

Function Documentation

◆ cleanup()

int cleanup ( int status,
LV2Apply * self )
static

Clean up all resources.

◆ create_ports()

int create_ports ( LV2Apply * self)
static

Create port structures from data (via create_port()) for all ports.

◆ fatal()

int fatal ( LV2Apply * self,
int status,
const char * fmt,
... )
static

Print a fatal error and clean up for exit.

◆ main()

int main ( int argc,
char ** argv )

◆ print_usage()

int print_usage ( int status)
static

◆ print_version()

void print_version ( void )
static

◆ sclose()

void sclose ( const char * path,
SNDFILE * file )
static

Close a sound file with error handling.

◆ sopen()

SNDFILE * sopen ( LV2Apply * self,
const char * path,
int mode,
SF_INFO * fmt )
static

Open a sound file with error handling.

◆ sread()

bool sread ( SNDFILE * file,
unsigned file_chans,
float * buf,
unsigned buf_chans )
static

Read a single frame from a file into an interleaved buffer.

If more channels are required than are available in the file, the remaining channels are distributed in a round-robin fashion (LRLRL).