Switchboard SDK
Loading...
Searching...
No Matches
switchboard::DiagnosticRecorderNode Class Reference

Records the last N seconds of incoming audio on , writes to file on diagnostic dump. More...

#include <DiagnosticRecorderNode.hpp>

Inheritance diagram for switchboard::DiagnosticRecorderNode:

Public Member Functions

SB_WASM DiagnosticRecorderNode (const uint sampleSeconds=30)
 Creates a DiagnosticRecorderNode instance.
 
bool dump (const std::string &recordingFilePath, Codec format, bool realtime=true)
 Writes the last N seconds of recorded audio to multiple files (one for each tap).
 
SB_WASM SingleBusAudioProcessorNode & createTap (const std::string &name)
 Creates and returns a new SingleBusAudioProcessorNode to be added in an audio graph as a recording tap.
 
SB_WASM bool setBusFormat (AudioBusFormat &inputBusFormat, AudioBusFormat &outputBusFormat) override
 
SB_WASM bool process (AudioBus &inBus, AudioBus &outBus) override
 

Detailed Description

Records the last N seconds of incoming audio on , writes to file on diagnostic dump.

DiagnosticRecorderNode class

Constructor & Destructor Documentation

◆ DiagnosticRecorderNode()

switchboard::DiagnosticRecorderNode::DiagnosticRecorderNode ( const uint sampleSeconds = 30)

Creates a DiagnosticRecorderNode instance.

Parameters
sampleSecondsThe amount of audio to keep in seconds.

Member Function Documentation

◆ createTap()

SingleBusAudioProcessorNode & switchboard::DiagnosticRecorderNode::createTap ( const std::string & name)

Creates and returns a new SingleBusAudioProcessorNode to be added in an audio graph as a recording tap.

Parameters
nameName that will be added to the recorded file name to identify the recording.
Returns
The new SingleBusAudioProcessorNode.

◆ dump()

bool switchboard::DiagnosticRecorderNode::dump ( const std::string & recordingFilePath,
Codec format,
bool realtime = true )

Writes the last N seconds of recorded audio to multiple files (one for each tap).

Parameters
recordingFilePathFinal recording file path without extension.
formatFinal recording file format.
realtimeIf true then sample accuracy is guaranteed for the different taps, but the containing graph must be running.
Returns
True if file operation was successful.