summaryrefslogtreecommitdiffstats
path: root/stream/audio_in.h
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-07-16 13:28:28 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-03 21:59:54 +0100
commit37388ebb0ef9085c841d7f94e665a5a77cfe0e92 (patch)
treeb47d18bee4e7f661d9e6d794dac0ec1cebcd3a37 /stream/audio_in.h
parent891a2a1f474add323145e6b2cd2d29181830e4a4 (diff)
downloadmpv-37388ebb0ef9085c841d7f94e665a5a77cfe0e92.tar.bz2
mpv-37388ebb0ef9085c841d7f94e665a5a77cfe0e92.tar.xz
configure: uniform the defines to #define HAVE_xxx (0|1)
The configure followed 5 different convetions of defines because the next guy always wanted to introduce a new better way to uniform it[1]. For an hypothetic feature 'hurr' you could have had: * #define HAVE_HURR 1 / #undef HAVE_DURR * #define HAVE_HURR / #undef HAVE_DURR * #define CONFIG_HURR 1 / #undef CONFIG_DURR * #define HAVE_HURR 1 / #define HAVE_DURR 0 * #define CONFIG_HURR 1 / #define CONFIG_DURR 0 All is now uniform and uses: * #define HAVE_HURR 1 * #define HAVE_DURR 0 We like definining to 0 as opposed to `undef` bcause it can help spot typos and is very helpful when doing big reorganizations in the code. [1]: http://xkcd.com/927/ related
Diffstat (limited to 'stream/audio_in.h')
-rw-r--r--stream/audio_in.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/stream/audio_in.h b/stream/audio_in.h
index 2f42685c7c..af2cecd28d 100644
--- a/stream/audio_in.h
+++ b/stream/audio_in.h
@@ -25,7 +25,7 @@
#include "config.h"
-#ifdef CONFIG_ALSA
+#if HAVE_ALSA
#include <alsa/asoundlib.h>
typedef struct {
@@ -38,7 +38,7 @@ typedef struct {
} ai_alsa_t;
#endif
-#ifdef CONFIG_OSS_AUDIO
+#if HAVE_OSS_AUDIO
typedef struct {
char *device;
@@ -46,7 +46,7 @@ typedef struct {
} ai_oss_t;
#endif
-#ifdef CONFIG_SNDIO
+#if HAVE_SNDIO
#include <sndio.h>
typedef struct {
@@ -72,13 +72,13 @@ typedef struct
int bytes_per_sample;
int samplesize;
-#ifdef CONFIG_ALSA
+#if HAVE_ALSA
ai_alsa_t alsa;
#endif
-#ifdef CONFIG_OSS_AUDIO
+#if HAVE_OSS_AUDIO
ai_oss_t oss;
#endif
-#ifdef CONFIG_SNDIO
+#if HAVE_SNDIO
ai_sndio_t sndio;
#endif
} audio_in_t;
@@ -92,19 +92,19 @@ int audio_in_uninit(audio_in_t *ai);
int audio_in_start_capture(audio_in_t *ai);
int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer);
-#ifdef CONFIG_ALSA
+#if HAVE_ALSA
int ai_alsa_setup(audio_in_t *ai);
int ai_alsa_init(audio_in_t *ai);
int ai_alsa_xrun(audio_in_t *ai);
#endif
-#ifdef CONFIG_OSS_AUDIO
+#if HAVE_OSS_AUDIO
int ai_oss_set_samplerate(audio_in_t *ai);
int ai_oss_set_channels(audio_in_t *ai);
int ai_oss_init(audio_in_t *ai);
#endif
-#ifdef CONFIG_SNDIO
+#if HAVE_SNDIO
int ai_sndio_setup(audio_in_t *ai);
int ai_sndio_init(audio_in_t *ai);
#endif