drummer/drummer.h
Arnaud G. GIBERT 8844bd636f - Add utils.h & utils.c files,
- Implement DR_Kit_Id_Convert() and DR_Bank_Program_Id_Convert(),
- Implement UI title label and id_bank_program label update,
- Add GPL3 license file & file headers.
2024-04-14 16:17:19 +02:00

182 lines
5.9 KiB
C

/*----------------------------------------------------------------------------*/
/* drummer.h */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/* This file is part of Drummer. */
/* */
/* Drummer is free software: you can redistribute it and/or modify it */
/* under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* Drummer is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Drummer. If not, see <https://www.gnu.org/licenses/>. */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/* Includes */
/*----------------------------------------------------------------------------*/
#ifndef _DRUMMER_H_
#define _DRUMMER_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>
#include <ctype.h>
#include <math.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <sys/time.h>
#include <libgen.h>
#include <glob.h>
#include <pthread.h>
#include <node.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <sndfile.h>
#include <samplerate.h>
/*----------------------------------------------------------------------------*/
/* Global definitions */
/*----------------------------------------------------------------------------*/
typedef short DRT_Boolean;
#define DRD_FALSE ( DRT_Boolean) 0
#define DRD_TRUE ( DRT_Boolean) 1
#define DR_BOOLEAN_VALUE_FALSE_IS( v) ( (v) == DRD_FALSE)
#define DR_BOOLEAN_VALUE_TRUE_IS( v) ( (v) == DRD_TRUE)
#define DR_BOOLEAN_VALUE_ASCII_GET( v) ( DR_BOOLEAN_VALUE_FALSE_IS( (v)) ? "FALSE" : ( DR_BOOLEAN_VALUE_TRUE_IS( (v)) ? "TRUE" : "???"))
#define DRD_NO 'n'
#define DRD_YES 'y'
#define DR_MAX(A,B) (((A) < (B)) ? (B) : (A))
#define DR_MIN(A,B) (((A) > (B)) ? (B) : (A))
#define DRD_SAMPLE_RATE_DEFAULT 44100
/*----------------------------------------------------------------------------*/
/* Status definition */
/*----------------------------------------------------------------------------*/
typedef short DRT_Status;
#define DRS_OK ( DRT_Status) 0
#define DRS_KO ( DRT_Status) 1
#define DRS_NO_IDENT ( DRT_Status) -2
#define DRS_BAD_FORMAT ( DRT_Status) -3
#define DRS_ROLLBACK ( DRT_Status) -4
#define DRS_NO_DATA ( DRT_Status) 3
#define DRS_SIGNAL ( DRT_Status) 4
/*----------------------------------------------------------------------------*/
/* Drummer Includes */
/*----------------------------------------------------------------------------*/
#include <datastruct.h>
#include <utils.h>
#include <lv2_utils.h>
#include <lv2_plugin.h>
#include <lv2_ui.h>
# ifdef _DRUMMER_C_
/*----------------------------------------------------------------------------*/
/* Private Definitions */
/*----------------------------------------------------------------------------*/
#define DRD_MODULE_NAME "dru"
/*----------------------------------------------------------------------------*/
/* Prototypes */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/* DR_Init */
/*----------------------------------------------------------------------------*/
DRT_Status DR_Init();
/*----------------------------------------------------------------------------*/
/* DeInit */
/*----------------------------------------------------------------------------*/
DRT_Status DR_DeInit();
/*----------------------------------------------------------------------------*/
/* main */
/*----------------------------------------------------------------------------*/
/* ArgC: argument number */
/* ArgV: Argument tab */
/*----------------------------------------------------------------------------*/
int main( int, char **);
# else // ifdef _DRUMMER_C_
/*----------------------------------------------------------------------------*/
/* Public Prototypes */
/*----------------------------------------------------------------------------*/
# endif // ifdef _DRUMMER_C_
/*----------------------------------------------------------------------------*/
#endif // ifndef _DRUMMER_H_