summaryrefslogtreecommitdiffstats
path: root/src/AlsaInput.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-26 01:34:08 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-26 01:34:08 +0100
commit84254c10d2898fbe7f45934bcaad94a217cc22ab (patch)
tree4a2d468800a3318e38c95983d5c390c8e1f4b9cc /src/AlsaInput.h
parent7af7b3dd5f1a4bdef4748079dfee86c81d00bee9 (diff)
downloadODR-AudioEnc-84254c10d2898fbe7f45934bcaad94a217cc22ab.tar.gz
ODR-AudioEnc-84254c10d2898fbe7f45934bcaad94a217cc22ab.tar.bz2
ODR-AudioEnc-84254c10d2898fbe7f45934bcaad94a217cc22ab.zip
Make ALSA input conditional
Diffstat (limited to 'src/AlsaInput.h')
-rw-r--r--src/AlsaInput.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/AlsaInput.h b/src/AlsaInput.h
index 4f63ab5..34886df 100644
--- a/src/AlsaInput.h
+++ b/src/AlsaInput.h
@@ -19,6 +19,11 @@
#ifndef __ALSA_H_
#define __ALSA_H_
+
+#include "config.h"
+
+#if HAVE_ALSA
+
#include <cstdio>
#include <string>
#include <thread>
@@ -27,12 +32,7 @@
#include <alsa/asoundlib.h>
#include "SampleQueue.h"
-
-// 16 bits per sample is fine for now
-#define BYTES_PER_SAMPLE 2
-
-// How many samples we insert into the queue each call
-#define NUM_SAMPLES_PER_CALL 10 // 10 samples @ 32kHz = 3.125ms
+#include "common.h"
/* Common functionality for the direct alsa input and the
* threaded alsa input
@@ -132,5 +132,8 @@ class AlsaInputThreaded : public AlsaInput
};
-#endif
+#endif // HAVE_ALSA
+
+#endif // __ALSA_H_
+