Skip to content

Commit 8d48238

Browse files
committed
Make it build on OSX, even seems to work with SeSam TFE
1 parent 2ca56d4 commit 8d48238

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*build*/

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 2.8)
22
project(amp11lib)
33

4-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ffast-math -Wall")
4+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -Wall")
55

66
add_definitions(-DFASTBITS)
77
add_definitions(-DTIME)
@@ -20,7 +20,7 @@ set(SOURCE_FILES
2020
binfile/binfile.cpp
2121
binfile/binfile.h
2222
binfile/binfilef.cpp
23-
binfile/binfpllx.cpp
23+
#binfile/binfpllx.cpp
2424
binfile/binfpllx.h
2525
binfile/binfplwv.cpp
2626
binfile/binfplwv.h

amp11lib.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class CriticalSection {
133133
}
134134
};
135135

136+
136137
//------------------------------------
137138

138139
// check if a stream handle is valid
@@ -657,7 +658,7 @@ ALbool DoRedirection(void)
657658
// if end of stream
658659
if (sRead<REDIR_BUFFERSIZE*sizeof(ALsint16)) {
659660
// end redirection
660-
alSetRedirection(is, 0);
661+
//alSetRedirection(is, 0); // FIXME DG: I had to compile this out, is it useful?
661662
}
662663
}}
663664

@@ -956,7 +957,7 @@ AMP11LIB_API void WINAPI alEndLibrary(void)
956957
}
957958

958959
// disable possible redirection if on
959-
alDisableRedirection();
960+
//alDisableRedirection(); // FIXME DG: I had to compile this out, is it useful?
960961

961962
// free all streams that are not freed
962963
for(int ist=0; ist<MAX_STREAMS; ist++) {

amp11lib.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define WINAPI __stdcall
1212
#endif
1313
#else // not windows - don't need additional stuff in function sigs
14-
#define AMP11LIB_API
14+
#define AMP11LIB_API __attribute__((visibility("default"))) extern "C"
1515
#define WINAPI
1616
#endif // _WIN32
1717

@@ -34,7 +34,7 @@ typedef float ALfloat;
3434
typedef ALsint32 ALhandle;
3535

3636
#ifdef __cplusplus
37-
extern "C" {
37+
//extern "C" {
3838
#endif
3939

4040
////
@@ -107,5 +107,5 @@ AMP11LIB_API ALbool WINAPI alSetRedirection(ALhandle hSource, ALhandle hTarget);
107107
AMP11LIB_API ALhandle WINAPI alGetRedirection(ALhandle hSource);
108108

109109
#ifdef __cplusplus
110-
} // extern "C"
110+
//} // extern "C"
111111
#endif

0 commit comments

Comments
 (0)