drummer/lv2_utils.c

109 lines
4.0 KiB
C
Raw Normal View History

/*----------------------------------------------------------------------------*/
/* Includes */
/*----------------------------------------------------------------------------*/
#define _LV2_UTILS_C_
#include <drummer.h>
/*----------------------------------------------------------------------------*/
/* DR_LV2_Log_Write */
/*----------------------------------------------------------------------------*/
/*
DRT_Status DR_LV2_Log_Write( DRT_Log_Type_Id Log_Type_Id, char *Out_Fmt, va_list Args)
{
LV2_URID type;
switch( Log_Type_Id)
{
case DRD_LOG_TYPE_ID_TRACE:
{
type = DRG_LV2_Base.Logger.Trace;
break;
}
case DRD_LOG_TYPE_ID_INFO:
{
type = DRG_LV2_Base.Logger.Note;
break;
}
case DRD_LOG_TYPE_ID_WARNING:
{
type = DRG_LV2_Base.Logger.Warning;
break;
}
case DRD_LOG_TYPE_ID_ERROR:
case DRD_LOG_TYPE_ID_UNKNOWN:
default:
{
type = DRG_LV2_Base.Logger.Error;
break;
}
}
if( lv2_log_vprintf( &(DRG_LV2_Base.Logger), type, Out_Fmt, Args) == 0)
{
fprintf( stderr, "LV2 logger error...\n");
}
return( DRS_OK);
}
*/
/*----------------------------------------------------------------------------*/
/* */
/*----------------------------------------------------------------------------*/
void DR_LV2_Map_URIS( LV2_URID_Map *Map_Ptr, DRT_Drummer_URIS *URIS)
{
URIS->Atom_Object = Map_Ptr->map( Map_Ptr->handle, LV2_ATOM__Object);
URIS->String_URId = Map_Ptr->map( Map_Ptr->handle, LV2_ATOM__String);
URIS->Bool_URId = Map_Ptr->map( Map_Ptr->handle, LV2_ATOM__Bool);
URIS->Int_URId = Map_Ptr->map( Map_Ptr->handle, LV2_ATOM__Int);
URIS->Long_URId = Map_Ptr->map( Map_Ptr->handle, LV2_ATOM__Long);
URIS->Tuple_URId = Map_Ptr->map( Map_Ptr->handle, LV2_ATOM__Tuple);
URIS->Midi_Event = Map_Ptr->map( Map_Ptr->handle, "http://lv2plug.in/ns/ext/midi#MidiEvent");
URIS->Atom_EventTransfer = Map_Ptr->map( Map_Ptr->handle, LV2_ATOM__eventTransfer);
URIS->UI_Msg = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#uimsg");
URIS->UI_Enable = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#uienable");
URIS->UI_Disable = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#uidisable");
URIS->Kit_Update_Request = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#kitupdaterequest");
URIS->Kit_Update_Reply = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#kitupdatereply");
URIS->Velocity_Ignore_Flag_Toggle = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#velocitytoggle");
URIS->Note_Off_Ignore_Flag_Toggle = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#noteofftoggle");
/*
URIS->kit_path = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#kitpath");
URIS->get_state = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#getstate");
URIS->midi_info = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#midiinfo");
URIS->sample_trigger = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#sampletrigger");
URIS->velocity_toggle = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#velocitytoggle");
URIS->note_off_toggle = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#noteofftoggle");
URIS->channel_id = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#channelid");
URIS->zero_position = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#zeroposition");
URIS->sample_add = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#sampleadd");
URIS->sample_remove = Map_Ptr->map( Map_Ptr->handle, DRD_DRUMMER_URI "#sampleremove");
*/
}