X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/666130346faf921dfaa1a4d30f40ffe5354e14de..eb5e067336c457058b5e67bf5835b778ec100019:/clients/playrtp.c?ds=sidebyside diff --git a/clients/playrtp.c b/clients/playrtp.c index 6496daf..cbc24ae 100644 --- a/clients/playrtp.c +++ b/clients/playrtp.c @@ -49,12 +49,9 @@ * - it is safe to read uint32_t values without a lock protecting them */ -#include -#include "types.h" +#include "common.h" #include -#include -#include #include #include #include @@ -62,8 +59,6 @@ #include #include #include -#include -#include #include #include #include @@ -175,18 +170,16 @@ pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; /** @brief Condition variable signalled whenever @ref packets is changed */ pthread_cond_t cond = PTHREAD_COND_INITIALIZER; -#if HAVE_ALSA_ASOUNDLIB_H -# define DEFAULT_BACKEND playrtp_alsa -#elif HAVE_SYS_SOUNDCARD_H || EMPEG_HOST -# define DEFAULT_BACKEND playrtp_oss -#elif HAVE_COREAUDIO_AUDIOHARDWARE_H -# define DEFAULT_BACKEND playrtp_coreaudio -#else -# error No known backend +#if DEFAULT_BACKEND == BACKEND_ALSA +# define DEFAULT_PLAYRTP_BACKEND playrtp_alsa +#elif DEFAULT_BACKEND == BACKEND_OSS +# define DEFAULT_PLAYRTP_BACKEND playrtp_oss +#elif DEFAULT_BACKEND == BACKEND_COREAUDIO +# define DEFAULT_PLAYRTP_BACKEND playrtp_coreaudio #endif /** @brief Backend to play with */ -static void (*backend)(void) = &DEFAULT_BACKEND; +static void (*backend)(void) = DEFAULT_PLAYRTP_BACKEND; HEAP_DEFINE(pheap, struct packet *, lt_packet);