Added config files
This commit is contained in:
22
csoundbox.c
22
csoundbox.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user