From d6e7e04edb3e2049eb9bd6632f06480ba2e7b848 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 6 Apr 2017 23:04:20 -0700 Subject: added limits for frames and channels --- src/Makefile | 4 +++- src/limits.c | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/limits.c (limited to 'src') diff --git a/src/Makefile b/src/Makefile index cde8267..56159d6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,13 +16,15 @@ INCLUDE_DIRS = -I ../include override CFLAGS := $(WARNINGS) $(INCLUDE_DIRS) -fPIC $(CFLAGS) VPATH = ../include/tinyalsa -OBJECTS = mixer.o pcm.o +OBJECTS = limits.o mixer.o pcm.o .PHONY: all all: libtinyalsa.a libtinyalsa.so pcm.o: pcm.c pcm.h +limits.o: limits.c limits.h + mixer.o: mixer.c mixer.h libtinyalsa.a: $(OBJECTS) diff --git a/src/limits.c b/src/limits.c new file mode 100644 index 0000000..25bd352 --- /dev/null +++ b/src/limits.c @@ -0,0 +1,12 @@ +#include + +const struct tinyalsa_unsigned_interval tinyalsa_channels_limit = { + .max = TINYALSA_CHANNELS_MAX, + .min = TINYALSA_CHANNELS_MIN +}; + +const struct tinyalsa_unsigned_interval tinyalsa_frames_limit = { + .max = TINYALSA_FRAMES_MAX, + .min = TINYALSA_FRAMES_MIN +}; + -- cgit v1.2.3