shithub: m8c

Download patch

ref: 9303ae16a48b3edcc4220fa13822f2814863d34c
parent: 03b9b306d48df8ecf170f8597f8bd0a79a90d341
author: Maido Käära <maido@producement.com>
date: Fri Mar 10 11:31:41 EST 2023

Code review fixes

--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 #Set all your object files (the object files of all the .c files in your project, e.g. main.o my_sub_functions.o )
-OBJ = main.o serial.o slip.o command.o render.o ini.o config.o input.o font.o fx_cube.o usb.o audio.o
+OBJ = main.o serial.o slip.o command.o render.o ini.o config.o input.o font.o fx_cube.o usb.o audio.o usb_audio.o ringbuffer.o
 
 #Set any dependant header files so that if they are edited they cause a complete re-compile (e.g. main.h some_subfunctions.h some_definitions_file.h ), or leave blank
-DEPS = serial.h slip.h command.h render.h ini.h config.h input.h fx_cube.h audio.h
+DEPS = serial.h slip.h command.h render.h ini.h config.h input.h fx_cube.h audio.h ringbuffer.h
 
 #Any special libraries you are using in your project (e.g. -lbcm2835 -lrt `pkg-config --libs gtk+-3.0` ), or leave blank
 INCLUDES = $(shell pkg-config --libs sdl2 libserialport)
--- a/README.md
+++ b/README.md
@@ -110,6 +110,7 @@
 ## Audio
 
 Experimental audio routing support can be enabled by setting the config value `"audio_enabled"` to `"true"`. The audio buffer size can also be tweaked from the config file for possible lower latencies.
+If the right audio device is not picked up by default, you can use a specific audio device by using `"audio_output_device"` config parameter.
 
 ## Config
 
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -1,5 +1,4 @@
 #include "ringbuffer.h"
-#include <stdlib.h>
 #include <SDL.h>
 
 RingBuffer *ring_buffer_create(uint32_t size) {
--- a/ringbuffer.h
+++ b/ringbuffer.h
@@ -1,7 +1,7 @@
 #ifndef M8C_RINGBUFFER_H
 #define M8C_RINGBUFFER_H
 
-#include <stdlib.h>
+#include <stdint.h>
 
 typedef struct {
     uint8_t *buffer;
--