00001 /* 00002 * table.h 00003 * 00004 * author: Roberto Piassi Passos Bodo 00005 * email: rppbodo@gmail.com 00006 */ 00007 00008 #ifndef table_h 00009 #define table_h 00010 00011 #include <stdio.h> 00012 #include <stdlib.h> 00013 #include <string.h> 00014 00015 #include "global.h" 00016 00017 typedef struct node_t { 00018 long int delta_time; 00019 int tempo; 00020 struct node_t* next; 00021 } Node_t; 00022 00023 typedef Node_t* Link_t; 00024 00025 Link_t head_t; 00026 00027 typedef struct node { 00028 long int delta_time; 00029 unsigned char bytes[3]; 00030 struct node* next; 00031 } Node; 00032 00033 typedef Node* Link; 00034 00035 Link* table; 00036 00037 int* events; 00038 00039 void init_table(); 00040 00041 void insert_tempo(int delta_time, int tempo); 00042 00043 void print_tempo(); 00044 00045 void insert_table(int track, int delta_time, unsigned char* bytes); 00046 00047 void print_table(int track); 00048 00049 int fix_soloist_track(); 00050 00051 void finish_table(); 00052 00053 #endif