Merge branch 'stable-1.0'

This commit is contained in:
Tobias Doerffel
2014-03-26 11:06:57 +01:00
4 changed files with 7 additions and 17884 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,9 @@ INSTALL(TARGETS calf LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
SET_TARGET_PROPERTIES(calf PROPERTIES PREFIX "")
SET(INLINE_FLAGS "")
IF(NOT LMMS_BUILD_APPLE)
SET(INLINE_FLAGS "-finline-functions-called-once")
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
ENDIF(NOT LMMS_BUILD_APPLE)
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-limit=80 -finline-functions ${INLINE_FLAGS}")
SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-functions ${INLINE_FLAGS}")
IF(LMMS_BUILD_WIN32)
ADD_CUSTOM_COMMAND(TARGET calf POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/calf.dll\"")

View File

@@ -153,7 +153,7 @@ void copy_buf(T &dest_buf, const U &src_buf, T scale = 1, T add = 0) {
typedef typename T::data_type data_type;
data_type *dest = dest_buf.data();
const data_type *src = src_buf.data();
int size = src.size();
int size = src_buf.size();
for (int i=0; i<size; i++)
*dest++ = (*src++) * scale + add;
}

View File

@@ -216,7 +216,7 @@ public:
}
template<class U, int UseBits>
inline U lerp_table_lookup_int(U data[(1<<IntBits)+1]) const {
inline U lerp_table_lookup_int(U data[(unsigned int)(1<<IntBits)+1]) const {
unsigned int pos = uipart();
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
}
@@ -224,19 +224,19 @@ public:
/// Untested... I've started it to get a sin/cos readout for rotaryorgan, but decided to use table-less solution instead
/// Do not assume it works, because it most probably doesn't
template<class U, int UseBits>
inline U lerp_table_lookup_int_shift(U data[(1<<IntBits)+1], unsigned int shift) {
inline U lerp_table_lookup_int_shift(U data[(unsigned int)(1<<IntBits)+1], unsigned int shift) {
unsigned int pos = (uipart() + shift) & ((1 << IntBits) - 1);
return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]);
}
template<class U>
inline U lerp_table_lookup_float(U data[(1<<IntBits)+1]) const {
inline U lerp_table_lookup_float(U data[(unsigned int)(1<<IntBits)+1]) const {
unsigned int pos = uipart();
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();
}
template<class U>
inline U lerp_table_lookup_float_mask(U data[(1<<IntBits)+1], unsigned int mask) const {
inline U lerp_table_lookup_float_mask(U data[(unsigned int)(1<<IntBits)+1], unsigned int mask) const {
unsigned int pos = ui64part() & mask;
// printf("full = %lld pos = %d + %f\n", value, pos, fpart_as_double());
return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double();