Browse Source

Revise doc comments for audio::Device methods.

tags/v2.2.2
Andrew Belt 1 year ago
parent
commit
afb25dbb64
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      include/audio.hpp

+ 13
- 2
include/audio.hpp View File

@@ -114,13 +114,24 @@ struct Device {
/** Sets the block size of the device, re-opening it if needed. */ /** Sets the block size of the device, re-opening it if needed. */
virtual void setBlockSize(int blockSize) {} 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); virtual void subscribe(Port* port);
/** Removes Port from set of subscribed Ports.
Called by Driver::unsubscribe().
*/
virtual void unsubscribe(Port* port); 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); void processBuffer(const float* input, int inputStride, float* output, int outputStride, int frames);
/** Called by driver code when stream starts. */
void onStartStream(); void onStartStream();
/** Called by driver code when stream stops. */
void onStopStream(); void onStopStream();
}; };




Loading…
Cancel
Save