LancePutnam / Gamma

Generic (Sound) Synthesis Library
Other
458 stars 54 forks source link

Generalize Scheduler audio I/O data structure #20

Closed LancePutnam closed 11 years ago

LancePutnam commented 11 years ago

The Scheduler is currently designed around gam::AudioIOData for accessing sample buffers, frame rate, block size, etc. While this simplifies its use, it also makes it difficult to use with other frameworks using different audio I/O objects.

Can it be generalized for use with other systems without adding too much complexity?

olilarkin commented 11 years ago

yes please :+1:

LancePutnam commented 11 years ago

The scheduling system now uses a more generic data structure holding audio i/o data, SchedulerAudioIOData. Scheduler holds onto a SchedulerAudioIOData which it passes to all processes. Process was renamed to ProcessNode and replaces the old onProcess(...) with onProcessNode(SchedulerAudioIOData&).

Process is now templated on a gam::AudioIOData-like class. Therefore, where before you did

class MySynth :: public Process { ...

now you must do

class MySynth : public Process<gam::AudioIOData> { ...

Everything else works the same as before.