CC = gcc
-CFLAGS = -std=gnu11 -Wall
+CFLAGS = -std=gnu11 -Wall -O2
LDFLAGS = -lpthread -lao -lmpg123 -lwiringPi
fakeradio : mp3player.o main.o
$(CC) $(CFLAGS) -o fakeradio main.o mp3player.o $(LDFLAGS)
mem->mh = mpg123_new(NULL, &err);
buffer_size = mpg123_outblock(mem->mh);
mem->buffer = (unsigned char*) malloc(buffer_size * sizeof(unsigned char));
+ mem->aodev = ao_open_live(driver, &format, NULL);
pthread_cleanup_push(cleanupThread, (void*) mem);
do {
if (mpg123_open(mem->mh, settings->file) != MPG123_OK) return NULL;
format.channels = channels;
format.byte_format = AO_FMT_NATIVE;
format.matrix = 0;
- mem->aodev = ao_open_live(driver, &format, NULL);