From: Kaj-Michael Lang Date: Mon, 25 Feb 2008 11:39:34 +0000 (+0200) Subject: Move audio sink and src to audio.h X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34829e2ccfbf72f428f383e2a533aacb3724fd25;p=mapper Move audio sink and src to audio.h --- diff --git a/src/audio-note.c b/src/audio-note.c index 3f02450..2c7e100 100644 --- a/src/audio-note.c +++ b/src/audio-note.c @@ -25,16 +25,9 @@ #include "config.h" #include +#include "audio.h" #include "audio-note.h" -#ifdef WITH_DEVICE_770 -#define AUDIO_SRC "dsppcmsrc" -#define AUDIO_SINK "dsppcmsink" -#else -#define AUDIO_SRC "alsasrc" -#define AUDIO_SINK "autoaudiosink" -#endif - typedef struct _note_pipeline note_pipeline; struct _note_pipeline { GstElement *pipeline; diff --git a/src/audio.h b/src/audio.h new file mode 100644 index 0000000..2d35a9f --- /dev/null +++ b/src/audio.h @@ -0,0 +1,12 @@ +#ifndef _AUDIO_H +#define _AUDIO_H + +#ifdef WITH_DEVICE_770 +#define AUDIO_SRC "dsppcmsrc" +#define AUDIO_SINK "dsppcmsink" +#else +#define AUDIO_SRC "alsasrc" +#define AUDIO_SINK "autoaudiosink" +#endif + +#endif diff --git a/src/speak.c b/src/speak.c index 61d2cf7..bd9a27e 100644 --- a/src/speak.c +++ b/src/speak.c @@ -32,12 +32,7 @@ #include #include -#ifndef WITH_DEVICE_770 -#define AUDIO_SINK "autoaudiosink" -#else -#define AUDIO_SINK "dsppcmsink" -#endif - +#include "audio.h" #include "speak.h" typedef struct _gst_espeak gst_espeak;