RetroArch
Macros | Functions | Variables
midi_driver.c File Reference
#include <string.h>
#include <string/stdstring.h>
#include <lists/string_list.h>
#include <retro_miscellaneous.h>
#include "../configuration.h"
#include "../verbosity.h"
#include "midi_driver.h"
Include dependency graph for midi_driver.c:
This graph shows which files directly or indirectly include this file:

Macros

#define MIDI_DRIVER_BUF_SIZE   4096
 

Functions

static midi_driver_tmidi_driver_find_driver (const char *ident)
 
const voidmidi_driver_find_handle (int index)
 
const char * midi_driver_find_ident (int index)
 
struct string_listmidi_driver_get_avail_inputs (void)
 
struct string_listmidi_driver_get_avail_outputs (void)
 
bool midi_driver_set_all_sounds_off (void)
 
bool midi_driver_set_volume (unsigned volume)
 
bool midi_driver_init_io_buffers (void)
 
bool midi_driver_init (void)
 
void midi_driver_free (void)
 
bool midi_driver_set_input (const char *input)
 
bool midi_driver_set_output (const char *output)
 
bool midi_driver_input_enabled (void)
 
bool midi_driver_output_enabled (void)
 
bool midi_driver_read (uint8_t *byte)
 
bool midi_driver_write (uint8_t byte, uint32_t delta_time)
 
bool midi_driver_flush (void)
 
size_t midi_driver_get_event_size (uint8_t status)
 

Variables

midi_driver_t midi_null
 
midi_driver_t midi_winmm
 
midi_driver_t midi_alsa
 
static midi_driver_tmidi_drivers []
 
static midi_driver_tmidi_drv = &midi_null
 
static voidmidi_drv_data
 
static struct string_listmidi_drv_inputs
 
static struct string_listmidi_drv_outputs
 
static bool midi_drv_input_enabled
 
static bool midi_drv_output_enabled
 
static uint8_tmidi_drv_input_buffer
 
static uint8_tmidi_drv_output_buffer
 
static midi_event_t midi_drv_input_event
 
static midi_event_t midi_drv_output_event
 
static bool midi_drv_output_pending
 
static const uint8_t midi_drv_ev_sizes [128]
 

Macro Definition Documentation

◆ MIDI_DRIVER_BUF_SIZE

#define MIDI_DRIVER_BUF_SIZE   4096

Function Documentation

◆ midi_driver_find_driver()

static midi_driver_t* midi_driver_find_driver ( const char *  ident)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_find_handle()

const void* midi_driver_find_handle ( int  index)
Here is the caller graph for this function:

◆ midi_driver_find_ident()

const char* midi_driver_find_ident ( int  index)
Here is the caller graph for this function:

◆ midi_driver_flush()

bool midi_driver_flush ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_free()

void midi_driver_free ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_get_avail_inputs()

struct string_list* midi_driver_get_avail_inputs ( void  )
Here is the caller graph for this function:

◆ midi_driver_get_avail_outputs()

struct string_list* midi_driver_get_avail_outputs ( void  )
Here is the caller graph for this function:

◆ midi_driver_get_event_size()

size_t midi_driver_get_event_size ( uint8_t  status)

midi_driver_get_event_size: This is a convenience function for finding out the size of the event based on the status byte.

: Status (first) byte of the event.

Returns: Size of the event (in bytes). If 'status' argument is invalid (< 0x80) or 'status' represents start of the "SysEx" event (0xF0) this function will return 0.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_init()

bool midi_driver_init ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_init_io_buffers()

bool midi_driver_init_io_buffers ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_input_enabled()

bool midi_driver_input_enabled ( void  )
Here is the caller graph for this function:

◆ midi_driver_output_enabled()

bool midi_driver_output_enabled ( void  )
Here is the caller graph for this function:

◆ midi_driver_read()

bool midi_driver_read ( uint8_t byte)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_set_all_sounds_off()

bool midi_driver_set_all_sounds_off ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_set_input()

bool midi_driver_set_input ( const char *  input)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_set_output()

bool midi_driver_set_output ( const char *  output)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_set_volume()

bool midi_driver_set_volume ( unsigned  volume)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ midi_driver_write()

bool midi_driver_write ( uint8_t  byte,
uint32_t  delta_time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ midi_alsa

midi_driver_t midi_alsa

◆ midi_drivers

midi_driver_t* midi_drivers[]
static
Initial value:
= {
}
midi_driver_t midi_null
Definition: null_midi.c:88

◆ midi_drv

midi_driver_t* midi_drv = &midi_null
static

◆ midi_drv_data

void* midi_drv_data
static

◆ midi_drv_ev_sizes

const uint8_t midi_drv_ev_sizes[128]
static
Initial value:
=
{
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
0, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
}

◆ midi_drv_input_buffer

uint8_t* midi_drv_input_buffer
static

◆ midi_drv_input_enabled

bool midi_drv_input_enabled
static

◆ midi_drv_input_event

midi_event_t midi_drv_input_event
static

◆ midi_drv_inputs

struct string_list* midi_drv_inputs
static

◆ midi_drv_output_buffer

uint8_t* midi_drv_output_buffer
static

◆ midi_drv_output_enabled

bool midi_drv_output_enabled
static

◆ midi_drv_output_event

midi_event_t midi_drv_output_event
static

◆ midi_drv_output_pending

bool midi_drv_output_pending
static

◆ midi_drv_outputs

struct string_list* midi_drv_outputs
static

◆ midi_null

midi_driver_t midi_null

◆ midi_winmm

midi_driver_t midi_winmm