The combination of the AeonWave C++ class buffer management code and XML encoded AAXS files, which can define filters and effects, makes it simple to add a complete set of filters and effects to emitters and audio-frames.
To play one of the AeonWave supplied preset effect files for example the following code is sufficient. The buffer function automatically adds the prefix based on APP_DATA_DIR and adds the .aaxs file extension.
aax::AeonWave aax(AAX_MODE_WRITE_STEREO); aax.set(AAX_INITIALIZED); aax.set(AAX_PLAYING); aax::Buffer& buffer = aax.buffer("effects/nature/crickets"); aax::Emitter emitter(AAX_STEREO); emitter.add(buffer); emitter.set(AAX_PLAYING); aax.add(emitter); do { sleep(1); } while (emitter.state() == AAX_PLAYING);
aax::Param gain = 1.0f; emitter.tie(gain, AAX_VOLUME_FILTER, AAX_GAIN); float dt = 0.0f; do { sleep(1); dt += 1.0f; if (dt > 3.0f) gain = 0.5f; // automatically updates the filter } while (dt < 6.0f && emitter.state() == AAX_PLAYING);