TAAE2: separation of module and engine

The issue that makes the current setup somewhat confusing is the fact that there are multiple shells or layers which do not seem to separate functionality, similar to how MVC is meant to separate the model from the view.

There is a module, which contains (or at least: connects to) a renderer, which itself contains a block. The audiocontroller combines several modules to render a result.

Normally I would think of the module as a controller object for the renderer, and the renderer controls the block. The separation that might result could for example allow:

option 1; a single engine in multiple modules:

renderEngine1

AudioController1
module1->rendererParameters = renderParameters1
module1->renderer = renderEngine1

AudioController2
module2->rendererParameters = renderParameters2
module2->renderer = renderEngine1

option 2: single parameters in multiple modules:

renderParameters1

AudioController1
module1->rendererParameters = renderParameters1
module1->renderer = renderEngine1

AudioController2
module2->rendererParameters = renderParameters1
module2->renderer = renderEngine2

A module then can become an abstract controller object who's functionality is determined by the renderEngine it is initialized with. The renderEngine can effectively be created by a plugin structure.

Otherwise I am still unclear on why there needs to be a separate renderer object.

Comments

  • @32BT said:
    There is a module, which contains (or at least: connects to) a renderer, which itself contains a block. The audiocontroller combines several modules to render a result.

    The module keeps a reference to the renderer so it can track rendering state changes (sample rate, most importantly), but the module is subordinate to the renderer, not the other way 'round.

    A module then can become an abstract controller object who's functionality is determined by the renderEngine it is initialized with. The renderEngine can effectively be created by a plugin structure.

    That's pretty much the architecture that exists, unless I'm misreading; the renderer drives the module through a general interface - the renderer is a client of the modules, which provide the audio processing functionality.

    Otherwise I am still unclear on why there needs to be a separate renderer object.

    The renderer is the top-level driver of the system, coordinating modules together. It takes the place of AEAudioController in TAAE1, roughly.

Sign In or Register to comment.