Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/base/StarMixer.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-12 22:16:12 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-12 22:16:12 +1000
commit40223a5090bf8a502094927da39fc96a5cfd5eae (patch)
tree01fc797ad3f45879d132de3063fe1cab3f554835 /source/base/StarMixer.hpp
parentcf09616b1b241635dae0648c544b4e8ff3e2bd72 (diff)
Initial work
Diffstat (limited to 'source/base/StarMixer.hpp')
-rw-r--r--source/base/StarMixer.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/base/StarMixer.hpp b/source/base/StarMixer.hpp
index 079549f..d369cfb 100644
--- a/source/base/StarMixer.hpp
+++ b/source/base/StarMixer.hpp
@@ -95,6 +95,7 @@ private:
// Thread safe mixer class with basic effects support.
class Mixer {
public:
+ typedef function<void(int16_t* buffer, size_t frames, unsigned channels)> ExtraMixFunction;
typedef function<void(int16_t* buffer, size_t frames, unsigned channels)> EffectFunction;
typedef function<float(unsigned, Vec2F, float)> PositionalAttenuationFunction;
@@ -126,7 +127,7 @@ public:
// Reads pending audio data. This is thread safe with the other Mixer
// methods, but only one call to read may be active at a time.
- void read(int16_t* samples, size_t frameCount);
+ void read(int16_t* samples, size_t frameCount, ExtraMixFunction extraMixFunction = {});
// Call within the main loop of the program using Mixer, calculates
// positional attenuation of audio and does cleanup.