#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <dirent.h>#include "global.h"#include "midi.h"#include "csv.h"Go to the source code of this file.
Functions | |
| int | handle_arguments (int argc, char **argv) |
| int | set_midi_devices () |
| int | load_input_file () |
| int handle_arguments | ( | int | argc, | |
| char ** | argv | |||
| ) |
This function checks the arguments that the user has chosen. First it assigns the input filename to the respective variable and then it sets 1 to the 'player' variable if one of the arguments is '-p' and sets 1 to the 'verbose' variable if one of the arguments is '-d'. It returns 0 in case of success and returns 1 otherwise.
| int set_midi_devices | ( | ) |
This function scans the '/dev' directory and prints all the available midi devices. Then opens the input and output devices chosen by the user. It returns 0 in case of success and returns 1 otherwise.
| int load_input_file | ( | ) |
This function opens the chosen input file and calls the respective function for each valid extension to interpret its bytes. It returns 0 in case of success and returns 1 otherwise.
1.6.2-20100124