summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2016-05-06 19:18:30 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2016-05-07 06:48:37 +0200
commit9746106c48bf8e2bc4601f38e7f7b40cec938ff2 (patch)
treeef3773b2df3cdcc7ba330948130a8ca80c183dab /src
parent6615521060870a64f144343ec05956b3b73b5bd5 (diff)
downloadcmumble-9746106c48bf8e2bc4601f38e7f7b40cec938ff2.tar.gz
cmumble-9746106c48bf8e2bc4601f38e7f7b40cec938ff2.tar.bz2
cmumble-9746106c48bf8e2bc4601f38e7f7b40cec938ff2.zip
Try to be compatible with celt 0.7.1 and 0.11HEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/audio.c5
-rw-r--r--src/audio.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/audio.c b/src/audio.c
index 65af769..cf18c78 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -211,7 +211,12 @@ setup_playback_gst_pipeline(struct cmumble *cm)
{
cm->audio.celt_mode = celt_mode_create(SAMPLERATE,
SAMPLERATE / 100, NULL);
+
+#ifdef HAVE_CELT_071
celt_header_init(&cm->audio.celt_header, cm->audio.celt_mode, CHANNELS);
+#else
+ celt_header_init(&cm->audio.celt_header, cm->audio.celt_mode, SAMPLERATE/100, CHANNELS);
+#endif
celt_header_to_packet(&cm->audio.celt_header,
cm->audio.celt_header_packet, sizeof(CELTHeader));
diff --git a/src/audio.h b/src/audio.h
index 1e1c47c..0f7aaa2 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -8,8 +8,13 @@
#include <gst/app/gstappsink.h>
#include <gst/app/gstappbuffer.h>
+#ifdef HAVE_CELT071
+#include <celt071/celt.h>
+#include <celt071/celt_header.h>
+#else
#include <celt/celt.h>
#include <celt/celt_header.h>
+#endif
struct cmumble_audio {
GstElement *record_pipeline;