mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 13:21:13 +00:00
Fixed OSX compile.
This commit is contained in:
parent
5bae38bf65
commit
4f0d98b850
@ -80,7 +80,7 @@ add_subdirectory(src/musikbox)
|
||||
add_subdirectory(src/contrib/taglib_plugin)
|
||||
add_subdirectory(src/contrib/m4adecoder)
|
||||
add_subdirectory(src/contrib/oggdecoder)
|
||||
add_subdirectory(src/contrib/mpg123decoder)
|
||||
add_subdirectory(src/contrib/nomaddecoder)
|
||||
add_subdirectory(src/contrib/flacdecoder)
|
||||
|
||||
add_dependencies(taglibreader taglib)
|
||||
|
@ -20,10 +20,14 @@ set (nomaddecoder_SOURCES
|
||||
)
|
||||
|
||||
include_directories (
|
||||
"${nomaddecoder_SOURCE_DIR}/mad"
|
||||
"${nomaddecoder_SOURCE_DIR}/nomad"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/mad"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/nomad"
|
||||
)
|
||||
|
||||
add_definitions(-DFPM_DEFAULT)
|
||||
add_definitions(-DASO_ZEROCHECK)
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
add_library(nomaddecoder SHARED ${nomaddecoder_SOURCES})
|
||||
|
||||
target_link_libraries(nomaddecoder ${musikbox_LINK_LIBS})
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#define INPUT_BUFFER_SIZE (5 * 8192)
|
||||
@ -730,7 +731,7 @@ next_frame:
|
||||
buffer[j++] = (sample >> 8) & 0xff;
|
||||
}
|
||||
else { /* SAMPLE_FORMAT_32_BIT_FLOAT */
|
||||
((float*)buffer)[j++] = ((float) sample / (float) SHRT_MIN) + 0.5f;
|
||||
((float*) buffer)[j++] = ((float) sample / (float) SHRT_MIN) + 0.5f;
|
||||
}
|
||||
|
||||
if (nomad->info.channels == 2) {
|
||||
@ -741,7 +742,7 @@ next_frame:
|
||||
buffer[j++] = (sample >> 8) & 0xff;
|
||||
}
|
||||
else { /* SAMPLE_FORMAT_32_BIT_FLOAT */
|
||||
((float*)buffer)[j++] = ((float)sample / (float)SHRT_MIN) + 0.5f;
|
||||
((float*) buffer)[j++] = ((float) sample / (float) SHRT_MIN) + 0.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user