Renders an audio file through an audio graph then saves the output to another audio file.
More...
#include <OfflineGraphRenderer.hpp>
|
| OfflineGraphRenderer () |
|
void | processGraph (switchboard::AudioGraph &graph) |
| Renders an audio graph.
|
|
double | getMaxNumberOfSecondsToRender () const |
| Gets the maximum duration of the rendered audio data. The renderer will finish whenever it reads this many seconds from the input audio file or when it reaches the end of the input audio file.
|
|
void | setMaxNumberOfSecondsToRender (const double maxNumberOfSecondsToRender) |
| Sets the maximum number of seconds to render.
|
|
uint | getSampleRate () const |
| Gets the processing sample rate of the audio graph. SAMPLE_RATE_UNDEFINED means that the sample rate of the input audio file will be used. Default: SAMPLE_RATE_UNDEFINED.
|
|
void | setSampleRate (const uint sampleRate) |
| Sets the processing sample rate of the audio graph.
|
|
uint | getBufferDurationMs () const |
| Gets the duration of the audio buffers that will be used to process the audio graph. Default: 10 ms.
|
|
void | setBufferDurationMs (const uint bufferDurationMs) |
| Sets the duration of the audio buffers that will be used to process the audio graph.
|
|
void * | getUserPointer () const |
| Gets the pointer value that will be passed back in the callback functions as a parameter. Default: nullptr.
|
|
void | setUserPointer (void *userPointer) |
| Sets the pointer value that will be passed back in the callback functions as a parameter.
|
|
void | setProgressUpdateFunction (ProgressUpdateFunction progressUpdateFunction) |
| Sets the callback function that is called to report back the progress of the rendering process.
|
|
Renders an audio file through an audio graph then saves the output to another audio file.
OfflineGraphRenderer class.
◆ OfflineGraphRenderer()
switchboard::OfflineGraphRenderer::OfflineGraphRenderer |
( |
| ) |
|
◆ getBufferDurationMs()
uint switchboard::OfflineGraphRenderer::getBufferDurationMs |
( |
| ) |
const |
Gets the duration of the audio buffers that will be used to process the audio graph. Default: 10 ms.
- Returns
- The duration of the audio buffers in milliseconds.
◆ getMaxNumberOfSecondsToRender()
double switchboard::OfflineGraphRenderer::getMaxNumberOfSecondsToRender |
( |
| ) |
const |
Gets the maximum duration of the rendered audio data. The renderer will finish whenever it reads this many seconds from the input audio file or when it reaches the end of the input audio file.
- Returns
- The maximum number of seconds to render.
◆ getSampleRate()
uint switchboard::OfflineGraphRenderer::getSampleRate |
( |
| ) |
const |
Gets the processing sample rate of the audio graph. SAMPLE_RATE_UNDEFINED means that the sample rate of the input audio file will be used. Default: SAMPLE_RATE_UNDEFINED.
- Returns
- The processing sample rate of the audio graph.
◆ getUserPointer()
void * switchboard::OfflineGraphRenderer::getUserPointer |
( |
| ) |
const |
Gets the pointer value that will be passed back in the callback functions as a parameter. Default: nullptr.
- Returns
- The current user pointer.
◆ processGraph()
Renders an audio graph.
- Parameters
-
graph | The audio graph to render. |
◆ setBufferDurationMs()
void switchboard::OfflineGraphRenderer::setBufferDurationMs |
( |
const uint | bufferDurationMs | ) |
|
Sets the duration of the audio buffers that will be used to process the audio graph.
- Parameters
-
bufferDurationMs | The new duration of the audio buffers in milliseconds. |
◆ setMaxNumberOfSecondsToRender()
void switchboard::OfflineGraphRenderer::setMaxNumberOfSecondsToRender |
( |
const double | maxNumberOfSecondsToRender | ) |
|
Sets the maximum number of seconds to render.
- Parameters
-
maxNumberOfSecondsToRender | The new maximum number of seconds to render. |
◆ setProgressUpdateFunction()
void switchboard::OfflineGraphRenderer::setProgressUpdateFunction |
( |
ProgressUpdateFunction | progressUpdateFunction | ) |
|
Sets the callback function that is called to report back the progress of the rendering process.
- Parameters
-
progressUpdateFunction | The new progress update function. nullptr can be passed in the clear the currently set function. |
◆ setSampleRate()
void switchboard::OfflineGraphRenderer::setSampleRate |
( |
const uint | sampleRate | ) |
|
Sets the processing sample rate of the audio graph.
- Parameters
-
sampleRate | The new processing sample rate of the audio graph. |
◆ setUserPointer()
void switchboard::OfflineGraphRenderer::setUserPointer |
( |
void * | userPointer | ) |
|
Sets the pointer value that will be passed back in the callback functions as a parameter.
- Parameters
-
userPointer | The new user pointer. |