From 34829e2ccfbf72f428f383e2a533aacb3724fd25 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Mon, 25 Feb 2008 13:39:34 +0200 Subject: [PATCH] Move audio sink and src to audio.h --- src/audio-note.c | 9 +-------- src/audio.h | 12 ++++++++++++ src/speak.c | 7 +------ 3 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 src/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; -- 2.39.5