码迷,mamicode.com
首页 > 其他好文 > 详细

openal-1.13 静态编译(mingw32)

时间:2016-03-23 20:06:09      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:


1.CMakeLists.txt           SET(LIBTYPE SHARED) 改成 SET(LIBTYPE STATIC)
2.include/al/al.h          删除 dllexport 
3.include/al/alc.h         删除 dllexport 
4.alc/bs2b.c               bs2b_set_level 改成 bs2b_set_level2 ...
5.OpenAL32/Include/bs2b.h  bs2b_set_level 改成 bs2b_set_level2 ...

修改 openal/bs2b 是为了避免静态编译时与原来的 bs2b 发生冲突

--- CMakeLists.txt.orig	2011-02-16 04:05:40 +0800
+++ CMakeLists.txt	2016-03-23 08:23:05 +0800
@@ -51,7 +51,7 @@
 ENDIF()
 
 IF(NOT LIBTYPE)
-    SET(LIBTYPE SHARED)
+    SET(LIBTYPE STATIC)
 ENDIF()
 
 SET(LIB_MAJOR_VERSION "1")
 
--- include/al/al.h.orig	2010-11-29 07:09:04 +0800
+++ include/al/al.h	2016-03-23 10:09:22 +0800
@@ -5,20 +5,12 @@
 extern "C" {
 #endif
 
-#if defined(AL_LIBTYPE_STATIC)
- #define AL_API
-#elif defined(_WIN32) && !defined(_XBOX)
- #if defined(AL_BUILD_LIBRARY)
-  #define AL_API __declspec(dllexport)
- #else
-  #define AL_API __declspec(dllimport)
- #endif
-#else
- #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
-  #define AL_API __attribute__((visibility("protected")))
- #else
-  #define AL_API extern
- #endif
+#ifndef AL_API
+    #if defined (AL_BUILD_LIBRARY)
+        #define AL_API __attribute__((visibility ("default")))
+    #else
+        #define AL_API
+    #endif
 #endif
 
 #if defined(_WIN32)

--- include/al/alc.h.orig	2010-11-29 06:51:15 +0800
+++ include/al/alc.h	2016-03-23 10:09:51 +0800
@@ -5,20 +5,12 @@
 extern "C" {
 #endif
 
-#if defined(AL_LIBTYPE_STATIC)
- #define ALC_API
-#elif defined(_WIN32) && !defined(_XBOX)
- #if defined(AL_BUILD_LIBRARY)
-  #define ALC_API __declspec(dllexport)
- #else
-  #define ALC_API __declspec(dllimport)
- #endif
-#else
- #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY)
-  #define ALC_API __attribute__((visibility("protected")))
- #else
-  #define ALC_API extern
- #endif
+#ifndef ALC_API
+    #if defined (AL_BUILD_LIBRARY)
+        #define ALC_API __attribute__((visibility ("default")))
+    #else
+        #define ALC_API
+    #endif
 #endif
 
 #if defined(_WIN32)

 
--- alc/bs2b.c.orig	2010-03-19 05:22:27 +0800
+++ alc/bs2b.c	2016-03-23 10:04:14 +0800
@@ -122 +122 @@
-void bs2b_set_level(struct bs2b *bs2b, int level)
+void bs2b_set_level2(struct bs2b *bs2b, int level)
@@ -130 +130 @@
-int bs2b_get_level(struct bs2b *bs2b)
+int bs2b_get_level2(struct bs2b *bs2b)
@@ -135 +135 @@
-void bs2b_set_srate(struct bs2b *bs2b, int srate)
+void bs2b_set_srate2(struct bs2b *bs2b, int srate)
@@ -143 +143 @@
-int bs2b_get_srate(struct bs2b *bs2b)
+int bs2b_get_srate2(struct bs2b *bs2b)
@@ -148 +148 @@
-void bs2b_clear(struct bs2b *bs2b)
+void bs2b_clear2(struct bs2b *bs2b)
@@ -158 +158 @@
-int bs2b_is_clear(struct bs2b *bs2b)
+int bs2b_is_clear2(struct bs2b *bs2b)
@@ -170 +170 @@
-void bs2b_cross_feed(struct bs2b *bs2b, float *sample)
+void bs2b_cross_feed2(struct bs2b *bs2b, float *sample)

--- OpenAL32/Include/bs2b.h.orig	2010-03-19 05:22:40 +0800
+++ OpenAL32/Include/bs2b.h	2016-03-23 07:21:38 +0800
@@ -78 +78 @@
-void bs2b_set_level(struct bs2b *bs2b, int level);
+void bs2b_set_level2(struct bs2b *bs2b, int level);
@@ -81 +81 @@
-int bs2b_get_level(struct bs2b *bs2b);
+int bs2b_get_level2(struct bs2b *bs2b);
@@ -86 +86 @@
-void bs2b_set_srate(struct bs2b *bs2b, int srate);
+void bs2b_set_srate2(struct bs2b *bs2b, int srate);
@@ -89 +89 @@
-int bs2b_get_srate(struct bs2b *bs2b);
+int bs2b_get_srate2(struct bs2b *bs2b);
@@ -92 +92 @@
-void bs2b_clear(struct bs2b *bs2b);
+void bs2b_clear2(struct bs2b *bs2b);
@@ -95 +95 @@
-int bs2b_is_clear(struct bs2b *bs2b);
+int bs2b_is_clear2(struct bs2b *bs2b);
@@ -103 +103 @@
-void bs2b_cross_feed(struct bs2b *bs2b, float *sample);
+void bs2b_cross_feed2(struct bs2b *bs2b, float *sample);

openal-1.13 静态编译(mingw32)

标签:

原文地址:http://www.cnblogs.com/nlsoft/p/5312502.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!