diff options
Diffstat (limited to 'extern/audaspace/bindings/C')
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Sound.cpp | 16 | ||||
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Sound.h | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/extern/audaspace/bindings/C/AUD_Sound.cpp b/extern/audaspace/bindings/C/AUD_Sound.cpp index 1f40f5c608b..00a59f4c67f 100644 --- a/extern/audaspace/bindings/C/AUD_Sound.cpp +++ b/extern/audaspace/bindings/C/AUD_Sound.cpp @@ -32,6 +32,7 @@ #include "fx/Limiter.h" #include "fx/Loop.h" #include "fx/Lowpass.h" +#include "fx/Modulator.h" #include "fx/Pitch.h" #include "fx/Reverse.h" #include "fx/Sum.h" @@ -465,6 +466,21 @@ AUD_API AUD_Sound* AUD_Sound_lowpass(AUD_Sound* sound, float frequency, float Q) } } +AUD_API AUD_Sound* AUD_Sound_modulate(AUD_Sound* first, AUD_Sound* second) +{ + assert(first); + assert(second); + + try + { + return new AUD_Sound(new Modulator(*first, *second)); + } + catch(Exception&) + { + return nullptr; + } +} + AUD_API AUD_Sound* AUD_Sound_pitch(AUD_Sound* sound, float factor) { assert(sound); diff --git a/extern/audaspace/bindings/C/AUD_Sound.h b/extern/audaspace/bindings/C/AUD_Sound.h index b18e3c3a8eb..66d6c53cc37 100644 --- a/extern/audaspace/bindings/C/AUD_Sound.h +++ b/extern/audaspace/bindings/C/AUD_Sound.h @@ -247,6 +247,14 @@ extern AUD_API AUD_Sound* AUD_Sound_loop(AUD_Sound* sound, int count); extern AUD_API AUD_Sound* AUD_Sound_lowpass(AUD_Sound* sound, float frequency, float Q); /** + * Modulates two sound, which means multiplying the sound samples. + * \param first The first sound. + * \param second The second sound. + * \return A handle of the modulated sound. + */ +extern AUD_API AUD_Sound* AUD_Sound_modulate(AUD_Sound* first, AUD_Sound* second); + +/** * Changes the pitch of a sound. * \param sound The sound to change. * \param factor The factor to change the pitch with. |