JackUtils 0.5
Provides simplified Jack API for clients :)
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Variables
Jack Utils Common API definitions

Data Structures

struct  program_info
 Structure required for custom cllients, that uses jackutils! It provides libjackutils with general information about your program. More...
 

Macros

#define JU_MAX_PORTS   127
 max ports descriptors count.
 

Typedefs

typedef unsigned char ju_uint8_t
 Unsigned int definition...
 
typedef const char * ju_cstr_t
 Informative type definition. More...
 
typedef jack_default_audio_sample_t ju_sample_t
 Sample type. More...
 
typedef struct ju_ctx_s ju_ctx_t
 Typedef wrapper around internal JackUtils Context structure.
 
typedef void(* ju_process_func_t) (ju_ctx_t *x, size_t s)
 Jack Audio processing callback. More...
 
typedef size_t() ju_stream_func_t(void *p, ju_sample_t *x, size_t s)
 Stream callback function for ju_port_write_stream() function. More...
 
typedef signed long ju_ssize_t
 Signed size type.
 

Enumerations

enum  ju_port_type { JU_INPUT = 1 , JU_OUTPUT = 2 }
 Enum of all available port types. More...
 

Variables

const struct program_info program_info
 to make it simply acessable from ANYWHERE :D
 

Detailed Description

Typedef Documentation

◆ ju_cstr_t

typedef const char* ju_cstr_t

Informative type definition.

C String type.

◆ ju_process_func_t

typedef void(* ju_process_func_t) (ju_ctx_t *x, size_t s)

Jack Audio processing callback.

In this callback you generally go through all your ports and process audio data in some way...

This process callback should not call functions that might block for long time, like malloc(), free(), pthread_join(), sleep(), wait() and etc. => process callback should work as fast as possible!

Parameters
xJackUtils context.
slength of sample arrays (same as ju_length())
See also
ju_start()
Returns
void

◆ ju_sample_t

typedef jack_default_audio_sample_t ju_sample_t

Sample type.

Typically it is float, but not predict it! Depends on definition in jack/jack.h file!

◆ ju_stream_func_t

typedef size_t() ju_stream_func_t(void *p, ju_sample_t *x, size_t s)

Stream callback function for ju_port_write_stream() function.

This is cool wrapper for generators or audio data readers from something :)

Parameters
puserdata
xdestination sample array
scount of elements callback need to write
Returns
count of written elements

If callback returns less data, than required, it will be called again. If callback returns 0, it will not be called again! (means End of data) WARNING: writing data out of bounds is Undefined Behaviour. Pro Tip : This callback may be used as audio generator :)

Enumeration Type Documentation

◆ ju_port_type

Enum of all available port types.

Port types cannot be mixed!

Enumerator
JU_INPUT 

Input port type.

Port recieves audio data.

JU_OUTPUT 

Output port type.

Port returns audio data.