Workbench Library  0.1b
workbench.h File Reference
#include "portaudio.h"
#include "portmidi.h"
#include "porttime.h"
#include "workbench_logger.h"
#include "workbench_config.h"
#include "workbench_audio.h"
#include "workbench_midi.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
Include dependency graph for workbench.h:

Go to the source code of this file.

Data Structures

struct  Config
 Defines the structure for configuration settings. More...
 

Macros

#define WORKBENCH_FLAG_ENUMERATE(FLAG)   FLAG##_BIT,
 Enumerates flag bits. More...
 
#define DEFAULT_IN_CHANNELS_COUNT    1
 Defines the default number of audio input channels.
 
#define DEFAULT_OUT_CHANNELS_COUNT    2
 Defines the default number of audio output channels.
 
#define FLAGS(FLAG)
 Defines a list of feature flags and their bitwise representations. More...
 
#define CONFIG(FIELD)
 Defines configuration fields and their default values using the X-macro technique. More...
 

Typedefs

typedef SAMPLE AudioSample_t
 Defines AudioSample_t as the type for audio samples. More...
 
typedef void(* AudioCallback) (const void *, void *, unsigned long, void *)
 Type definition for audio callback functions. More...
 
typedef int(* MidiCallback) (const void *, void *, unsigned long, void *)
 Type definition for MIDI callback functions. More...
 

Enumerations

enum  flag_bits { FLAGS =(WORKBENCH_FLAG_ENUMERATE) }
 Enumeration of flag bits for feature flags.
 
enum  flags { FLAGS =(WORKBENCH_FLAG_ENUMERATE) }
 Enumeration of feature flags.
 

Functions

void audio_init ()
 Initializes the audio system. More...
 
void audio_deinit ()
 Deinitializes the audio system. More...
 
void midi_init ()
 Initializes the MIDI system. More...
 
void midi_deinit ()
 Deinitializes the MIDI system. More...
 
Configconfig_init (int argc, char **argv, AudioCallback audio_cb, MidiCallback midi_cb, void *user_data)
 Initializes the configuration with the specified audio and MIDI callbacks. More...
 
void config_deinit ()
 
void config_print ()
 Prints the current configuration settings to the standard output.
 
Configconfig_get ()
 Retrieves the current configuration. More...
 
uint8_t get_log_level ()
 Retrieves the log level. More...
 

Macro Definition Documentation

◆ WORKBENCH_FLAG_ENUMERATE

#define WORKBENCH_FLAG_ENUMERATE (   FLAG)    FLAG##_BIT,

Enumerates flag bits.

The ENUMERATE macro appends _BIT to each flag name, creating an enumeration of flag bits. This enumeration assigns a unique index to each flag, which can be used to generate bitwise representations.

Parameters
FLAGThe macro parameter representing a feature flag.