shithub: sox

Download patch

ref: e8f0f3cb3908916824aa7125393ddd27597ae840
parent: 974c94f47c246f89c221acda84909c66b2af3894
author: idigdoug <idigdoug>
date: Sat Feb 12 03:54:15 EST 2011

MP3 - allow compiling with dynamically-loaded lame even if lame.h not present.

--- a/msvc10/SoX/soxconfig.h
+++ b/msvc10/SoX/soxconfig.h
@@ -46,7 +46,6 @@
 
 #define HAVE_ID3TAG 1
 
-#define HAVE_LAME_H 1
 #define DL_LAME 1
 
 #define HAVE_LPC10 1
--- a/msvc9/Sox/soxconfig.h
+++ b/msvc9/Sox/soxconfig.h
@@ -46,7 +46,6 @@
 
 #define HAVE_ID3TAG 1
 
-#define HAVE_LAME_H 1
 #define DL_LAME 1
 
 #define HAVE_LPC10 1
--- a/src/mp3.c
+++ b/src/mp3.c
@@ -12,10 +12,8 @@
 #include "sox_i.h"
 #include <string.h>
 
-#if defined(HAVE_LAME_LAME_H) || defined(HAVE_LAME_H)
+#if defined(HAVE_LAME_LAME_H) || defined(HAVE_LAME_H) || defined(DL_LAME)
 #define HAVE_LAME 1
-#else
-#undef HAVE_LAME
 #endif
 
 #if defined(HAVE_MAD_H) || defined(HAVE_LAME)
@@ -28,6 +26,12 @@
 #include <lame/lame.h>
 #elif defined(HAVE_LAME_H)
 #include <lame.h>
+#elif defined(DL_LAME)
+typedef struct lame_global_struct lame_global_flags;
+typedef enum {
+  vbr_off=0,
+  vbr_default=4
+} vbr_mode;
 #endif
 
 #if defined(HAVE_ID3TAG) && (defined(HAVE_IO_H) || defined(HAVE_UNISTD_H))