aboutsummaryrefslogtreecommitdiff
path: root/mp3write~.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2013-01-17 23:20:11 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:23:30 +0200
commitc0246423b5d340a263cf666d1cdc5972362cb7e3 (patch)
tree8f1440ced462bdada4a6f945082a9df814930e8f /mp3write~.c
parent6bf58497fe25026cb7adcdf1a408f24c8ba955e5 (diff)
support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close()
svn path=/trunk/externals/unauthorized/; revision=16903
Diffstat (limited to 'mp3write~.c')
-rw-r--r--mp3write~.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mp3write~.c b/mp3write~.c
index 0ed6845..7012ba1 100644
--- a/mp3write~.c
+++ b/mp3write~.c
@@ -57,6 +57,13 @@
#include <lame/lame.h> /* lame encoder stuff */
#include "m_pd.h" /* standard pd stuff */
+/* support older Pd versions without sys_fopen(), sys_fclose(), and, sys_close() */
+#if PD_MAJOR_VERSION == 0 && PD_MINOR_VERSION < 44
+#define sys_fopen fopen
+#define sys_fclose fclose
+#define sys_close close
+#endif
+
#define MY_MP3_MALLOC_IN_SIZE 65536
/* max size taken from lame readme */
#define MY_MP3_MALLOC_OUT_SIZE 1.25*MY_MP3_MALLOC_IN_SIZE+7200