newsAdvanced Gtk+ Sequencer - News


Refactor GSequencer's recalls - the ags-fx engine

Item posted by Joël Krähemann <jkraehemann> on Sun 03 May 2020 12:08:19 AM UTC.

The new recall implementations are beloved to improve performance and increased comprehensibility of the code.
Going away from atomic design with dependencies to feature rich standalone effect processors. Putting all things together with AgsSoundScope as introduced in version 2.0.x ...

The ags/audio/ags_sound_enums.h header file

Minimize dynamic memory allocation during playback, very intuitive extensible API to basic recalls like: ags-fx-notation, ags-fx-pattern, ags-fx-playback.
Check out here for more:

The ags/audio/fx directory

I am just about to replace the existing atomic recalls with the optimized recalls. The dispatcher probably sees additions and make it programmable stages. Still some work left to do, see you!

A programmable staging dispatcher

The threads shall get a vector specifying which staging flags to run, see AgsSoundStagingFlags. The following threads are affected:

Might be we do a specialized staging function to handle special needs for effects only using AgsRecall::run-inter(). This would be only to AgsAudio instruments limited AgsRecall::run-pre() like:

Current recall implementation does pre and post staging on every AgsAudio and AgsChannel. On the opposite the new fx recall implementation runs only ::run-inter(). With different tree iteration strategy.

All recalls replaced

The new fx recall engine provides feature rich effect processors. Isolated and entire in its implementation. The old recall implementation has got somehow messy with the dependencies.

GSequencer's fx brings you less dynamic memory allocation during playback and feeding audio data on the run. I put big hope in it to retrieve better performance.

Improved plugin recalls

Since `gsequencer` does instantiate plugins per scope it brings you many advantages without breaking any current principles.

Better factory function

The new factory function is declared like so:

ags_fx_factory_create(AgsAudio *audio,
                      AgsRecallContainer *play_container, AgsRecallContainer *recall_container,
                      gchar *plugin_name,
                      gchar *filename,
                      gchar *effect,
                      guint start_audio_channel, guint stop_audio_channel,
                      guint start_pad, guint stop_pad,
                      gint position,
                      guint create_flags, guint recall_flags)

The new signature has got a filename and effect parameter to identify plugins. Further position uses the new functions:

I really like the new code which was easy to write and doing unit-tests.

by Joël

Back to the top

Powered by Savane 3.13-3cd0.
Corresponding source code