From afb25dbb64a4f21f00416d4ac7f83e633b7953b4 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 27 Dec 2022 01:00:04 -0500 Subject: [PATCH] Revise doc comments for audio::Device methods. --- include/audio.hpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/audio.hpp b/include/audio.hpp index a4941baa..6ec0ab77 100644 --- a/include/audio.hpp +++ b/include/audio.hpp @@ -114,13 +114,24 @@ struct Device { /** Sets the block size of the device, re-opening it if needed. */ virtual void setBlockSize(int blockSize) {} - // Called by Driver::subscribe(). + /** Adds Port to set of subscribed Ports. + Called by Driver::subscribe(). + */ virtual void subscribe(Port* port); + /** Removes Port from set of subscribed Ports. + Called by Driver::unsubscribe(). + */ virtual void unsubscribe(Port* port); - // Called by this Device class, forwards to subscribed Ports. + /** Processes audio for each subscribed Port. + Called by driver code. + `input` and `output` must be non-overlapping. + Overwrites all `output`, so it is unnecessary to initialize. + */ void processBuffer(const float* input, int inputStride, float* output, int outputStride, int frames); + /** Called by driver code when stream starts. */ void onStartStream(); + /** Called by driver code when stream stops. */ void onStopStream(); };