Browse Source

Update to woollybah/soloud.571fde0

Brucey 3 years ago
parent
commit
ee74ffcf13

+ 5 - 6
soloud.mod/soloud.bmx

@@ -26,11 +26,13 @@ bbdoc: SoLoud audio.
 End Rem
 End Rem
 Module Audio.SoLoud
 Module Audio.SoLoud
 
 
-ModuleInfo "Version: 1.03"
+ModuleInfo "Version: 1.04"
 ModuleInfo "License: zlib/libpng"
 ModuleInfo "License: zlib/libpng"
-ModuleInfo "Copyright: SoLoud - 2013-2021 Jari Komppa"
+ModuleInfo "Copyright: SoLoud - 2013-2022 Jari Komppa"
 ModuleInfo "Copyright: Wrapper - 2016-2022 Bruce A Henderson"
 ModuleInfo "Copyright: Wrapper - 2016-2022 Bruce A Henderson"
 
 
+ModuleInfo "History: 1.04"
+ModuleInfo "History: Update to woollybah/soloud.571fde0"
 ModuleInfo "History: 1.03"
 ModuleInfo "History: 1.03"
 ModuleInfo "History: Update to latest SoLoud.1157475"
 ModuleInfo "History: Update to latest SoLoud.1157475"
 ModuleInfo "History: 1.02"
 ModuleInfo "History: 1.02"
@@ -59,10 +61,7 @@ Import "common.bmx"
 
 
 '
 '
 ' Implementation notes :
 ' Implementation notes :
-'     Ay*() functions added to sound_c.cpp
-'     Openmpt*() functions moved to openmptloader.cpp in modloader.mod allowing us to optionally use openmpt.
-'
-'     soloud_miniaudio.cpp : Added use of our own ma_context instance, instead of NULL
+'     Now using the woollybah fork of soloud : https://github.com/woollybah/soloud
 '
 '
 
 
 Rem
 Rem

+ 2 - 0
soloud.mod/soloud/include/soloud_openmpt.h

@@ -50,12 +50,14 @@ namespace SoLoud
 	public:
 	public:
 		char *mData;
 		char *mData;
 		unsigned int mDataLen;
 		unsigned int mDataLen;
+		time mLength;
 		Openmpt();
 		Openmpt();
 		virtual ~Openmpt();
 		virtual ~Openmpt();
 		result load(const char* aFilename);
 		result load(const char* aFilename);
 		result loadMem(const unsigned char *aMem, unsigned int aLength, bool aCopy = false, bool aTakeOwnership = true);
 		result loadMem(const unsigned char *aMem, unsigned int aLength, bool aCopy = false, bool aTakeOwnership = true);
 		result loadFile(File *aFile);
 		result loadFile(File *aFile);
 		virtual AudioSourceInstance *createInstance();
 		virtual AudioSourceInstance *createInstance();
+		time getLength();
 	};
 	};
 };
 };
 
 

+ 8 - 0
soloud.mod/soloud/src/audiosource/openmpt/soloud_openmpt.cpp

@@ -33,6 +33,7 @@ extern "C"
 	void openmpt_module_destroy(void * mod);
 	void openmpt_module_destroy(void * mod);
 	int openmpt_module_read_float_stereo(void * mod, int samplerate, size_t count, float * left, float * right);
 	int openmpt_module_read_float_stereo(void * mod, int samplerate, size_t count, float * left, float * right);
 	void openmpt_module_set_repeat_count(void* mod, int repeat_count);
 	void openmpt_module_set_repeat_count(void* mod, int repeat_count);
+	double openmpt_module_get_duration_seconds(void* mod);
 }
 }
 
 
 namespace SoLoud
 namespace SoLoud
@@ -123,6 +124,7 @@ namespace SoLoud
 			mDataLen = 0;
 			mDataLen = 0;
 			return FILE_LOAD_FAILED;
 			return FILE_LOAD_FAILED;
 		}
 		}
+		mLength = openmpt_module_get_duration_seconds(mpf);
 		openmpt_module_destroy(mpf);
 		openmpt_module_destroy(mpf);
 		return 0;
 		return 0;
 	}
 	}
@@ -133,6 +135,7 @@ namespace SoLoud
 		mChannels = 2;
 		mChannels = 2;
 		mData = 0;
 		mData = 0;
 		mDataLen = 0;
 		mDataLen = 0;
+		mLength = 0;
 	}
 	}
 
 
 	Openmpt::~Openmpt()
 	Openmpt::~Openmpt()
@@ -151,4 +154,9 @@ namespace SoLoud
 		return new OpenmptInstance(this);
 		return new OpenmptInstance(this);
 	}
 	}
 
 
+	double Openmpt::getLength()
+	{
+		return mLength;
+	}
+
 };
 };

+ 184 - 79
soloud.mod/soloud/src/audiosource/wav/dr_flac.h

@@ -1,6 +1,6 @@
 /*
 /*
 FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
 FLAC audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
-dr_flac - v0.12.31 - 2021-08-16
+dr_flac - v0.12.38 - 2022-04-10
 
 
 David Reid - [email protected]
 David Reid - [email protected]
 
 
@@ -232,7 +232,7 @@ extern "C" {
 
 
 #define DRFLAC_VERSION_MAJOR     0
 #define DRFLAC_VERSION_MAJOR     0
 #define DRFLAC_VERSION_MINOR     12
 #define DRFLAC_VERSION_MINOR     12
-#define DRFLAC_VERSION_REVISION  31
+#define DRFLAC_VERSION_REVISION  38
 #define DRFLAC_VERSION_STRING    DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION)
 #define DRFLAC_VERSION_STRING    DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MAJOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_MINOR) "." DRFLAC_XSTRINGIFY(DRFLAC_VERSION_REVISION)
 
 
 #include <stddef.h> /* For size_t. */
 #include <stddef.h> /* For size_t. */
@@ -244,7 +244,7 @@ typedef   signed short          drflac_int16;
 typedef unsigned short          drflac_uint16;
 typedef unsigned short          drflac_uint16;
 typedef   signed int            drflac_int32;
 typedef   signed int            drflac_int32;
 typedef unsigned int            drflac_uint32;
 typedef unsigned int            drflac_uint32;
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && !defined(__clang__)
     typedef   signed __int64    drflac_int64;
     typedef   signed __int64    drflac_int64;
     typedef unsigned __int64    drflac_uint64;
     typedef unsigned __int64    drflac_uint64;
 #else
 #else
@@ -261,7 +261,7 @@ typedef unsigned int            drflac_uint32;
         #pragma GCC diagnostic pop
         #pragma GCC diagnostic pop
     #endif
     #endif
 #endif
 #endif
-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__)
+#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) || defined(_M_ARM64) || defined(__powerpc64__)
     typedef drflac_uint64       drflac_uintptr;
     typedef drflac_uint64       drflac_uintptr;
 #else
 #else
     typedef drflac_uint32       drflac_uintptr;
     typedef drflac_uint32       drflac_uintptr;
@@ -1363,9 +1363,15 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
     I am using "__inline__" only when we're compiling in strict ANSI mode.
     I am using "__inline__" only when we're compiling in strict ANSI mode.
     */
     */
     #if defined(__STRICT_ANSI__)
     #if defined(__STRICT_ANSI__)
-        #define DRFLAC_INLINE __inline__ __attribute__((always_inline))
+        #define DRFLAC_GNUC_INLINE_HINT __inline__
     #else
     #else
-        #define DRFLAC_INLINE inline __attribute__((always_inline))
+        #define DRFLAC_GNUC_INLINE_HINT inline
+    #endif
+
+    #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__)
+        #define DRFLAC_INLINE DRFLAC_GNUC_INLINE_HINT __attribute__((always_inline))
+    #else
+        #define DRFLAC_INLINE DRFLAC_GNUC_INLINE_HINT
     #endif
     #endif
 #elif defined(__WATCOMC__)
 #elif defined(__WATCOMC__)
     #define DRFLAC_INLINE __inline
     #define DRFLAC_INLINE __inline
@@ -1378,7 +1384,7 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
     #define DRFLAC_X64
     #define DRFLAC_X64
 #elif defined(__i386) || defined(_M_IX86)
 #elif defined(__i386) || defined(_M_IX86)
     #define DRFLAC_X86
     #define DRFLAC_X86
-#elif defined(__arm__) || defined(_M_ARM) || defined(_M_ARM64)
+#elif defined(__arm__) || defined(_M_ARM) || defined(__arm64) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64)
     #define DRFLAC_ARM
     #define DRFLAC_ARM
 #endif
 #endif
 
 
@@ -1431,16 +1437,6 @@ Unfortuantely dr_flac depends on this for a few things so we're just going to di
     #if defined(DRFLAC_ARM)
     #if defined(DRFLAC_ARM)
         #if !defined(DRFLAC_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64))
         #if !defined(DRFLAC_NO_NEON) && (defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64))
             #define DRFLAC_SUPPORT_NEON
             #define DRFLAC_SUPPORT_NEON
-        #endif
-
-        /* Fall back to looking for the #include file. */
-        #if !defined(__GNUC__) && !defined(__clang__) && defined(__has_include)
-            #if !defined(DRFLAC_SUPPORT_NEON) && !defined(DRFLAC_NO_NEON) && __has_include(<arm_neon.h>)
-                #define DRFLAC_SUPPORT_NEON
-            #endif
-        #endif
-
-        #if defined(DRFLAC_SUPPORT_NEON)
             #include <arm_neon.h>
             #include <arm_neon.h>
         #endif
         #endif
     #endif
     #endif
@@ -1909,6 +1905,12 @@ static DRFLAC_INLINE drflac_uint32 drflac__be2host_32(drflac_uint32 n)
     return n;
     return n;
 }
 }
 
 
+static DRFLAC_INLINE drflac_uint32 drflac__be2host_32_ptr_unaligned(const void* pData)
+{
+    const drflac_uint8* pNum = (drflac_uint8*)pData;
+    return *(pNum) << 24 | *(pNum+1) << 16 | *(pNum+2) << 8 | *(pNum+3);
+}
+
 static DRFLAC_INLINE drflac_uint64 drflac__be2host_64(drflac_uint64 n)
 static DRFLAC_INLINE drflac_uint64 drflac__be2host_64(drflac_uint64 n)
 {
 {
     if (drflac__is_little_endian()) {
     if (drflac__is_little_endian()) {
@@ -1928,6 +1930,12 @@ static DRFLAC_INLINE drflac_uint32 drflac__le2host_32(drflac_uint32 n)
     return n;
     return n;
 }
 }
 
 
+static DRFLAC_INLINE drflac_uint32 drflac__le2host_32_ptr_unaligned(const void* pData)
+{
+    const drflac_uint8* pNum = (drflac_uint8*)pData;
+    return *pNum | *(pNum+1) << 8 |  *(pNum+2) << 16 | *(pNum+3) << 24;
+}
+
 
 
 static DRFLAC_INLINE drflac_uint32 drflac__unsynchsafe_32(drflac_uint32 n)
 static DRFLAC_INLINE drflac_uint32 drflac__unsynchsafe_32(drflac_uint32 n)
 {
 {
@@ -2429,6 +2437,10 @@ static DRFLAC_INLINE drflac_bool32 drflac__read_uint32(drflac_bs* bs, unsigned i
         if (!drflac__reload_cache(bs)) {
         if (!drflac__reload_cache(bs)) {
             return DRFLAC_FALSE;
             return DRFLAC_FALSE;
         }
         }
+        if (bitCountLo > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {
+            /* This happens when we get to end of stream */
+            return DRFLAC_FALSE;
+        }
 
 
         *pResultOut = (resultHi << bitCountLo) | (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo);
         *pResultOut = (resultHi << bitCountLo) | (drflac_uint32)DRFLAC_CACHE_L1_SELECT_AND_SHIFT(bs, bitCountLo);
         bs->consumedBits += bitCountLo;
         bs->consumedBits += bitCountLo;
@@ -2872,9 +2884,24 @@ static DRFLAC_INLINE drflac_bool32 drflac__seek_past_next_set_bit(drflac_bs* bs,
         }
         }
     }
     }
 
 
+    if (bs->cache == 1) {
+        /* Not catching this would lead to undefined behaviour: a shift of a 32-bit number by 32 or more is undefined */
+        *pOffsetOut = zeroCounter + (drflac_uint32)DRFLAC_CACHE_L1_BITS_REMAINING(bs) - 1;
+        if (!drflac__reload_cache(bs)) {
+            return DRFLAC_FALSE;
+        }
+
+        return DRFLAC_TRUE;
+    }
+
     setBitOffsetPlus1 = drflac__clz(bs->cache);
     setBitOffsetPlus1 = drflac__clz(bs->cache);
     setBitOffsetPlus1 += 1;
     setBitOffsetPlus1 += 1;
 
 
+    if (setBitOffsetPlus1 > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {
+        /* This happens when we get to end of stream */
+        return DRFLAC_FALSE;
+    }
+
     bs->consumedBits += setBitOffsetPlus1;
     bs->consumedBits += setBitOffsetPlus1;
     bs->cache <<= setBitOffsetPlus1;
     bs->cache <<= setBitOffsetPlus1;
 
 
@@ -2989,6 +3016,25 @@ static drflac_result drflac__read_utf8_coded_number(drflac_bs* bs, drflac_uint64
 }
 }
 
 
 
 
+static DRFLAC_INLINE drflac_uint32 drflac__ilog2_u32(drflac_uint32 x)
+{
+#if 1   /* Needs optimizing. */
+    drflac_uint32 result = 0;
+    while (x > 0) {
+        result += 1;
+        x >>= 1;
+    }
+
+    return result;
+#endif
+}
+
+static DRFLAC_INLINE drflac_bool32 drflac__use_64_bit_prediction(drflac_uint32 bitsPerSample, drflac_uint32 order, drflac_uint32 precision)
+{
+    /* https://web.archive.org/web/20220205005724/https://github.com/ietf-wg-cellar/flac-specification/blob/37a49aa48ba4ba12e8757badfc59c0df35435fec/rfc_backmatter.md */
+    return bitsPerSample + precision + drflac__ilog2_u32(order) > 32;
+}
+
 
 
 /*
 /*
 The next two functions are responsible for calculating the prediction.
 The next two functions are responsible for calculating the prediction.
@@ -2996,6 +3042,9 @@ The next two functions are responsible for calculating the prediction.
 When the bits per sample is >16 we need to use 64-bit integer arithmetic because otherwise we'll run out of precision. It's
 When the bits per sample is >16 we need to use 64-bit integer arithmetic because otherwise we'll run out of precision. It's
 safe to assume this will be slower on 32-bit platforms so we use a more optimal solution when the bits per sample is <=16.
 safe to assume this will be slower on 32-bit platforms so we use a more optimal solution when the bits per sample is <=16.
 */
 */
+#if defined(__clang__)
+__attribute__((no_sanitize("signed-integer-overflow")))
+#endif
 static DRFLAC_INLINE drflac_int32 drflac__calculate_prediction_32(drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pDecodedSamples)
 static DRFLAC_INLINE drflac_int32 drflac__calculate_prediction_32(drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pDecodedSamples)
 {
 {
     drflac_int32 prediction = 0;
     drflac_int32 prediction = 0;
@@ -3231,7 +3280,7 @@ static DRFLAC_INLINE drflac_int32 drflac__calculate_prediction_64(drflac_uint32
 Reference implementation for reading and decoding samples with residual. This is intentionally left unoptimized for the
 Reference implementation for reading and decoding samples with residual. This is intentionally left unoptimized for the
 sake of readability and should only be used as a reference.
 sake of readability and should only be used as a reference.
 */
 */
-static drflac_bool32 drflac__decode_samples_with_residual__rice__reference(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
+static drflac_bool32 drflac__decode_samples_with_residual__rice__reference(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
 {
 {
     drflac_uint32 i;
     drflac_uint32 i;
 
 
@@ -3270,10 +3319,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__reference(drfla
         }
         }
 
 
 
 
-        if (bitsPerSample+shift >= 32) {
-            pSamplesOut[i] = decodedRice + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + i);
+        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {
+            pSamplesOut[i] = decodedRice + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i);
         } else {
         } else {
-            pSamplesOut[i] = decodedRice + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + i);
+            pSamplesOut[i] = decodedRice + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i);
         }
         }
     }
     }
 
 
@@ -3370,6 +3419,10 @@ static DRFLAC_INLINE drflac_bool32 drflac__read_rice_parts(drflac_bs* bs, drflac
             if (!drflac__reload_cache(bs)) {
             if (!drflac__reload_cache(bs)) {
                 return DRFLAC_FALSE;
                 return DRFLAC_FALSE;
             }
             }
+            if (bitCountLo > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {
+                /* This happens when we get to end of stream */
+                return DRFLAC_FALSE;
+            }
         }
         }
 
 
         riceParamPart = (drflac_uint32)(resultHi | DRFLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, bitCountLo));
         riceParamPart = (drflac_uint32)(resultHi | DRFLAC_CACHE_L1_SELECT_AND_SHIFT_SAFE(bs, bitCountLo));
@@ -3450,6 +3503,10 @@ static DRFLAC_INLINE drflac_bool32 drflac__read_rice_parts_x1(drflac_bs* bs, drf
                 if (!drflac__reload_cache(bs)) {
                 if (!drflac__reload_cache(bs)) {
                     return DRFLAC_FALSE;
                     return DRFLAC_FALSE;
                 }
                 }
+                if (riceParamPartLoBitCount > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {
+                    /* This happens when we get to end of stream */
+                    return DRFLAC_FALSE;
+                }
 
 
                 bs_cache = bs->cache;
                 bs_cache = bs->cache;
                 bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;
                 bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;
@@ -3560,6 +3617,11 @@ static DRFLAC_INLINE drflac_bool32 drflac__seek_rice_parts(drflac_bs* bs, drflac
                     return DRFLAC_FALSE;
                     return DRFLAC_FALSE;
                 }
                 }
 
 
+                if (riceParamPartLoBitCount > DRFLAC_CACHE_L1_BITS_REMAINING(bs)) {
+                    /* This happens when we get to end of stream */
+                    return DRFLAC_FALSE;
+                }
+
                 bs_cache = bs->cache;
                 bs_cache = bs->cache;
                 bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;
                 bs_consumedBits = bs->consumedBits + riceParamPartLoBitCount;
             }
             }
@@ -3646,7 +3708,7 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar_zeroorde
     return DRFLAC_TRUE;
     return DRFLAC_TRUE;
 }
 }
 
 
-static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
+static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
 {
 {
     drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF};
     drflac_uint32 t[2] = {0x00000000, 0xFFFFFFFF};
     drflac_uint32 zeroCountPart0 = 0;
     drflac_uint32 zeroCountPart0 = 0;
@@ -3664,14 +3726,14 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b
     DRFLAC_ASSERT(bs != NULL);
     DRFLAC_ASSERT(bs != NULL);
     DRFLAC_ASSERT(pSamplesOut != NULL);
     DRFLAC_ASSERT(pSamplesOut != NULL);
 
 
-    if (order == 0) {
-        return drflac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);
+    if (lpcOrder == 0) {
+        return drflac__decode_samples_with_residual__rice__scalar_zeroorder(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);
     }
     }
 
 
     riceParamMask  = (drflac_uint32)~((~0UL) << riceParam);
     riceParamMask  = (drflac_uint32)~((~0UL) << riceParam);
     pSamplesOutEnd = pSamplesOut + (count & ~3);
     pSamplesOutEnd = pSamplesOut + (count & ~3);
 
 
-    if (bitsPerSample+shift > 32) {
+    if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {
         while (pSamplesOut < pSamplesOutEnd) {
         while (pSamplesOut < pSamplesOutEnd) {
             /*
             /*
             Rice extraction. It's faster to do this one at a time against local variables than it is to use the x4 version
             Rice extraction. It's faster to do this one at a time against local variables than it is to use the x4 version
@@ -3699,10 +3761,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b
             riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];
             riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];
             riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];
             riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];
 
 
-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 0);
-            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 1);
-            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 2);
-            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 3);
+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);
+            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 1);
+            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 2);
+            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 3);
 
 
             pSamplesOut += 4;
             pSamplesOut += 4;
         }
         }
@@ -3730,10 +3792,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b
             riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];
             riceParamPart2  = (riceParamPart2 >> 1) ^ t[riceParamPart2 & 0x01];
             riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];
             riceParamPart3  = (riceParamPart3 >> 1) ^ t[riceParamPart3 & 0x01];
 
 
-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 0);
-            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 1);
-            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 2);
-            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 3);
+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);
+            pSamplesOut[1] = riceParamPart1 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 1);
+            pSamplesOut[2] = riceParamPart2 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 2);
+            pSamplesOut[3] = riceParamPart3 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 3);
 
 
             pSamplesOut += 4;
             pSamplesOut += 4;
         }
         }
@@ -3753,10 +3815,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__scalar(drflac_b
         /*riceParamPart0  = (riceParamPart0 >> 1) ^ (~(riceParamPart0 & 0x01) + 1);*/
         /*riceParamPart0  = (riceParamPart0 >> 1) ^ (~(riceParamPart0 & 0x01) + 1);*/
 
 
         /* Sample reconstruction. */
         /* Sample reconstruction. */
-        if (bitsPerSample+shift > 32) {
-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + 0);
+        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {
+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);
         } else {
         } else {
-            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + 0);
+            pSamplesOut[0] = riceParamPart0 + drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + 0);
         }
         }
 
 
         i += 1;
         i += 1;
@@ -4212,20 +4274,20 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41_64(drflac
     return DRFLAC_TRUE;
     return DRFLAC_TRUE;
 }
 }
 
 
-static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
+static drflac_bool32 drflac__decode_samples_with_residual__rice__sse41(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
 {
 {
     DRFLAC_ASSERT(bs != NULL);
     DRFLAC_ASSERT(bs != NULL);
     DRFLAC_ASSERT(pSamplesOut != NULL);
     DRFLAC_ASSERT(pSamplesOut != NULL);
 
 
     /* In my testing the order is rarely > 12, so in this case I'm going to simplify the SSE implementation by only handling order <= 12. */
     /* In my testing the order is rarely > 12, so in this case I'm going to simplify the SSE implementation by only handling order <= 12. */
-    if (order > 0 && order <= 12) {
-        if (bitsPerSample+shift > 32) {
-            return drflac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, order, shift, coefficients, pSamplesOut);
+    if (lpcOrder > 0 && lpcOrder <= 12) {
+        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {
+            return drflac__decode_samples_with_residual__rice__sse41_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);
         } else {
         } else {
-            return drflac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, order, shift, coefficients, pSamplesOut);
+            return drflac__decode_samples_with_residual__rice__sse41_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);
         }
         }
     } else {
     } else {
-        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);
+        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);
     }
     }
 }
 }
 #endif
 #endif
@@ -4562,7 +4624,7 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_64(drflac_
 
 
     /*
     /*
     Pre-loading the coefficients and prior samples is annoying because we need to ensure we don't try reading more than
     Pre-loading the coefficients and prior samples is annoying because we need to ensure we don't try reading more than
-    what's available in the input buffers. It would be conenient to use a fall-through switch to do this, but this results
+    what's available in the input buffers. It would be convenient to use a fall-through switch to do this, but this results
     in strict aliasing warnings with GCC. To work around this I'm just doing something hacky. This feels a bit convoluted
     in strict aliasing warnings with GCC. To work around this I'm just doing something hacky. This feels a bit convoluted
     so I think there's opportunity for this to be simplified.
     so I think there's opportunity for this to be simplified.
     */
     */
@@ -4710,41 +4772,41 @@ static drflac_bool32 drflac__decode_samples_with_residual__rice__neon_64(drflac_
     return DRFLAC_TRUE;
     return DRFLAC_TRUE;
 }
 }
 
 
-static drflac_bool32 drflac__decode_samples_with_residual__rice__neon(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
+static drflac_bool32 drflac__decode_samples_with_residual__rice__neon(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
 {
 {
     DRFLAC_ASSERT(bs != NULL);
     DRFLAC_ASSERT(bs != NULL);
     DRFLAC_ASSERT(pSamplesOut != NULL);
     DRFLAC_ASSERT(pSamplesOut != NULL);
 
 
     /* In my testing the order is rarely > 12, so in this case I'm going to simplify the NEON implementation by only handling order <= 12. */
     /* In my testing the order is rarely > 12, so in this case I'm going to simplify the NEON implementation by only handling order <= 12. */
-    if (order > 0 && order <= 12) {
-        if (bitsPerSample+shift > 32) {
-            return drflac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, order, shift, coefficients, pSamplesOut);
+    if (lpcOrder > 0 && lpcOrder <= 12) {
+        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {
+            return drflac__decode_samples_with_residual__rice__neon_64(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);
         } else {
         } else {
-            return drflac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, order, shift, coefficients, pSamplesOut);
+            return drflac__decode_samples_with_residual__rice__neon_32(bs, count, riceParam, lpcOrder, lpcShift, coefficients, pSamplesOut);
         }
         }
     } else {
     } else {
-        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);
+        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);
     }
     }
 }
 }
 #endif
 #endif
 
 
-static drflac_bool32 drflac__decode_samples_with_residual__rice(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
+static drflac_bool32 drflac__decode_samples_with_residual__rice(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 riceParam, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
 {
 {
 #if defined(DRFLAC_SUPPORT_SSE41)
 #if defined(DRFLAC_SUPPORT_SSE41)
     if (drflac__gIsSSE41Supported) {
     if (drflac__gIsSSE41Supported) {
-        return drflac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);
+        return drflac__decode_samples_with_residual__rice__sse41(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);
     } else
     } else
 #elif defined(DRFLAC_SUPPORT_NEON)
 #elif defined(DRFLAC_SUPPORT_NEON)
     if (drflac__gIsNEONSupported) {
     if (drflac__gIsNEONSupported) {
-        return drflac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);
+        return drflac__decode_samples_with_residual__rice__neon(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);
     } else
     } else
 #endif
 #endif
     {
     {
         /* Scalar fallback. */
         /* Scalar fallback. */
     #if 0
     #if 0
-        return drflac__decode_samples_with_residual__rice__reference(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);
+        return drflac__decode_samples_with_residual__rice__reference(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);
     #else
     #else
-        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, order, shift, coefficients, pSamplesOut);
+        return drflac__decode_samples_with_residual__rice__scalar(bs, bitsPerSample, count, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pSamplesOut);
     #endif
     #endif
     }
     }
 }
 }
@@ -4765,7 +4827,10 @@ static drflac_bool32 drflac__read_and_seek_residual__rice(drflac_bs* bs, drflac_
     return DRFLAC_TRUE;
     return DRFLAC_TRUE;
 }
 }
 
 
-static drflac_bool32 drflac__decode_samples_with_residual__unencoded(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 unencodedBitsPerSample, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
+#if defined(__clang__)
+__attribute__((no_sanitize("signed-integer-overflow")))
+#endif
+static drflac_bool32 drflac__decode_samples_with_residual__unencoded(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 count, drflac_uint8 unencodedBitsPerSample, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pSamplesOut)
 {
 {
     drflac_uint32 i;
     drflac_uint32 i;
 
 
@@ -4782,10 +4847,10 @@ static drflac_bool32 drflac__decode_samples_with_residual__unencoded(drflac_bs*
             pSamplesOut[i] = 0;
             pSamplesOut[i] = 0;
         }
         }
 
 
-        if (bitsPerSample >= 24) {
-            pSamplesOut[i] += drflac__calculate_prediction_64(order, shift, coefficients, pSamplesOut + i);
+        if (drflac__use_64_bit_prediction(bitsPerSample, lpcOrder, lpcPrecision)) {
+            pSamplesOut[i] += drflac__calculate_prediction_64(lpcOrder, lpcShift, coefficients, pSamplesOut + i);
         } else {
         } else {
-            pSamplesOut[i] += drflac__calculate_prediction_32(order, shift, coefficients, pSamplesOut + i);
+            pSamplesOut[i] += drflac__calculate_prediction_32(lpcOrder, lpcShift, coefficients, pSamplesOut + i);
         }
         }
     }
     }
 
 
@@ -4798,7 +4863,7 @@ Reads and decodes the residual for the sub-frame the decoder is currently sittin
 when the decoder is sitting at the very start of the RESIDUAL block. The first <order> residuals will be ignored. The
 when the decoder is sitting at the very start of the RESIDUAL block. The first <order> residuals will be ignored. The
 <blockSize> and <order> parameters are used to determine how many residual values need to be decoded.
 <blockSize> and <order> parameters are used to determine how many residual values need to be decoded.
 */
 */
-static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 blockSize, drflac_uint32 order, drflac_int32 shift, const drflac_int32* coefficients, drflac_int32* pDecodedSamples)
+static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_uint32 bitsPerSample, drflac_uint32 blockSize, drflac_uint32 lpcOrder, drflac_int32 lpcShift, drflac_uint32 lpcPrecision, const drflac_int32* coefficients, drflac_int32* pDecodedSamples)
 {
 {
     drflac_uint8 residualMethod;
     drflac_uint8 residualMethod;
     drflac_uint8 partitionOrder;
     drflac_uint8 partitionOrder;
@@ -4818,7 +4883,7 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_
     }
     }
 
 
     /* Ignore the first <order> values. */
     /* Ignore the first <order> values. */
-    pDecodedSamples += order;
+    pDecodedSamples += lpcOrder;
 
 
     if (!drflac__read_uint8(bs, 4, &partitionOrder)) {
     if (!drflac__read_uint8(bs, 4, &partitionOrder)) {
         return DRFLAC_FALSE;
         return DRFLAC_FALSE;
@@ -4833,11 +4898,11 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_
     }
     }
 
 
     /* Validation check. */
     /* Validation check. */
-    if ((blockSize / (1 << partitionOrder)) < order) {
+    if ((blockSize / (1 << partitionOrder)) < lpcOrder) {
         return DRFLAC_FALSE;
         return DRFLAC_FALSE;
     }
     }
 
 
-    samplesInPartition = (blockSize / (1 << partitionOrder)) - order;
+    samplesInPartition = (blockSize / (1 << partitionOrder)) - lpcOrder;
     partitionsRemaining = (1 << partitionOrder);
     partitionsRemaining = (1 << partitionOrder);
     for (;;) {
     for (;;) {
         drflac_uint8 riceParam = 0;
         drflac_uint8 riceParam = 0;
@@ -4858,7 +4923,7 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_
         }
         }
 
 
         if (riceParam != 0xFF) {
         if (riceParam != 0xFF) {
-            if (!drflac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, order, shift, coefficients, pDecodedSamples)) {
+            if (!drflac__decode_samples_with_residual__rice(bs, bitsPerSample, samplesInPartition, riceParam, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {
                 return DRFLAC_FALSE;
                 return DRFLAC_FALSE;
             }
             }
         } else {
         } else {
@@ -4867,7 +4932,7 @@ static drflac_bool32 drflac__decode_samples_with_residual(drflac_bs* bs, drflac_
                 return DRFLAC_FALSE;
                 return DRFLAC_FALSE;
             }
             }
 
 
-            if (!drflac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, order, shift, coefficients, pDecodedSamples)) {
+            if (!drflac__decode_samples_with_residual__unencoded(bs, bitsPerSample, samplesInPartition, unencodedBitsPerSample, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {
                 return DRFLAC_FALSE;
                 return DRFLAC_FALSE;
             }
             }
         }
         }
@@ -5036,7 +5101,7 @@ static drflac_bool32 drflac__decode_samples__fixed(drflac_bs* bs, drflac_uint32
         pDecodedSamples[i] = sample;
         pDecodedSamples[i] = sample;
     }
     }
 
 
-    if (!drflac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) {
+    if (!drflac__decode_samples_with_residual(bs, subframeBitsPerSample, blockSize, lpcOrder, 0, 4, lpcCoefficientsTable[lpcOrder], pDecodedSamples)) {
         return DRFLAC_FALSE;
         return DRFLAC_FALSE;
     }
     }
 
 
@@ -5091,7 +5156,7 @@ static drflac_bool32 drflac__decode_samples__lpc(drflac_bs* bs, drflac_uint32 bl
         }
         }
     }
     }
 
 
-    if (!drflac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, coefficients, pDecodedSamples)) {
+    if (!drflac__decode_samples_with_residual(bs, bitsPerSample, blockSize, lpcOrder, lpcShift, lpcPrecision, coefficients, pDecodedSamples)) {
         return DRFLAC_FALSE;
         return DRFLAC_FALSE;
     }
     }
 
 
@@ -5219,6 +5284,9 @@ static drflac_bool32 drflac__read_next_flac_frame_header(drflac_bs* bs, drflac_u
                 return DRFLAC_FALSE;
                 return DRFLAC_FALSE;
             }
             }
             crc8 = drflac_crc8(crc8, header->blockSizeInPCMFrames, 16);
             crc8 = drflac_crc8(crc8, header->blockSizeInPCMFrames, 16);
+            if (header->blockSizeInPCMFrames == 0xFFFF) {
+                return DRFLAC_FALSE;    /* Frame is too big. This is the size of the frame minus 1. The STREAMINFO block defines the max block size which is 16-bits. Adding one will make it 17 bits and therefore too big. */
+            }
             header->blockSizeInPCMFrames += 1;
             header->blockSizeInPCMFrames += 1;
         } else {
         } else {
             DRFLAC_ASSERT(blockSize >= 8);
             DRFLAC_ASSERT(blockSize >= 8);
@@ -5257,6 +5325,11 @@ static drflac_bool32 drflac__read_next_flac_frame_header(drflac_bs* bs, drflac_u
             header->bitsPerSample = streaminfoBitsPerSample;
             header->bitsPerSample = streaminfoBitsPerSample;
         }
         }
 
 
+        if (header->bitsPerSample != streaminfoBitsPerSample) {
+            /* If this subframe has a different bitsPerSample then streaminfo or the first frame, reject it */
+            return DRFLAC_FALSE;
+        }
+
         if (!drflac__read_uint8(bs, 8, &header->crc8)) {
         if (!drflac__read_uint8(bs, 8, &header->crc8)) {
             return DRFLAC_FALSE;
             return DRFLAC_FALSE;
         }
         }
@@ -5343,6 +5416,11 @@ static drflac_bool32 drflac__decode_subframe(drflac_bs* bs, drflac_frame* frame,
         subframeBitsPerSample += 1;
         subframeBitsPerSample += 1;
     }
     }
 
 
+    if (subframeBitsPerSample > 32) {
+        /* libFLAC and ffmpeg reject 33-bit subframes as well */
+        return DRFLAC_FALSE;
+    }
+
     /* Need to handle wasted bits per sample. */
     /* Need to handle wasted bits per sample. */
     if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) {
     if (pSubframe->wastedBitsPerSample >= subframeBitsPerSample) {
         return DRFLAC_FALSE;
         return DRFLAC_FALSE;
@@ -6013,6 +6091,11 @@ static drflac_bool32 drflac__seek_to_pcm_frame__seek_table(drflac* pFlac, drflac
         return DRFLAC_FALSE;
         return DRFLAC_FALSE;
     }
     }
 
 
+    /* Do not use the seektable if pcmFramIndex is not coverd by it. */
+    if (pFlac->pSeekpoints[0].firstPCMFrame > pcmFrameIndex) {
+        return DRFLAC_FALSE;
+    }
+
     for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) {
     for (iSeekpoint = 0; iSeekpoint < pFlac->seekpointCount; ++iSeekpoint) {
         if (pFlac->pSeekpoints[iSeekpoint].firstPCMFrame >= pcmFrameIndex) {
         if (pFlac->pSeekpoints[iSeekpoint].firstPCMFrame >= pcmFrameIndex) {
             break;
             break;
@@ -6480,7 +6563,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d
                     pRunningData    = (const char*)pRawData;
                     pRunningData    = (const char*)pRawData;
                     pRunningDataEnd = (const char*)pRawData + blockSize;
                     pRunningDataEnd = (const char*)pRawData + blockSize;
 
 
-                    metadata.data.vorbis_comment.vendorLength = drflac__le2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
+                    metadata.data.vorbis_comment.vendorLength = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
 
 
                     /* Need space for the rest of the block */
                     /* Need space for the rest of the block */
                     if ((pRunningDataEnd - pRunningData) - 4 < (drflac_int64)metadata.data.vorbis_comment.vendorLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
                     if ((pRunningDataEnd - pRunningData) - 4 < (drflac_int64)metadata.data.vorbis_comment.vendorLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
@@ -6488,7 +6571,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d
                         return DRFLAC_FALSE;
                         return DRFLAC_FALSE;
                     }
                     }
                     metadata.data.vorbis_comment.vendor       = pRunningData;                                            pRunningData += metadata.data.vorbis_comment.vendorLength;
                     metadata.data.vorbis_comment.vendor       = pRunningData;                                            pRunningData += metadata.data.vorbis_comment.vendorLength;
-                    metadata.data.vorbis_comment.commentCount = drflac__le2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
+                    metadata.data.vorbis_comment.commentCount = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
 
 
                     /* Need space for 'commentCount' comments after the block, which at minimum is a drflac_uint32 per comment */
                     /* Need space for 'commentCount' comments after the block, which at minimum is a drflac_uint32 per comment */
                     if ((pRunningDataEnd - pRunningData) / sizeof(drflac_uint32) < metadata.data.vorbis_comment.commentCount) { /* <-- Note the order of operations to avoid overflow to a valid value */
                     if ((pRunningDataEnd - pRunningData) / sizeof(drflac_uint32) < metadata.data.vorbis_comment.commentCount) { /* <-- Note the order of operations to avoid overflow to a valid value */
@@ -6506,7 +6589,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d
                             return DRFLAC_FALSE;
                             return DRFLAC_FALSE;
                         }
                         }
 
 
-                        commentLength = drflac__le2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
+                        commentLength = drflac__le2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
                         if (pRunningDataEnd - pRunningData < (drflac_int64)commentLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
                         if (pRunningDataEnd - pRunningData < (drflac_int64)commentLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
                             drflac__free_from_callbacks(pRawData, pAllocationCallbacks);
                             drflac__free_from_callbacks(pRawData, pAllocationCallbacks);
                             return DRFLAC_FALSE;
                             return DRFLAC_FALSE;
@@ -6615,8 +6698,8 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d
                     pRunningData    = (const char*)pRawData;
                     pRunningData    = (const char*)pRawData;
                     pRunningDataEnd = (const char*)pRawData + blockSize;
                     pRunningDataEnd = (const char*)pRawData + blockSize;
 
 
-                    metadata.data.picture.type       = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
-                    metadata.data.picture.mimeLength = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
+                    metadata.data.picture.type       = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
+                    metadata.data.picture.mimeLength = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
 
 
                     /* Need space for the rest of the block */
                     /* Need space for the rest of the block */
                     if ((pRunningDataEnd - pRunningData) - 24 < (drflac_int64)metadata.data.picture.mimeLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
                     if ((pRunningDataEnd - pRunningData) - 24 < (drflac_int64)metadata.data.picture.mimeLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
@@ -6624,7 +6707,7 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d
                         return DRFLAC_FALSE;
                         return DRFLAC_FALSE;
                     }
                     }
                     metadata.data.picture.mime              = pRunningData;                                            pRunningData += metadata.data.picture.mimeLength;
                     metadata.data.picture.mime              = pRunningData;                                            pRunningData += metadata.data.picture.mimeLength;
-                    metadata.data.picture.descriptionLength = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
+                    metadata.data.picture.descriptionLength = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
 
 
                     /* Need space for the rest of the block */
                     /* Need space for the rest of the block */
                     if ((pRunningDataEnd - pRunningData) - 20 < (drflac_int64)metadata.data.picture.descriptionLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
                     if ((pRunningDataEnd - pRunningData) - 20 < (drflac_int64)metadata.data.picture.descriptionLength) { /* <-- Note the order of operations to avoid overflow to a valid value */
@@ -6632,11 +6715,11 @@ static drflac_bool32 drflac__read_and_decode_metadata(drflac_read_proc onRead, d
                         return DRFLAC_FALSE;
                         return DRFLAC_FALSE;
                     }
                     }
                     metadata.data.picture.description     = pRunningData;                                            pRunningData += metadata.data.picture.descriptionLength;
                     metadata.data.picture.description     = pRunningData;                                            pRunningData += metadata.data.picture.descriptionLength;
-                    metadata.data.picture.width           = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
-                    metadata.data.picture.height          = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
-                    metadata.data.picture.colorDepth      = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
-                    metadata.data.picture.indexColorCount = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
-                    metadata.data.picture.pictureDataSize = drflac__be2host_32(*(const drflac_uint32*)pRunningData); pRunningData += 4;
+                    metadata.data.picture.width           = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
+                    metadata.data.picture.height          = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
+                    metadata.data.picture.colorDepth      = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
+                    metadata.data.picture.indexColorCount = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
+                    metadata.data.picture.pictureDataSize = drflac__be2host_32_ptr_unaligned(pRunningData); pRunningData += 4;
                     metadata.data.picture.pPictureData    = (const drflac_uint8*)pRunningData;
                     metadata.data.picture.pPictureData    = (const drflac_uint8*)pRunningData;
 
 
                     /* Need space for the picture after the block */
                     /* Need space for the picture after the block */
@@ -7860,7 +7943,7 @@ static drflac* drflac_open_with_metadata_private(drflac_read_proc onRead, drflac
 #ifndef DR_FLAC_NO_OGG
 #ifndef DR_FLAC_NO_OGG
     if (init.container == drflac_container_ogg) {
     if (init.container == drflac_container_ogg) {
         drflac_oggbs* pInternalOggbs = (drflac_oggbs*)((drflac_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + seektableSize);
         drflac_oggbs* pInternalOggbs = (drflac_oggbs*)((drflac_uint8*)pFlac->pDecodedSamples + decodedSamplesAllocationSize + seektableSize);
-        *pInternalOggbs = oggbs;
+        DRFLAC_COPY_MEMORY(pInternalOggbs, &oggbs, sizeof(oggbs));
 
 
         /* The Ogg bistream needs to be layered on top of the original bitstream. */
         /* The Ogg bistream needs to be layered on top of the original bitstream. */
         pFlac->bs.onRead = drflac__on_read_ogg;
         pFlac->bs.onRead = drflac__on_read_ogg;
@@ -11781,7 +11864,7 @@ DRFLAC_API const char* drflac_next_vorbis_comment(drflac_vorbis_comment_iterator
         return NULL;
         return NULL;
     }
     }
 
 
-    length = drflac__le2host_32(*(const drflac_uint32*)pIter->pRunningData);
+    length = drflac__le2host_32_ptr_unaligned(pIter->pRunningData);
     pIter->pRunningData += 4;
     pIter->pRunningData += 4;
 
 
     pComment = pIter->pRunningData;
     pComment = pIter->pRunningData;
@@ -11851,6 +11934,28 @@ DRFLAC_API drflac_bool32 drflac_next_cuesheet_track(drflac_cuesheet_track_iterat
 /*
 /*
 REVISION HISTORY
 REVISION HISTORY
 ================
 ================
+v0.12.38 - 2022-04-10
+  - Fix compilation error on older versions of GCC.
+
+v0.12.37 - 2022-02-12
+  - Improve ARM detection.
+
+v0.12.36 - 2022-02-07
+  - Fix a compilation error with the ARM build.
+
+v0.12.35 - 2022-02-06
+  - Fix a bug due to underestimating the amount of precision required for the prediction stage.
+  - Fix some bugs found from fuzz testing.
+
+v0.12.34 - 2022-01-07
+  - Fix some misalignment bugs when reading metadata.
+
+v0.12.33 - 2021-12-22
+  - Fix a bug with seeking when the seek table does not start at PCM frame 0.
+
+v0.12.32 - 2021-12-11
+  - Fix a warning with Clang.
+
 v0.12.31 - 2021-08-16
 v0.12.31 - 2021-08-16
   - Silence some warnings.
   - Silence some warnings.
 
 

+ 23 - 25
soloud.mod/soloud/src/audiosource/wav/dr_mp3.h

@@ -1,6 +1,6 @@
 /*
 /*
 MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
 MP3 audio decoder. Choice of public domain or MIT-0. See license statements at the end of this file.
-dr_mp3 - v0.6.31 - 2021-08-22
+dr_mp3 - v0.6.33 - 2022-04-10
 
 
 David Reid - [email protected]
 David Reid - [email protected]
 
 
@@ -95,7 +95,7 @@ extern "C" {
 
 
 #define DRMP3_VERSION_MAJOR     0
 #define DRMP3_VERSION_MAJOR     0
 #define DRMP3_VERSION_MINOR     6
 #define DRMP3_VERSION_MINOR     6
-#define DRMP3_VERSION_REVISION  31
+#define DRMP3_VERSION_REVISION  33
 #define DRMP3_VERSION_STRING    DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION)
 #define DRMP3_VERSION_STRING    DRMP3_XSTRINGIFY(DRMP3_VERSION_MAJOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_MINOR) "." DRMP3_XSTRINGIFY(DRMP3_VERSION_REVISION)
 
 
 #include <stddef.h> /* For size_t. */
 #include <stddef.h> /* For size_t. */
@@ -107,7 +107,7 @@ typedef   signed short          drmp3_int16;
 typedef unsigned short          drmp3_uint16;
 typedef unsigned short          drmp3_uint16;
 typedef   signed int            drmp3_int32;
 typedef   signed int            drmp3_int32;
 typedef unsigned int            drmp3_uint32;
 typedef unsigned int            drmp3_uint32;
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && !defined(__clang__)
     typedef   signed __int64    drmp3_int64;
     typedef   signed __int64    drmp3_int64;
     typedef unsigned __int64    drmp3_uint64;
     typedef unsigned __int64    drmp3_uint64;
 #else
 #else
@@ -235,9 +235,15 @@ typedef drmp3_int32 drmp3_result;
     I am using "__inline__" only when we're compiling in strict ANSI mode.
     I am using "__inline__" only when we're compiling in strict ANSI mode.
     */
     */
     #if defined(__STRICT_ANSI__)
     #if defined(__STRICT_ANSI__)
-        #define DRMP3_INLINE __inline__ __attribute__((always_inline))
+        #define DRMP3_GNUC_INLINE_HINT __inline__
     #else
     #else
-        #define DRMP3_INLINE inline __attribute__((always_inline))
+        #define DRMP3_GNUC_INLINE_HINT inline
+    #endif
+
+    #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)) || defined(__clang__)
+        #define DRMP3_INLINE DRMP3_GNUC_INLINE_HINT __attribute__((always_inline))
+    #else
+        #define DRMP3_INLINE DRMP3_GNUC_INLINE_HINT
     #endif
     #endif
 #elif defined(__WATCOMC__)
 #elif defined(__WATCOMC__)
     #define DRMP3_INLINE __inline
     #define DRMP3_INLINE __inline
@@ -2103,7 +2109,11 @@ static void drmp3d_synth(float *xl, drmp3d_sample_t *dstl, int nch, float *lins)
             vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2);
             vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2);
 #endif
 #endif
 #else
 #else
+        #if DRMP3_HAVE_SSE
             static const drmp3_f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f };
             static const drmp3_f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f };
+        #else
+            const drmp3_f4 g_scale = vdupq_n_f32(1.0f/32768.0f);
+        #endif
             a = DRMP3_VMUL(a, g_scale);
             a = DRMP3_VMUL(a, g_scale);
             b = DRMP3_VMUL(b, g_scale);
             b = DRMP3_VMUL(b, g_scale);
 #if DRMP3_HAVE_SSE
 #if DRMP3_HAVE_SSE
@@ -2406,8 +2416,6 @@ DRMP3_API void drmp3dec_f32_to_s16(const float *in, drmp3_int16 *out, size_t num
  Main Public API
  Main Public API
 
 
  ************************************************************************************************************************************************************/
  ************************************************************************************************************************************************************/
-#include <math.h>   /* For sin() and exp(). */
-
 #if defined(SIZE_MAX)
 #if defined(SIZE_MAX)
     #define DRMP3_SIZE_MAX  SIZE_MAX
     #define DRMP3_SIZE_MAX  SIZE_MAX
 #else
 #else
@@ -2472,24 +2480,6 @@ static DRMP3_INLINE drmp3_uint32 drmp3_gcf_u32(drmp3_uint32 a, drmp3_uint32 b)
 }
 }
 
 
 
 
-static DRMP3_INLINE double drmp3_sin(double x)
-{
-    /* TODO: Implement custom sin(x). */
-    return sin(x);
-}
-
-static DRMP3_INLINE double drmp3_exp(double x)
-{
-    /* TODO: Implement custom exp(x). */
-    return exp(x);
-}
-
-static DRMP3_INLINE double drmp3_cos(double x)
-{
-    return drmp3_sin((DRMP3_PI_D*0.5) - x);
-}
-
-
 static void* drmp3__malloc_default(size_t sz, void* pUserData)
 static void* drmp3__malloc_default(size_t sz, void* pUserData)
 {
 {
     (void)pUserData;
     (void)pUserData;
@@ -4473,6 +4463,14 @@ counts rather than sample counts.
 /*
 /*
 REVISION HISTORY
 REVISION HISTORY
 ================
 ================
+v0.6.33 - 2022-04-10
+  - Fix compilation error with the MSVC ARM64 build.
+  - Fix compilation error on older versions of GCC.
+  - Remove some unused functions.
+
+v0.6.32 - 2021-12-11
+  - Fix a warning with Clang.
+
 v0.6.31 - 2021-08-22
 v0.6.31 - 2021-08-22
   - Fix a bug when loading from memory.
   - Fix a bug when loading from memory.
 
 

File diff suppressed because it is too large
+ 414 - 178
soloud.mod/soloud/src/audiosource/wav/dr_wav.h


File diff suppressed because it is too large
+ 61631 - 40671
soloud.mod/soloud/src/backend/miniaudio/miniaudio.h


+ 2 - 2
soloud.mod/soloud/src/backend/miniaudio/soloud_miniaudio.cpp

@@ -46,7 +46,7 @@ namespace SoLoud
 #include "miniaudio.h"
 #include "miniaudio.h"
 #include <math.h>
 #include <math.h>
 
 
-extern ma_context * _bmx_ma_context;
+extern ma_context * _so_ma_context = 0;
 
 
 namespace SoLoud
 namespace SoLoud
 {
 {
@@ -73,7 +73,7 @@ namespace SoLoud
         config.dataCallback       = soloud_miniaudio_audiomixer;
         config.dataCallback       = soloud_miniaudio_audiomixer;
         config.pUserData          = (void *)aSoloud;
         config.pUserData          = (void *)aSoloud;
 
 
-        if (ma_device_init(_bmx_ma_context, &config, &gDevice) != MA_SUCCESS)
+        if (ma_device_init(_so_ma_context, &config, &gDevice) != MA_SUCCESS)
         {
         {
             return UNKNOWN_ERROR;
             return UNKNOWN_ERROR;
         }
         }

+ 244 - 1255
soloud.mod/soloud/src/c_api/soloud_c.cpp

@@ -46,7 +46,6 @@ freely, subject to the following restrictions:
 #include "../include/soloud_lofifilter.h"
 #include "../include/soloud_lofifilter.h"
 #include "../include/soloud_monotone.h"
 #include "../include/soloud_monotone.h"
 #include "../include/soloud_noise.h"
 #include "../include/soloud_noise.h"
-#include "../include/soloud_openmpt.h"
 #include "../include/soloud_queue.h"
 #include "../include/soloud_queue.h"
 #include "../include/soloud_robotizefilter.h"
 #include "../include/soloud_robotizefilter.h"
 #include "../include/soloud_sfxr.h"
 #include "../include/soloud_sfxr.h"
@@ -721,136 +720,6 @@ void Soloud_mixSigned16(void * aClassPtr, short * aBuffer, unsigned int aSamples
 	cl->mixSigned16(aBuffer, aSamples);
 	cl->mixSigned16(aBuffer, aSamples);
 }
 }
 
 
-void Ay_destroy(void * aClassPtr)
-{
-  delete (Ay *)aClassPtr;
-}
-
-void * Ay_create()
-{
-  return (void *)new Ay;
-}
-
-int Ay_load(void * aClassPtr, const char * aFilename)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	return cl->load(aFilename);
-}
-
-int Ay_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	return cl->loadMem(aMem, aLength, false, true);
-}
-
-int Ay_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
-}
-
-int Ay_loadFile(void * aClassPtr, File * aFile)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	return cl->loadFile(aFile);
-}
-
-void Ay_setVolume(void * aClassPtr, float aVolume)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->setVolume(aVolume);
-}
-
-void Ay_setLooping(void * aClassPtr, int aLoop)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->setLooping(!!aLoop);
-}
-
-void Ay_setAutoStop(void * aClassPtr, int aAutoStop)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->setAutoStop(!!aAutoStop);
-}
-
-void Ay_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
-}
-
-void Ay_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
-}
-
-void Ay_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dDopplerFactor(aDopplerFactor);
-}
-
-void Ay_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dListenerRelative(!!aListenerRelative);
-}
-
-void Ay_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dDistanceDelay(!!aDistanceDelay);
-}
-
-void Ay_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dCollider(aCollider);
-}
-
-void Ay_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dCollider(aCollider, aUserData);
-}
-
-void Ay_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->set3dAttenuator(aAttenuator);
-}
-
-void Ay_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
-}
-
-void Ay_setLoopPoint(void * aClassPtr, double aLoopPoint)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->setLoopPoint(aLoopPoint);
-}
-
-double Ay_getLoopPoint(void * aClassPtr)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	return cl->getLoopPoint();
-}
-
-void Ay_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->setFilter(aFilterId, aFilter);
-}
-
-void Ay_stop(void * aClassPtr)
-{
-	Ay * cl = (Ay *)aClassPtr;
-	cl->stop();
-}
-
 void BassboostFilter_destroy(void * aClassPtr)
 void BassboostFilter_destroy(void * aClassPtr)
 {
 {
   delete (BassboostFilter *)aClassPtr;
   delete (BassboostFilter *)aClassPtr;
@@ -1433,1455 +1302,575 @@ int LofiFilter_setParams(void * aClassPtr, float aSampleRate, float aBitdepth)
 	return cl->setParams(aSampleRate, aBitdepth);
 	return cl->setParams(aSampleRate, aBitdepth);
 }
 }
 
 
-void Monotone_destroy(void * aClassPtr)
+void RobotizeFilter_destroy(void * aClassPtr)
+{
+  delete (RobotizeFilter *)aClassPtr;
+}
+
+int RobotizeFilter_getParamCount(void * aClassPtr)
+{
+	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
+	return cl->getParamCount();
+}
+
+const char * RobotizeFilter_getParamName(void * aClassPtr, unsigned int aParamIndex)
 {
 {
-  delete (Monotone *)aClassPtr;
+	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
+	return cl->getParamName(aParamIndex);
 }
 }
 
 
-void * Monotone_create()
+unsigned int RobotizeFilter_getParamType(void * aClassPtr, unsigned int aParamIndex)
 {
 {
-  return (void *)new Monotone;
+	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
+	return cl->getParamType(aParamIndex);
 }
 }
 
 
-int Monotone_setParams(void * aClassPtr, int aHardwareChannels)
+float RobotizeFilter_getParamMax(void * aClassPtr, unsigned int aParamIndex)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
-	return cl->setParams(aHardwareChannels);
+	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
+	return cl->getParamMax(aParamIndex);
 }
 }
 
 
-int Monotone_setParamsEx(void * aClassPtr, int aHardwareChannels, int aWaveform)
+float RobotizeFilter_getParamMin(void * aClassPtr, unsigned int aParamIndex)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
-	return cl->setParams(aHardwareChannels, aWaveform);
+	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
+	return cl->getParamMin(aParamIndex);
 }
 }
 
 
-int Monotone_load(void * aClassPtr, const char * aFilename)
+void RobotizeFilter_setParams(void * aClassPtr, float aFreq, int aWaveform)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
-	return cl->load(aFilename);
+	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
+	cl->setParams(aFreq, aWaveform);
 }
 }
 
 
-int Monotone_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
+void * RobotizeFilter_create()
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
-	return cl->loadMem(aMem, aLength);
+  return (void *)new RobotizeFilter;
 }
 }
 
 
-int Monotone_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
+void Sfxr_destroy(void * aClassPtr)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
-	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
+  delete (Sfxr *)aClassPtr;
 }
 }
 
 
-int Monotone_loadFile(void * aClassPtr, File * aFile)
+void * Sfxr_create()
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
-	return cl->loadFile(aFile);
+  return (void *)new Sfxr;
+}
+
+void Sfxr_resetParams(void * aClassPtr)
+{
+	Sfxr * cl = (Sfxr *)aClassPtr;
+	cl->resetParams();
+}
+
+int Sfxr_loadParams(void * aClassPtr, const char * aFilename)
+{
+	Sfxr * cl = (Sfxr *)aClassPtr;
+	return cl->loadParams(aFilename);
+}
+
+int Sfxr_loadParamsMem(void * aClassPtr, unsigned char * aMem, unsigned int aLength)
+{
+	Sfxr * cl = (Sfxr *)aClassPtr;
+	return cl->loadParamsMem(aMem, aLength);
+}
+
+int Sfxr_loadParamsMemEx(void * aClassPtr, unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
+{
+	Sfxr * cl = (Sfxr *)aClassPtr;
+	return cl->loadParamsMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
+}
+
+int Sfxr_loadParamsFile(void * aClassPtr, File * aFile)
+{
+	Sfxr * cl = (Sfxr *)aClassPtr;
+	return cl->loadParamsFile(aFile);
+}
+
+int Sfxr_loadPreset(void * aClassPtr, int aPresetNo, int aRandSeed)
+{
+	Sfxr * cl = (Sfxr *)aClassPtr;
+	return cl->loadPreset(aPresetNo, aRandSeed);
 }
 }
 
 
-void Monotone_setVolume(void * aClassPtr, float aVolume)
+void Sfxr_setVolume(void * aClassPtr, float aVolume)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->setVolume(aVolume);
 	cl->setVolume(aVolume);
 }
 }
 
 
-void Monotone_setLooping(void * aClassPtr, int aLoop)
+void Sfxr_setLooping(void * aClassPtr, int aLoop)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->setLooping(!!aLoop);
 	cl->setLooping(!!aLoop);
 }
 }
 
 
-void Monotone_setAutoStop(void * aClassPtr, int aAutoStop)
+void Sfxr_setAutoStop(void * aClassPtr, int aAutoStop)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->setAutoStop(!!aAutoStop);
 	cl->setAutoStop(!!aAutoStop);
 }
 }
 
 
-void Monotone_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+void Sfxr_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 }
 }
 
 
-void Monotone_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+void Sfxr_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 }
 }
 
 
-void Monotone_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+void Sfxr_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dDopplerFactor(aDopplerFactor);
 	cl->set3dDopplerFactor(aDopplerFactor);
 }
 }
 
 
-void Monotone_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+void Sfxr_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dListenerRelative(!!aListenerRelative);
 	cl->set3dListenerRelative(!!aListenerRelative);
 }
 }
 
 
-void Monotone_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+void Sfxr_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 }
 }
 
 
-void Monotone_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+void Sfxr_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dCollider(aCollider);
 	cl->set3dCollider(aCollider);
 }
 }
 
 
-void Monotone_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+void Sfxr_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dCollider(aCollider, aUserData);
 	cl->set3dCollider(aCollider, aUserData);
 }
 }
 
 
-void Monotone_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+void Sfxr_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->set3dAttenuator(aAttenuator);
 	cl->set3dAttenuator(aAttenuator);
 }
 }
 
 
-void Monotone_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+void Sfxr_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 }
 }
 
 
-void Monotone_setLoopPoint(void * aClassPtr, double aLoopPoint)
+void Sfxr_setLoopPoint(void * aClassPtr, double aLoopPoint)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->setLoopPoint(aLoopPoint);
 	cl->setLoopPoint(aLoopPoint);
 }
 }
 
 
-double Monotone_getLoopPoint(void * aClassPtr)
+double Sfxr_getLoopPoint(void * aClassPtr)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	return cl->getLoopPoint();
 	return cl->getLoopPoint();
 }
 }
 
 
-void Monotone_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+void Sfxr_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->setFilter(aFilterId, aFilter);
 	cl->setFilter(aFilterId, aFilter);
 }
 }
 
 
-void Monotone_stop(void * aClassPtr)
+void Sfxr_stop(void * aClassPtr)
 {
 {
-	Monotone * cl = (Monotone *)aClassPtr;
+	Sfxr * cl = (Sfxr *)aClassPtr;
 	cl->stop();
 	cl->stop();
 }
 }
 
 
-void Noise_destroy(void * aClassPtr)
+void Speech_destroy(void * aClassPtr)
+{
+  delete (Speech *)aClassPtr;
+}
+
+void * Speech_create()
 {
 {
-  delete (Noise *)aClassPtr;
+  return (void *)new Speech;
 }
 }
 
 
-void * Noise_create()
+int Speech_setText(void * aClassPtr, const char * aText)
 {
 {
-  return (void *)new Noise;
+	Speech * cl = (Speech *)aClassPtr;
+	return cl->setText(aText);
 }
 }
 
 
-void Noise_setOctaveScale(void * aClassPtr, float aOct0, float aOct1, float aOct2, float aOct3, float aOct4, float aOct5, float aOct6, float aOct7, float aOct8, float aOct9)
+int Speech_setParams(void * aClassPtr)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
-	cl->setOctaveScale(aOct0, aOct1, aOct2, aOct3, aOct4, aOct5, aOct6, aOct7, aOct8, aOct9);
+	Speech * cl = (Speech *)aClassPtr;
+	return cl->setParams();
 }
 }
 
 
-void Noise_setType(void * aClassPtr, int aType)
+int Speech_setParamsEx(void * aClassPtr, unsigned int aBaseFrequency, float aBaseSpeed, float aBaseDeclination, int aBaseWaveform)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
-	cl->setType(aType);
+	Speech * cl = (Speech *)aClassPtr;
+	return cl->setParams(aBaseFrequency, aBaseSpeed, aBaseDeclination, aBaseWaveform);
 }
 }
 
 
-void Noise_setVolume(void * aClassPtr, float aVolume)
+void Speech_setVolume(void * aClassPtr, float aVolume)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->setVolume(aVolume);
 	cl->setVolume(aVolume);
 }
 }
 
 
-void Noise_setLooping(void * aClassPtr, int aLoop)
+void Speech_setLooping(void * aClassPtr, int aLoop)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->setLooping(!!aLoop);
 	cl->setLooping(!!aLoop);
 }
 }
 
 
-void Noise_setAutoStop(void * aClassPtr, int aAutoStop)
+void Speech_setAutoStop(void * aClassPtr, int aAutoStop)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->setAutoStop(!!aAutoStop);
 	cl->setAutoStop(!!aAutoStop);
 }
 }
 
 
-void Noise_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+void Speech_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 }
 }
 
 
-void Noise_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+void Speech_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 }
 }
 
 
-void Noise_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+void Speech_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dDopplerFactor(aDopplerFactor);
 	cl->set3dDopplerFactor(aDopplerFactor);
 }
 }
 
 
-void Noise_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+void Speech_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dListenerRelative(!!aListenerRelative);
 	cl->set3dListenerRelative(!!aListenerRelative);
 }
 }
 
 
-void Noise_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+void Speech_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 }
 }
 
 
-void Noise_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+void Speech_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dCollider(aCollider);
 	cl->set3dCollider(aCollider);
 }
 }
 
 
-void Noise_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+void Speech_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dCollider(aCollider, aUserData);
 	cl->set3dCollider(aCollider, aUserData);
 }
 }
 
 
-void Noise_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+void Speech_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->set3dAttenuator(aAttenuator);
 	cl->set3dAttenuator(aAttenuator);
 }
 }
 
 
-void Noise_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+void Speech_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 }
 }
 
 
-void Noise_setLoopPoint(void * aClassPtr, double aLoopPoint)
+void Speech_setLoopPoint(void * aClassPtr, double aLoopPoint)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->setLoopPoint(aLoopPoint);
 	cl->setLoopPoint(aLoopPoint);
 }
 }
 
 
-double Noise_getLoopPoint(void * aClassPtr)
+double Speech_getLoopPoint(void * aClassPtr)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	return cl->getLoopPoint();
 	return cl->getLoopPoint();
 }
 }
 
 
-void Noise_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+void Speech_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->setFilter(aFilterId, aFilter);
 	cl->setFilter(aFilterId, aFilter);
 }
 }
 
 
-void Noise_stop(void * aClassPtr)
+void Speech_stop(void * aClassPtr)
 {
 {
-	Noise * cl = (Noise *)aClassPtr;
+	Speech * cl = (Speech *)aClassPtr;
 	cl->stop();
 	cl->stop();
 }
 }
 
 
-void Queue_destroy(void * aClassPtr)
+void TedSid_destroy(void * aClassPtr)
 {
 {
-  delete (Queue *)aClassPtr;
+  delete (TedSid *)aClassPtr;
 }
 }
 
 
-void * Queue_create()
+void * TedSid_create()
 {
 {
-  return (void *)new Queue;
+  return (void *)new TedSid;
 }
 }
 
 
-int Queue_play(void * aClassPtr, AudioSource * aSound)
+int TedSid_load(void * aClassPtr, const char * aFilename)
 {
 {
-	Queue * cl = (Queue *)aClassPtr;
-	return cl->play(*aSound);
+	TedSid * cl = (TedSid *)aClassPtr;
+	return cl->load(aFilename);
 }
 }
 
 
-unsigned int Queue_getQueueCount(void * aClassPtr)
+int TedSid_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
 {
 {
-	Queue * cl = (Queue *)aClassPtr;
-	return cl->getQueueCount();
+	TedSid * cl = (TedSid *)aClassPtr;
+	return cl->loadMem(aMem, aLength);
 }
 }
 
 
-int Queue_isCurrentlyPlaying(void * aClassPtr, AudioSource * aSound)
+int TedSid_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
 {
 {
-	Queue * cl = (Queue *)aClassPtr;
-	return cl->isCurrentlyPlaying(*aSound);
+	TedSid * cl = (TedSid *)aClassPtr;
+	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
 }
 }
 
 
-int Queue_setParamsFromAudioSource(void * aClassPtr, AudioSource * aSound)
+int TedSid_loadFile(void * aClassPtr, File * aFile)
 {
 {
-	Queue * cl = (Queue *)aClassPtr;
-	return cl->setParamsFromAudioSource(*aSound);
+	TedSid * cl = (TedSid *)aClassPtr;
+	return cl->loadFile(aFile);
 }
 }
 
 
-int Queue_setParams(void * aClassPtr, float aSamplerate)
+void TedSid_setVolume(void * aClassPtr, float aVolume)
 {
 {
-	Queue * cl = (Queue *)aClassPtr;
-	return cl->setParams(aSamplerate);
-}
-
-int Queue_setParamsEx(void * aClassPtr, float aSamplerate, unsigned int aChannels)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	return cl->setParams(aSamplerate, aChannels);
-}
-
-void Queue_setVolume(void * aClassPtr, float aVolume)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->setVolume(aVolume);
-}
-
-void Queue_setLooping(void * aClassPtr, int aLoop)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->setLooping(!!aLoop);
-}
-
-void Queue_setAutoStop(void * aClassPtr, int aAutoStop)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->setAutoStop(!!aAutoStop);
-}
-
-void Queue_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
-}
-
-void Queue_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
-}
-
-void Queue_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dDopplerFactor(aDopplerFactor);
-}
-
-void Queue_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dListenerRelative(!!aListenerRelative);
-}
-
-void Queue_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dDistanceDelay(!!aDistanceDelay);
-}
-
-void Queue_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dCollider(aCollider);
-}
-
-void Queue_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dCollider(aCollider, aUserData);
-}
-
-void Queue_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->set3dAttenuator(aAttenuator);
-}
-
-void Queue_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
-}
-
-void Queue_setLoopPoint(void * aClassPtr, double aLoopPoint)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->setLoopPoint(aLoopPoint);
-}
-
-double Queue_getLoopPoint(void * aClassPtr)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	return cl->getLoopPoint();
-}
-
-void Queue_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->setFilter(aFilterId, aFilter);
-}
-
-void Queue_stop(void * aClassPtr)
-{
-	Queue * cl = (Queue *)aClassPtr;
-	cl->stop();
-}
-
-void RobotizeFilter_destroy(void * aClassPtr)
-{
-  delete (RobotizeFilter *)aClassPtr;
-}
-
-int RobotizeFilter_getParamCount(void * aClassPtr)
-{
-	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
-	return cl->getParamCount();
-}
-
-const char * RobotizeFilter_getParamName(void * aClassPtr, unsigned int aParamIndex)
-{
-	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
-	return cl->getParamName(aParamIndex);
-}
-
-unsigned int RobotizeFilter_getParamType(void * aClassPtr, unsigned int aParamIndex)
-{
-	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
-	return cl->getParamType(aParamIndex);
-}
-
-float RobotizeFilter_getParamMax(void * aClassPtr, unsigned int aParamIndex)
-{
-	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
-	return cl->getParamMax(aParamIndex);
-}
-
-float RobotizeFilter_getParamMin(void * aClassPtr, unsigned int aParamIndex)
-{
-	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
-	return cl->getParamMin(aParamIndex);
-}
-
-void RobotizeFilter_setParams(void * aClassPtr, float aFreq, int aWaveform)
-{
-	RobotizeFilter * cl = (RobotizeFilter *)aClassPtr;
-	cl->setParams(aFreq, aWaveform);
-}
-
-void * RobotizeFilter_create()
-{
-  return (void *)new RobotizeFilter;
-}
-
-void Sfxr_destroy(void * aClassPtr)
-{
-  delete (Sfxr *)aClassPtr;
-}
-
-void * Sfxr_create()
-{
-  return (void *)new Sfxr;
-}
-
-void Sfxr_resetParams(void * aClassPtr)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->resetParams();
-}
-
-int Sfxr_loadParams(void * aClassPtr, const char * aFilename)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	return cl->loadParams(aFilename);
-}
-
-int Sfxr_loadParamsMem(void * aClassPtr, unsigned char * aMem, unsigned int aLength)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	return cl->loadParamsMem(aMem, aLength);
-}
-
-int Sfxr_loadParamsMemEx(void * aClassPtr, unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	return cl->loadParamsMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
-}
-
-int Sfxr_loadParamsFile(void * aClassPtr, File * aFile)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	return cl->loadParamsFile(aFile);
-}
-
-int Sfxr_loadPreset(void * aClassPtr, int aPresetNo, int aRandSeed)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	return cl->loadPreset(aPresetNo, aRandSeed);
-}
-
-void Sfxr_setVolume(void * aClassPtr, float aVolume)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->setVolume(aVolume);
-}
-
-void Sfxr_setLooping(void * aClassPtr, int aLoop)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->setLooping(!!aLoop);
-}
-
-void Sfxr_setAutoStop(void * aClassPtr, int aAutoStop)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->setAutoStop(!!aAutoStop);
-}
-
-void Sfxr_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
-}
-
-void Sfxr_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
-}
-
-void Sfxr_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dDopplerFactor(aDopplerFactor);
-}
-
-void Sfxr_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dListenerRelative(!!aListenerRelative);
-}
-
-void Sfxr_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dDistanceDelay(!!aDistanceDelay);
-}
-
-void Sfxr_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dCollider(aCollider);
-}
-
-void Sfxr_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dCollider(aCollider, aUserData);
-}
-
-void Sfxr_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->set3dAttenuator(aAttenuator);
-}
-
-void Sfxr_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
-}
-
-void Sfxr_setLoopPoint(void * aClassPtr, double aLoopPoint)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->setLoopPoint(aLoopPoint);
-}
-
-double Sfxr_getLoopPoint(void * aClassPtr)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	return cl->getLoopPoint();
-}
-
-void Sfxr_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->setFilter(aFilterId, aFilter);
-}
-
-void Sfxr_stop(void * aClassPtr)
-{
-	Sfxr * cl = (Sfxr *)aClassPtr;
-	cl->stop();
-}
-
-void Speech_destroy(void * aClassPtr)
-{
-  delete (Speech *)aClassPtr;
-}
-
-void * Speech_create()
-{
-  return (void *)new Speech;
-}
-
-int Speech_setText(void * aClassPtr, const char * aText)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	return cl->setText(aText);
-}
-
-int Speech_setParams(void * aClassPtr)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	return cl->setParams();
-}
-
-int Speech_setParamsEx(void * aClassPtr, unsigned int aBaseFrequency, float aBaseSpeed, float aBaseDeclination, int aBaseWaveform)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	return cl->setParams(aBaseFrequency, aBaseSpeed, aBaseDeclination, aBaseWaveform);
-}
-
-void Speech_setVolume(void * aClassPtr, float aVolume)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->setVolume(aVolume);
-}
-
-void Speech_setLooping(void * aClassPtr, int aLoop)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->setLooping(!!aLoop);
-}
-
-void Speech_setAutoStop(void * aClassPtr, int aAutoStop)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->setAutoStop(!!aAutoStop);
-}
-
-void Speech_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
-}
-
-void Speech_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
-}
-
-void Speech_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dDopplerFactor(aDopplerFactor);
-}
-
-void Speech_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dListenerRelative(!!aListenerRelative);
-}
-
-void Speech_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dDistanceDelay(!!aDistanceDelay);
-}
-
-void Speech_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dCollider(aCollider);
-}
-
-void Speech_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dCollider(aCollider, aUserData);
-}
-
-void Speech_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->set3dAttenuator(aAttenuator);
-}
-
-void Speech_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
-}
-
-void Speech_setLoopPoint(void * aClassPtr, double aLoopPoint)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->setLoopPoint(aLoopPoint);
-}
-
-double Speech_getLoopPoint(void * aClassPtr)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	return cl->getLoopPoint();
-}
-
-void Speech_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->setFilter(aFilterId, aFilter);
-}
-
-void Speech_stop(void * aClassPtr)
-{
-	Speech * cl = (Speech *)aClassPtr;
-	cl->stop();
-}
-
-void TedSid_destroy(void * aClassPtr)
-{
-  delete (TedSid *)aClassPtr;
-}
-
-void * TedSid_create()
-{
-  return (void *)new TedSid;
-}
-
-int TedSid_load(void * aClassPtr, const char * aFilename)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	return cl->load(aFilename);
-}
-
-int TedSid_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	return cl->loadMem(aMem, aLength);
-}
-
-int TedSid_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
-}
-
-int TedSid_loadFile(void * aClassPtr, File * aFile)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	return cl->loadFile(aFile);
-}
-
-void TedSid_setVolume(void * aClassPtr, float aVolume)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->setVolume(aVolume);
-}
-
-void TedSid_setLooping(void * aClassPtr, int aLoop)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->setLooping(!!aLoop);
-}
-
-void TedSid_setAutoStop(void * aClassPtr, int aAutoStop)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->setAutoStop(!!aAutoStop);
-}
-
-void TedSid_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
-}
-
-void TedSid_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
-}
-
-void TedSid_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dDopplerFactor(aDopplerFactor);
-}
-
-void TedSid_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dListenerRelative(!!aListenerRelative);
-}
-
-void TedSid_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dDistanceDelay(!!aDistanceDelay);
-}
-
-void TedSid_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dCollider(aCollider);
-}
-
-void TedSid_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dCollider(aCollider, aUserData);
-}
-
-void TedSid_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->set3dAttenuator(aAttenuator);
-}
-
-void TedSid_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
-}
-
-void TedSid_setLoopPoint(void * aClassPtr, double aLoopPoint)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->setLoopPoint(aLoopPoint);
-}
-
-double TedSid_getLoopPoint(void * aClassPtr)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	return cl->getLoopPoint();
-}
-
-void TedSid_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->setFilter(aFilterId, aFilter);
-}
-
-void TedSid_stop(void * aClassPtr)
-{
-	TedSid * cl = (TedSid *)aClassPtr;
-	cl->stop();
-}
-
-void Vic_destroy(void * aClassPtr)
-{
-  delete (Vic *)aClassPtr;
-}
-
-void * Vic_create()
-{
-  return (void *)new Vic;
-}
-
-void Vic_setModel(void * aClassPtr, int model)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setModel(model);
-}
-
-int Vic_getModel(void * aClassPtr)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	return cl->getModel();
-}
-
-void Vic_setRegister(void * aClassPtr, int reg, unsigned char value)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setRegister(reg, value);
-}
-
-unsigned char Vic_getRegister(void * aClassPtr, int reg)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	return cl->getRegister(reg);
-}
-
-void Vic_setVolume(void * aClassPtr, float aVolume)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setVolume(aVolume);
-}
-
-void Vic_setLooping(void * aClassPtr, int aLoop)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setLooping(!!aLoop);
-}
-
-void Vic_setAutoStop(void * aClassPtr, int aAutoStop)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setAutoStop(!!aAutoStop);
-}
-
-void Vic_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
-}
-
-void Vic_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
-}
-
-void Vic_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dDopplerFactor(aDopplerFactor);
-}
-
-void Vic_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dListenerRelative(!!aListenerRelative);
-}
-
-void Vic_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dDistanceDelay(!!aDistanceDelay);
-}
-
-void Vic_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dCollider(aCollider);
-}
-
-void Vic_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dCollider(aCollider, aUserData);
-}
-
-void Vic_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->set3dAttenuator(aAttenuator);
-}
-
-void Vic_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
-}
-
-void Vic_setLoopPoint(void * aClassPtr, double aLoopPoint)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setLoopPoint(aLoopPoint);
-}
-
-double Vic_getLoopPoint(void * aClassPtr)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	return cl->getLoopPoint();
-}
-
-void Vic_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->setFilter(aFilterId, aFilter);
-}
-
-void Vic_stop(void * aClassPtr)
-{
-	Vic * cl = (Vic *)aClassPtr;
-	cl->stop();
-}
-
-void Vizsn_destroy(void * aClassPtr)
-{
-  delete (Vizsn *)aClassPtr;
-}
-
-void * Vizsn_create()
-{
-  return (void *)new Vizsn;
-}
-
-void Vizsn_setText(void * aClassPtr, char * aText)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->setText(aText);
-}
-
-void Vizsn_setVolume(void * aClassPtr, float aVolume)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->setVolume(aVolume);
-}
-
-void Vizsn_setLooping(void * aClassPtr, int aLoop)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->setLooping(!!aLoop);
-}
-
-void Vizsn_setAutoStop(void * aClassPtr, int aAutoStop)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->setAutoStop(!!aAutoStop);
-}
-
-void Vizsn_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
-}
-
-void Vizsn_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
-}
-
-void Vizsn_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dDopplerFactor(aDopplerFactor);
-}
-
-void Vizsn_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dListenerRelative(!!aListenerRelative);
-}
-
-void Vizsn_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dDistanceDelay(!!aDistanceDelay);
-}
-
-void Vizsn_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dCollider(aCollider);
-}
-
-void Vizsn_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dCollider(aCollider, aUserData);
-}
-
-void Vizsn_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->set3dAttenuator(aAttenuator);
-}
-
-void Vizsn_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
-}
-
-void Vizsn_setLoopPoint(void * aClassPtr, double aLoopPoint)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->setLoopPoint(aLoopPoint);
-}
-
-double Vizsn_getLoopPoint(void * aClassPtr)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	return cl->getLoopPoint();
-}
-
-void Vizsn_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->setFilter(aFilterId, aFilter);
-}
-
-void Vizsn_stop(void * aClassPtr)
-{
-	Vizsn * cl = (Vizsn *)aClassPtr;
-	cl->stop();
-}
-
-void Wav_destroy(void * aClassPtr)
-{
-  delete (Wav *)aClassPtr;
-}
-
-void * Wav_create()
-{
-  return (void *)new Wav;
-}
-
-int Wav_load(void * aClassPtr, const char * aFilename)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->load(aFilename);
-}
-
-int Wav_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadMem(aMem, aLength);
-}
-
-int Wav_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
-}
-
-int Wav_loadFile(void * aClassPtr, File * aFile)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadFile(aFile);
-}
-
-int Wav_loadRawWave8(void * aClassPtr, unsigned char * aMem, unsigned int aLength)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadRawWave8(aMem, aLength);
-}
-
-int Wav_loadRawWave8Ex(void * aClassPtr, unsigned char * aMem, unsigned int aLength, float aSamplerate, unsigned int aChannels)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadRawWave8(aMem, aLength, aSamplerate, aChannels);
-}
-
-int Wav_loadRawWave16(void * aClassPtr, short * aMem, unsigned int aLength)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadRawWave16(aMem, aLength);
-}
-
-int Wav_loadRawWave16Ex(void * aClassPtr, short * aMem, unsigned int aLength, float aSamplerate, unsigned int aChannels)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadRawWave16(aMem, aLength, aSamplerate, aChannels);
-}
-
-int Wav_loadRawWave(void * aClassPtr, float * aMem, unsigned int aLength)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadRawWave(aMem, aLength);
-}
-
-int Wav_loadRawWaveEx(void * aClassPtr, float * aMem, unsigned int aLength, float aSamplerate, unsigned int aChannels, int aCopy, int aTakeOwnership)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->loadRawWave(aMem, aLength, aSamplerate, aChannels, !!aCopy, !!aTakeOwnership);
-}
-
-double Wav_getLength(void * aClassPtr)
-{
-	Wav * cl = (Wav *)aClassPtr;
-	return cl->getLength();
-}
-
-void Wav_setVolume(void * aClassPtr, float aVolume)
-{
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->setVolume(aVolume);
 	cl->setVolume(aVolume);
 }
 }
 
 
-void Wav_setLooping(void * aClassPtr, int aLoop)
+void TedSid_setLooping(void * aClassPtr, int aLoop)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->setLooping(!!aLoop);
 	cl->setLooping(!!aLoop);
 }
 }
 
 
-void Wav_setAutoStop(void * aClassPtr, int aAutoStop)
+void TedSid_setAutoStop(void * aClassPtr, int aAutoStop)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->setAutoStop(!!aAutoStop);
 	cl->setAutoStop(!!aAutoStop);
 }
 }
 
 
-void Wav_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+void TedSid_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 }
 }
 
 
-void Wav_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+void TedSid_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 }
 }
 
 
-void Wav_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+void TedSid_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dDopplerFactor(aDopplerFactor);
 	cl->set3dDopplerFactor(aDopplerFactor);
 }
 }
 
 
-void Wav_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+void TedSid_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dListenerRelative(!!aListenerRelative);
 	cl->set3dListenerRelative(!!aListenerRelative);
 }
 }
 
 
-void Wav_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+void TedSid_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 }
 }
 
 
-void Wav_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+void TedSid_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dCollider(aCollider);
 	cl->set3dCollider(aCollider);
 }
 }
 
 
-void Wav_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+void TedSid_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dCollider(aCollider, aUserData);
 	cl->set3dCollider(aCollider, aUserData);
 }
 }
 
 
-void Wav_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+void TedSid_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->set3dAttenuator(aAttenuator);
 	cl->set3dAttenuator(aAttenuator);
 }
 }
 
 
-void Wav_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+void TedSid_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 }
 }
 
 
-void Wav_setLoopPoint(void * aClassPtr, double aLoopPoint)
+void TedSid_setLoopPoint(void * aClassPtr, double aLoopPoint)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->setLoopPoint(aLoopPoint);
 	cl->setLoopPoint(aLoopPoint);
 }
 }
 
 
-double Wav_getLoopPoint(void * aClassPtr)
+double TedSid_getLoopPoint(void * aClassPtr)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	return cl->getLoopPoint();
 	return cl->getLoopPoint();
 }
 }
 
 
-void Wav_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+void TedSid_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->setFilter(aFilterId, aFilter);
 	cl->setFilter(aFilterId, aFilter);
 }
 }
 
 
-void Wav_stop(void * aClassPtr)
+void TedSid_stop(void * aClassPtr)
 {
 {
-	Wav * cl = (Wav *)aClassPtr;
+	TedSid * cl = (TedSid *)aClassPtr;
 	cl->stop();
 	cl->stop();
 }
 }
 
 
-void WaveShaperFilter_destroy(void * aClassPtr)
-{
-  delete (WaveShaperFilter *)aClassPtr;
-}
-
-int WaveShaperFilter_setParams(void * aClassPtr, float aAmount)
-{
-	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
-	return cl->setParams(aAmount);
-}
-
-void * WaveShaperFilter_create()
-{
-  return (void *)new WaveShaperFilter;
-}
-
-int WaveShaperFilter_getParamCount(void * aClassPtr)
-{
-	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
-	return cl->getParamCount();
-}
-
-const char * WaveShaperFilter_getParamName(void * aClassPtr, unsigned int aParamIndex)
-{
-	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
-	return cl->getParamName(aParamIndex);
-}
-
-unsigned int WaveShaperFilter_getParamType(void * aClassPtr, unsigned int aParamIndex)
-{
-	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
-	return cl->getParamType(aParamIndex);
-}
-
-float WaveShaperFilter_getParamMax(void * aClassPtr, unsigned int aParamIndex)
-{
-	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
-	return cl->getParamMax(aParamIndex);
-}
-
-float WaveShaperFilter_getParamMin(void * aClassPtr, unsigned int aParamIndex)
-{
-	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
-	return cl->getParamMin(aParamIndex);
-}
-
-void WavStream_destroy(void * aClassPtr)
-{
-  delete (WavStream *)aClassPtr;
-}
-
-void * WavStream_create()
-{
-  return (void *)new WavStream;
-}
-
-int WavStream_load(void * aClassPtr, const char * aFilename)
-{
-	WavStream * cl = (WavStream *)aClassPtr;
-	return cl->load(aFilename);
-}
-
-int WavStream_loadMem(void * aClassPtr, const unsigned char * aData, unsigned int aDataLen)
+void Vic_destroy(void * aClassPtr)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
-	return cl->loadMem(aData, aDataLen);
+  delete (Vic *)aClassPtr;
 }
 }
 
 
-int WavStream_loadMemEx(void * aClassPtr, const unsigned char * aData, unsigned int aDataLen, int aCopy, int aTakeOwnership)
+void * Vic_create()
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
-	return cl->loadMem(aData, aDataLen, !!aCopy, !!aTakeOwnership);
+  return (void *)new Vic;
 }
 }
 
 
-int WavStream_loadToMem(void * aClassPtr, const char * aFilename)
+void Vic_setModel(void * aClassPtr, int model)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
-	return cl->loadToMem(aFilename);
+	Vic * cl = (Vic *)aClassPtr;
+	cl->setModel(model);
 }
 }
 
 
-int WavStream_loadFile(void * aClassPtr, File * aFile)
+int Vic_getModel(void * aClassPtr)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
-	return cl->loadFile(aFile);
+	Vic * cl = (Vic *)aClassPtr;
+	return cl->getModel();
 }
 }
 
 
-int WavStream_loadFileToMem(void * aClassPtr, File * aFile)
+void Vic_setRegister(void * aClassPtr, int reg, unsigned char value)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
-	return cl->loadFileToMem(aFile);
+	Vic * cl = (Vic *)aClassPtr;
+	cl->setRegister(reg, value);
 }
 }
 
 
-double WavStream_getLength(void * aClassPtr)
+unsigned char Vic_getRegister(void * aClassPtr, int reg)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
-	return cl->getLength();
+	Vic * cl = (Vic *)aClassPtr;
+	return cl->getRegister(reg);
 }
 }
 
 
-void WavStream_setVolume(void * aClassPtr, float aVolume)
+void Vic_setVolume(void * aClassPtr, float aVolume)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->setVolume(aVolume);
 	cl->setVolume(aVolume);
 }
 }
 
 
-void WavStream_setLooping(void * aClassPtr, int aLoop)
+void Vic_setLooping(void * aClassPtr, int aLoop)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->setLooping(!!aLoop);
 	cl->setLooping(!!aLoop);
 }
 }
 
 
-void WavStream_setAutoStop(void * aClassPtr, int aAutoStop)
+void Vic_setAutoStop(void * aClassPtr, int aAutoStop)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->setAutoStop(!!aAutoStop);
 	cl->setAutoStop(!!aAutoStop);
 }
 }
 
 
-void WavStream_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+void Vic_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
 }
 }
 
 
-void WavStream_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+void Vic_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
 }
 }
 
 
-void WavStream_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+void Vic_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dDopplerFactor(aDopplerFactor);
 	cl->set3dDopplerFactor(aDopplerFactor);
 }
 }
 
 
-void WavStream_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+void Vic_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dListenerRelative(!!aListenerRelative);
 	cl->set3dListenerRelative(!!aListenerRelative);
 }
 }
 
 
-void WavStream_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+void Vic_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 	cl->set3dDistanceDelay(!!aDistanceDelay);
 }
 }
 
 
-void WavStream_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+void Vic_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dCollider(aCollider);
 	cl->set3dCollider(aCollider);
 }
 }
 
 
-void WavStream_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+void Vic_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dCollider(aCollider, aUserData);
 	cl->set3dCollider(aCollider, aUserData);
 }
 }
 
 
-void WavStream_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+void Vic_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->set3dAttenuator(aAttenuator);
 	cl->set3dAttenuator(aAttenuator);
 }
 }
 
 
-void WavStream_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+void Vic_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
 }
 }
 
 
-void WavStream_setLoopPoint(void * aClassPtr, double aLoopPoint)
+void Vic_setLoopPoint(void * aClassPtr, double aLoopPoint)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->setLoopPoint(aLoopPoint);
 	cl->setLoopPoint(aLoopPoint);
 }
 }
 
 
-double WavStream_getLoopPoint(void * aClassPtr)
+double Vic_getLoopPoint(void * aClassPtr)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	return cl->getLoopPoint();
 	return cl->getLoopPoint();
 }
 }
 
 
-void WavStream_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+void Vic_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->setFilter(aFilterId, aFilter);
 	cl->setFilter(aFilterId, aFilter);
 }
 }
 
 
-void WavStream_stop(void * aClassPtr)
+void Vic_stop(void * aClassPtr)
 {
 {
-	WavStream * cl = (WavStream *)aClassPtr;
+	Vic * cl = (Vic *)aClassPtr;
 	cl->stop();
 	cl->stop();
 }
 }
 
 

+ 171 - 0
soloud.mod/soloud/src/c_api/soloud_c_ay.cpp

@@ -0,0 +1,171 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
+/*
+SoLoud audio engine
+Copyright (c) 2013-2020 Jari Komppa
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+   2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+
+   3. This notice may not be removed or altered from any source
+   distribution.
+*/
+
+/* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
+
+#include "../include/soloud.h"
+#include "../include/soloud_ay.h"
+
+using namespace SoLoud;
+
+extern "C"
+{
+
+void Ay_destroy(void * aClassPtr)
+{
+  delete (Ay *)aClassPtr;
+}
+
+void * Ay_create()
+{
+  return (void *)new Ay;
+}
+
+int Ay_load(void * aClassPtr, const char * aFilename)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	return cl->load(aFilename);
+}
+
+int Ay_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	return cl->loadMem(aMem, aLength, false, true);
+}
+
+int Ay_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
+}
+
+int Ay_loadFile(void * aClassPtr, File * aFile)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	return cl->loadFile(aFile);
+}
+
+void Ay_setVolume(void * aClassPtr, float aVolume)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void Ay_setLooping(void * aClassPtr, int aLoop)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void Ay_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void Ay_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void Ay_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void Ay_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void Ay_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void Ay_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void Ay_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void Ay_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void Ay_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void Ay_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void Ay_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double Ay_getLoopPoint(void * aClassPtr)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void Ay_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+void Ay_stop(void * aClassPtr)
+{
+	Ay * cl = (Ay *)aClassPtr;
+	cl->stop();
+}
+
+} // extern "C"
+

+ 249 - 0
soloud.mod/soloud/src/c_api/soloud_c_bus.cpp

@@ -0,0 +1,249 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
+/*
+SoLoud audio engine
+Copyright (c) 2013-2020 Jari Komppa
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+   2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+
+   3. This notice may not be removed or altered from any source
+   distribution.
+*/
+
+/* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
+
+#include "../include/soloud.h"
+#include "../include/soloud_bus.h"
+
+using namespace SoLoud;
+
+extern "C"
+{
+
+void Bus_destroy(void * aClassPtr)
+{
+  delete (Bus *)aClassPtr;
+}
+
+void * Bus_create()
+{
+  return (void *)new Bus;
+}
+
+void Bus_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+unsigned int Bus_play(void * aClassPtr, AudioSource * aSound)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->play(*aSound);
+}
+
+unsigned int Bus_playEx(void * aClassPtr, AudioSource * aSound, float aVolume, float aPan, int aPaused)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->play(*aSound, aVolume, aPan, !!aPaused);
+}
+
+unsigned int Bus_playClocked(void * aClassPtr, double aSoundTime, AudioSource * aSound)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->playClocked(aSoundTime, *aSound);
+}
+
+unsigned int Bus_playClockedEx(void * aClassPtr, double aSoundTime, AudioSource * aSound, float aVolume, float aPan)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->playClocked(aSoundTime, *aSound, aVolume, aPan);
+}
+
+unsigned int Bus_play3d(void * aClassPtr, AudioSource * aSound, float aPosX, float aPosY, float aPosZ)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->play3d(*aSound, aPosX, aPosY, aPosZ);
+}
+
+unsigned int Bus_play3dEx(void * aClassPtr, AudioSource * aSound, float aPosX, float aPosY, float aPosZ, float aVelX, float aVelY, float aVelZ, float aVolume, int aPaused)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->play3d(*aSound, aPosX, aPosY, aPosZ, aVelX, aVelY, aVelZ, aVolume, !!aPaused);
+}
+
+unsigned int Bus_play3dClocked(void * aClassPtr, double aSoundTime, AudioSource * aSound, float aPosX, float aPosY, float aPosZ)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->play3dClocked(aSoundTime, *aSound, aPosX, aPosY, aPosZ);
+}
+
+unsigned int Bus_play3dClockedEx(void * aClassPtr, double aSoundTime, AudioSource * aSound, float aPosX, float aPosY, float aPosZ, float aVelX, float aVelY, float aVelZ, float aVolume)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->play3dClocked(aSoundTime, *aSound, aPosX, aPosY, aPosZ, aVelX, aVelY, aVelZ, aVolume);
+}
+
+int Bus_setChannels(void * aClassPtr, unsigned int aChannels)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->setChannels(aChannels);
+}
+
+void Bus_setVisualizationEnable(void * aClassPtr, int aEnable)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setVisualizationEnable(!!aEnable);
+}
+
+void Bus_annexSound(void * aClassPtr, unsigned int aVoiceHandle)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->annexSound(aVoiceHandle);
+}
+
+float * Bus_calcFFT(void * aClassPtr)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->calcFFT();
+}
+
+float * Bus_getWave(void * aClassPtr)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->getWave();
+}
+
+float Bus_getApproximateVolume(void * aClassPtr, unsigned int aChannel)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->getApproximateVolume(aChannel);
+}
+
+unsigned int Bus_getActiveVoiceCount(void * aClassPtr)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->getActiveVoiceCount();
+}
+
+unsigned int Bus_getResampler(void * aClassPtr)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->getResampler();
+}
+
+void Bus_setResampler(void * aClassPtr, unsigned int aResampler)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setResampler(aResampler);
+}
+
+void Bus_setVolume(void * aClassPtr, float aVolume)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void Bus_setLooping(void * aClassPtr, int aLoop)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void Bus_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void Bus_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void Bus_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void Bus_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void Bus_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void Bus_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void Bus_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void Bus_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void Bus_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void Bus_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void Bus_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double Bus_getLoopPoint(void * aClassPtr)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void Bus_stop(void * aClassPtr)
+{
+	Bus * cl = (Bus *)aClassPtr;
+	cl->stop();
+}
+
+} // extern "C"
+

+ 183 - 0
soloud.mod/soloud/src/c_api/soloud_c_monotone.cpp

@@ -0,0 +1,183 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
+/*
+SoLoud audio engine
+Copyright (c) 2013-2020 Jari Komppa
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+   2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+
+   3. This notice may not be removed or altered from any source
+   distribution.
+*/
+
+/* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
+
+#include "../include/soloud.h"
+#include "../include/soloud_monotone.h"
+
+using namespace SoLoud;
+
+extern "C"
+{
+
+void Monotone_destroy(void * aClassPtr)
+{
+  delete (Monotone *)aClassPtr;
+}
+
+void * Monotone_create()
+{
+  return (void *)new Monotone;
+}
+
+int Monotone_setParams(void * aClassPtr, int aHardwareChannels)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	return cl->setParams(aHardwareChannels);
+}
+
+int Monotone_setParamsEx(void * aClassPtr, int aHardwareChannels, int aWaveform)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	return cl->setParams(aHardwareChannels, aWaveform);
+}
+
+int Monotone_load(void * aClassPtr, const char * aFilename)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	return cl->load(aFilename);
+}
+
+int Monotone_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	return cl->loadMem(aMem, aLength);
+}
+
+int Monotone_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
+}
+
+int Monotone_loadFile(void * aClassPtr, File * aFile)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	return cl->loadFile(aFile);
+}
+
+void Monotone_setVolume(void * aClassPtr, float aVolume)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void Monotone_setLooping(void * aClassPtr, int aLoop)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void Monotone_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void Monotone_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void Monotone_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void Monotone_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void Monotone_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void Monotone_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void Monotone_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void Monotone_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void Monotone_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void Monotone_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void Monotone_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double Monotone_getLoopPoint(void * aClassPtr)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void Monotone_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+void Monotone_stop(void * aClassPtr)
+{
+	Monotone * cl = (Monotone *)aClassPtr;
+	cl->stop();
+}
+
+} // extern "C"
+

+ 159 - 0
soloud.mod/soloud/src/c_api/soloud_c_noise.cpp

@@ -0,0 +1,159 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
+/*
+SoLoud audio engine
+Copyright (c) 2013-2020 Jari Komppa
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+   2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+
+   3. This notice may not be removed or altered from any source
+   distribution.
+*/
+
+/* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
+
+#include "../include/soloud.h"
+#include "../include/soloud_noise.h"
+
+using namespace SoLoud;
+
+extern "C"
+{
+
+void Noise_destroy(void * aClassPtr)
+{
+  delete (Noise *)aClassPtr;
+}
+
+void * Noise_create()
+{
+  return (void *)new Noise;
+}
+
+void Noise_setOctaveScale(void * aClassPtr, float aOct0, float aOct1, float aOct2, float aOct3, float aOct4, float aOct5, float aOct6, float aOct7, float aOct8, float aOct9)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setOctaveScale(aOct0, aOct1, aOct2, aOct3, aOct4, aOct5, aOct6, aOct7, aOct8, aOct9);
+}
+
+void Noise_setType(void * aClassPtr, int aType)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setType(aType);
+}
+
+void Noise_setVolume(void * aClassPtr, float aVolume)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void Noise_setLooping(void * aClassPtr, int aLoop)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void Noise_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void Noise_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void Noise_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void Noise_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void Noise_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void Noise_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void Noise_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void Noise_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void Noise_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void Noise_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void Noise_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double Noise_getLoopPoint(void * aClassPtr)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void Noise_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+void Noise_stop(void * aClassPtr)
+{
+	Noise * cl = (Noise *)aClassPtr;
+	cl->stop();
+}
+
+} // extern "C"
+

+ 14 - 3
modloader.mod/openmptloader.cpp → soloud.mod/soloud/src/c_api/soloud_c_openmpt.cpp

@@ -1,3 +1,8 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
 /*
 /*
 SoLoud audio engine
 SoLoud audio engine
 Copyright (c) 2013-2020 Jari Komppa
 Copyright (c) 2013-2020 Jari Komppa
@@ -24,9 +29,8 @@ freely, subject to the following restrictions:
 
 
 /* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
 /* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
 
 
-#include "../soloud.mod/soloud/src/../include/soloud.h"
-#include "../soloud.mod/soloud/src/../include/soloud_audiosource.h"
-#include "../soloud.mod/soloud/src/../include/soloud_openmpt.h"
+#include "../include/soloud.h"
+#include "../include/soloud_openmpt.h"
 
 
 using namespace SoLoud;
 using namespace SoLoud;
 
 
@@ -163,5 +167,12 @@ void Openmpt_stop(void * aClassPtr)
 	cl->stop();
 	cl->stop();
 }
 }
 
 
+double Openmpt_getLength(void * aClassPtr)
+{
+	Openmpt * cl = (Openmpt *)aClassPtr;
+	return cl->getLength();
+}
+
+
 } // extern "C"
 } // extern "C"
 
 

+ 183 - 0
soloud.mod/soloud/src/c_api/soloud_c_queue.cpp

@@ -0,0 +1,183 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
+/*
+SoLoud audio engine
+Copyright (c) 2013-2020 Jari Komppa
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+   2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+
+   3. This notice may not be removed or altered from any source
+   distribution.
+*/
+
+/* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
+
+#include "../include/soloud.h"
+#include "../include/soloud_queue.h"
+
+using namespace SoLoud;
+
+extern "C"
+{
+
+void Queue_destroy(void * aClassPtr)
+{
+  delete (Queue *)aClassPtr;
+}
+
+void * Queue_create()
+{
+  return (void *)new Queue;
+}
+
+int Queue_play(void * aClassPtr, AudioSource * aSound)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	return cl->play(*aSound);
+}
+
+unsigned int Queue_getQueueCount(void * aClassPtr)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	return cl->getQueueCount();
+}
+
+int Queue_isCurrentlyPlaying(void * aClassPtr, AudioSource * aSound)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	return cl->isCurrentlyPlaying(*aSound);
+}
+
+int Queue_setParamsFromAudioSource(void * aClassPtr, AudioSource * aSound)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	return cl->setParamsFromAudioSource(*aSound);
+}
+
+int Queue_setParams(void * aClassPtr, float aSamplerate)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	return cl->setParams(aSamplerate);
+}
+
+int Queue_setParamsEx(void * aClassPtr, float aSamplerate, unsigned int aChannels)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	return cl->setParams(aSamplerate, aChannels);
+}
+
+void Queue_setVolume(void * aClassPtr, float aVolume)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void Queue_setLooping(void * aClassPtr, int aLoop)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void Queue_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void Queue_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void Queue_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void Queue_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void Queue_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void Queue_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void Queue_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void Queue_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void Queue_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void Queue_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void Queue_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double Queue_getLoopPoint(void * aClassPtr)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void Queue_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+void Queue_stop(void * aClassPtr)
+{
+	Queue * cl = (Queue *)aClassPtr;
+	cl->stop();
+}
+
+} // extern "C"
+

+ 153 - 0
soloud.mod/soloud/src/c_api/soloud_c_vizsn.cpp

@@ -0,0 +1,153 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
+/*
+SoLoud audio engine
+Copyright (c) 2013-2020 Jari Komppa
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+   2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+
+   3. This notice may not be removed or altered from any source
+   distribution.
+*/
+
+/* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
+
+#include "../include/soloud.h"
+#include "../include/soloud_vizsn.h"
+
+using namespace SoLoud;
+
+extern "C"
+{
+
+void Vizsn_destroy(void * aClassPtr)
+{
+  delete (Vizsn *)aClassPtr;
+}
+
+void * Vizsn_create()
+{
+  return (void *)new Vizsn;
+}
+
+void Vizsn_setText(void * aClassPtr, char * aText)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->setText(aText);
+}
+
+void Vizsn_setVolume(void * aClassPtr, float aVolume)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void Vizsn_setLooping(void * aClassPtr, int aLoop)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void Vizsn_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void Vizsn_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void Vizsn_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void Vizsn_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void Vizsn_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void Vizsn_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void Vizsn_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void Vizsn_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void Vizsn_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void Vizsn_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void Vizsn_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double Vizsn_getLoopPoint(void * aClassPtr)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void Vizsn_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+void Vizsn_stop(void * aClassPtr)
+{
+	Vizsn * cl = (Vizsn *)aClassPtr;
+	cl->stop();
+}
+
+} // extern "C"
+

+ 409 - 0
soloud.mod/soloud/src/c_api/soloud_c_wav.cpp

@@ -0,0 +1,409 @@
+/* **************************************************
+ *  WARNING: this is a generated file. Do not edit. *
+ *  Any edits will be overwritten by the generator. *
+ ************************************************** */
+
+/*
+SoLoud audio engine
+Copyright (c) 2013-2020 Jari Komppa
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+   1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would be
+   appreciated but is not required.
+
+   2. Altered source versions must be plainly marked as such, and must not be
+   misrepresented as being the original software.
+
+   3. This notice may not be removed or altered from any source
+   distribution.
+*/
+
+/* SoLoud C-Api Code Generator (c)2013-2020 Jari Komppa http://iki.fi/sol/ */
+
+#include "../include/soloud.h"
+#include "../include/soloud_wav.h"
+#include "../include/soloud_waveshaperfilter.h"
+#include "../include/soloud_wavstream.h"
+
+using namespace SoLoud;
+
+extern "C"
+{
+
+void Wav_destroy(void * aClassPtr)
+{
+  delete (Wav *)aClassPtr;
+}
+
+void * Wav_create()
+{
+  return (void *)new Wav;
+}
+
+int Wav_load(void * aClassPtr, const char * aFilename)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->load(aFilename);
+}
+
+int Wav_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadMem(aMem, aLength);
+}
+
+int Wav_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
+}
+
+int Wav_loadFile(void * aClassPtr, File * aFile)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadFile(aFile);
+}
+
+int Wav_loadRawWave8(void * aClassPtr, unsigned char * aMem, unsigned int aLength)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadRawWave8(aMem, aLength);
+}
+
+int Wav_loadRawWave8Ex(void * aClassPtr, unsigned char * aMem, unsigned int aLength, float aSamplerate, unsigned int aChannels)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadRawWave8(aMem, aLength, aSamplerate, aChannels);
+}
+
+int Wav_loadRawWave16(void * aClassPtr, short * aMem, unsigned int aLength)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadRawWave16(aMem, aLength);
+}
+
+int Wav_loadRawWave16Ex(void * aClassPtr, short * aMem, unsigned int aLength, float aSamplerate, unsigned int aChannels)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadRawWave16(aMem, aLength, aSamplerate, aChannels);
+}
+
+int Wav_loadRawWave(void * aClassPtr, float * aMem, unsigned int aLength)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadRawWave(aMem, aLength);
+}
+
+int Wav_loadRawWaveEx(void * aClassPtr, float * aMem, unsigned int aLength, float aSamplerate, unsigned int aChannels, int aCopy, int aTakeOwnership)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->loadRawWave(aMem, aLength, aSamplerate, aChannels, !!aCopy, !!aTakeOwnership);
+}
+
+double Wav_getLength(void * aClassPtr)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->getLength();
+}
+
+void Wav_setVolume(void * aClassPtr, float aVolume)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void Wav_setLooping(void * aClassPtr, int aLoop)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void Wav_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void Wav_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void Wav_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void Wav_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void Wav_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void Wav_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void Wav_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void Wav_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void Wav_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void Wav_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void Wav_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double Wav_getLoopPoint(void * aClassPtr)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void Wav_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+void Wav_stop(void * aClassPtr)
+{
+	Wav * cl = (Wav *)aClassPtr;
+	cl->stop();
+}
+
+void WaveShaperFilter_destroy(void * aClassPtr)
+{
+  delete (WaveShaperFilter *)aClassPtr;
+}
+
+int WaveShaperFilter_setParams(void * aClassPtr, float aAmount)
+{
+	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
+	return cl->setParams(aAmount);
+}
+
+void * WaveShaperFilter_create()
+{
+  return (void *)new WaveShaperFilter;
+}
+
+int WaveShaperFilter_getParamCount(void * aClassPtr)
+{
+	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
+	return cl->getParamCount();
+}
+
+const char * WaveShaperFilter_getParamName(void * aClassPtr, unsigned int aParamIndex)
+{
+	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
+	return cl->getParamName(aParamIndex);
+}
+
+unsigned int WaveShaperFilter_getParamType(void * aClassPtr, unsigned int aParamIndex)
+{
+	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
+	return cl->getParamType(aParamIndex);
+}
+
+float WaveShaperFilter_getParamMax(void * aClassPtr, unsigned int aParamIndex)
+{
+	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
+	return cl->getParamMax(aParamIndex);
+}
+
+float WaveShaperFilter_getParamMin(void * aClassPtr, unsigned int aParamIndex)
+{
+	WaveShaperFilter * cl = (WaveShaperFilter *)aClassPtr;
+	return cl->getParamMin(aParamIndex);
+}
+
+void WavStream_destroy(void * aClassPtr)
+{
+  delete (WavStream *)aClassPtr;
+}
+
+void * WavStream_create()
+{
+  return (void *)new WavStream;
+}
+
+int WavStream_load(void * aClassPtr, const char * aFilename)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->load(aFilename);
+}
+
+int WavStream_loadMem(void * aClassPtr, const unsigned char * aData, unsigned int aDataLen)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->loadMem(aData, aDataLen);
+}
+
+int WavStream_loadMemEx(void * aClassPtr, const unsigned char * aData, unsigned int aDataLen, int aCopy, int aTakeOwnership)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->loadMem(aData, aDataLen, !!aCopy, !!aTakeOwnership);
+}
+
+int WavStream_loadToMem(void * aClassPtr, const char * aFilename)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->loadToMem(aFilename);
+}
+
+int WavStream_loadFile(void * aClassPtr, File * aFile)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->loadFile(aFile);
+}
+
+int WavStream_loadFileToMem(void * aClassPtr, File * aFile)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->loadFileToMem(aFile);
+}
+
+double WavStream_getLength(void * aClassPtr)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->getLength();
+}
+
+void WavStream_setVolume(void * aClassPtr, float aVolume)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->setVolume(aVolume);
+}
+
+void WavStream_setLooping(void * aClassPtr, int aLoop)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->setLooping(!!aLoop);
+}
+
+void WavStream_setAutoStop(void * aClassPtr, int aAutoStop)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->setAutoStop(!!aAutoStop);
+}
+
+void WavStream_set3dMinMaxDistance(void * aClassPtr, float aMinDistance, float aMaxDistance)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dMinMaxDistance(aMinDistance, aMaxDistance);
+}
+
+void WavStream_set3dAttenuation(void * aClassPtr, unsigned int aAttenuationModel, float aAttenuationRolloffFactor)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dAttenuation(aAttenuationModel, aAttenuationRolloffFactor);
+}
+
+void WavStream_set3dDopplerFactor(void * aClassPtr, float aDopplerFactor)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dDopplerFactor(aDopplerFactor);
+}
+
+void WavStream_set3dListenerRelative(void * aClassPtr, int aListenerRelative)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dListenerRelative(!!aListenerRelative);
+}
+
+void WavStream_set3dDistanceDelay(void * aClassPtr, int aDistanceDelay)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dDistanceDelay(!!aDistanceDelay);
+}
+
+void WavStream_set3dCollider(void * aClassPtr, AudioCollider * aCollider)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dCollider(aCollider);
+}
+
+void WavStream_set3dColliderEx(void * aClassPtr, AudioCollider * aCollider, int aUserData)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dCollider(aCollider, aUserData);
+}
+
+void WavStream_set3dAttenuator(void * aClassPtr, AudioAttenuator * aAttenuator)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->set3dAttenuator(aAttenuator);
+}
+
+void WavStream_setInaudibleBehavior(void * aClassPtr, int aMustTick, int aKill)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->setInaudibleBehavior(!!aMustTick, !!aKill);
+}
+
+void WavStream_setLoopPoint(void * aClassPtr, double aLoopPoint)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->setLoopPoint(aLoopPoint);
+}
+
+double WavStream_getLoopPoint(void * aClassPtr)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	return cl->getLoopPoint();
+}
+
+void WavStream_setFilter(void * aClassPtr, unsigned int aFilterId, Filter * aFilter)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->setFilter(aFilterId, aFilter);
+}
+
+void WavStream_stop(void * aClassPtr)
+{
+	WavStream * cl = (WavStream *)aClassPtr;
+	cl->stop();
+}
+
+} // extern "C"
+

+ 7 - 0
soloud.mod/source.bmx

@@ -59,6 +59,13 @@ Import "soloud/src/filter/soloud_robotizefilter.cpp"
 Import "soloud/src/filter/soloud_waveshaperfilter.cpp"
 Import "soloud/src/filter/soloud_waveshaperfilter.cpp"
 
 
 ' c api
 ' c api
+Import "soloud/src/c_api/soloud_c_ay.cpp"
+Import "soloud/src/c_api/soloud_c_bus.cpp"
+Import "soloud/src/c_api/soloud_c_monotone.cpp"
+Import "soloud/src/c_api/soloud_c_noise.cpp"
+Import "soloud/src/c_api/soloud_c_queue.cpp"
+Import "soloud/src/c_api/soloud_c_vizsn.cpp"
+Import "soloud/src/c_api/soloud_c_wav.cpp"
 Import "soloud/src/c_api/soloud_c.cpp"
 Import "soloud/src/c_api/soloud_c.cpp"
 
 
 ' backend - alsa
 ' backend - alsa

+ 6 - 5
soloudminiaudio.mod/glue.cpp

@@ -12,24 +12,25 @@ namespace SoLoud {
 
 
 }
 }
 
 
-ma_context * _bmx_ma_context = 0;
+extern ma_context * _so_ma_context;
 
 
 extern "C" {
 extern "C" {
 
 
 void bmx_soloud_miniaudio_context_deinit() {
 void bmx_soloud_miniaudio_context_deinit() {
-	ma_context_uninit(_bmx_ma_context);
+	ma_context_uninit(_so_ma_context);
+	_so_ma_context = 0;
 }
 }
 
 
 void bmx_soloud_miniaudio_context_init(ma_backend backend) {
 void bmx_soloud_miniaudio_context_init(ma_backend backend) {
-	if (_bmx_ma_context) {
+	if (_so_ma_context) {
 		bmx_soloud_miniaudio_context_deinit();
 		bmx_soloud_miniaudio_context_deinit();
 	} else {
 	} else {
-		_bmx_ma_context = (ma_context*)malloc(sizeof(ma_context));
+		_so_ma_context = (ma_context*)malloc(sizeof(ma_context));
 	}
 	}
 	
 	
 	ma_backend backends[] = { backend };
 	ma_backend backends[] = { backend };
 	
 	
-	ma_context_init(backends, 1, NULL, _bmx_ma_context);
+	ma_context_init(backends, 1, NULL, _so_ma_context);
 }
 }
 
 
 
 

Some files were not shown because too many files changed in this diff