aboutsummaryrefslogtreecommitdiff
path: root/src/typedef.h
blob: c585f7a00438d1e4768f7cdadfc11baa1a15ef8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef TYPEDEF_H
#define TYPEDEF_H

#include <stdio.h>
#define __str__(x) #x
#define stringize(x) __str__(x)

#define __RED__ "\033[0;31m"
#define __GREEN__ "\033[0;32m"
#define __RESET__ "\033[0m"

#define info(...) fprintf(stdout, __GREEN__"[INFO]"__RESET__" "__FILE__":"stringize(__LINE__)": "__VA_ARGS__)
#define err(...) fprintf(stderr, __RED__"[ERR]"__RESET__"  "__FILE__":"stringize(__LINE__)": "__VA_ARGS__)

#define BUF_CAP 65536 // max datagram size
#define REC_CAP 5880 // 30th of a second of audio

#endif