Added config files

This commit is contained in:
2017-12-13 19:11:31 +01:00
parent eac1c224c1
commit edde2c0aec
6 changed files with 94 additions and 7 deletions

View File

@@ -3,18 +3,32 @@
#include <stdlib.h>
#include <stdio.h>
#include "csoundbox.h"
#include "config.h"
#include <string.h>
#include <ncurses.h>
#define BITS 8
int main(int argc, char *argv[])
{
cfginit();
playSound(lookupSounds('a'));
char input;
initscr();
nonl(); //no newline
keypad(stdscr, FALSE); //Disable the F1-12 keypad
curs_set(0); //Disable the cursor
while ((input = getch()) != 13) {
playSound(lookupSounds(input));
}
endwin();
cfgdestroy();
return 0;
}
void playSound(char *path) {
mpg123_handle *mh;
void playSound(const char *path) {
mpg123_handle *mh;
unsigned char *buffer;
size_t buffer_size;
size_t done;