ABSTRACT

Passing an audio signal between two disparate threads or systems is often a difficult, overwrought process, often implemented with bespoke buffering mechanisms that are difficult to maintain and impossible to extend. In this chapter, we implement useful objects for routing audio signals: a PatchInput class we can push audio to and a PatchOutput class we can pull audio from. We also propose classes for mixing down inputs from multiple threads and splitting a single input into outputs on multiple threads. This allows us to create a useful abstraction for audio routing that allows programmers to easily patch audio signals around their application without having to worry about the internal buffering mechanisms involved.