Krotos Modules 3
Loading...
Searching...
No Matches
krotos::SignalSaver Class Reference

Add this to an AudioProcessor to save a signal as a .wav for analysis. More...

#include <SignalSaver.h>

Inheritance diagram for krotos::SignalSaver:

Public Member Functions

 SignalSaver (const String &path, int numChannels, int64 numSamples, double sampleRate)
 
void process (AudioBuffer< float > buffer)
 
void process (const float *const *buffer, int blockSize)
 
void handleAsyncUpdate () override
 

Private Attributes

const int m_numChannels
 
const int64 m_length
 
int64 m_counter
 
const File m_file
 
std::unique_ptr< AudioFormatWriter > m_writer
 
std::vector< float > m_data
 

Detailed Description

Add this to an AudioProcessor to save a signal as a .wav for analysis.

Constructor & Destructor Documentation

◆ SignalSaver()

krotos::SignalSaver::SignalSaver ( const String & path,
int numChannels,
int64 numSamples,
double sampleRate )
inline

Member Function Documentation

◆ handleAsyncUpdate()

void krotos::SignalSaver::handleAsyncUpdate ( )
inlineoverride

◆ process() [1/2]

void krotos::SignalSaver::process ( AudioBuffer< float > buffer)
inline

◆ process() [2/2]

void krotos::SignalSaver::process ( const float *const * buffer,
int blockSize )
inline

Member Data Documentation

◆ m_counter

int64 krotos::SignalSaver::m_counter
private

◆ m_data

std::vector<float> krotos::SignalSaver::m_data
private

◆ m_file

const File krotos::SignalSaver::m_file
private

◆ m_length

const int64 krotos::SignalSaver::m_length
private

◆ m_numChannels

const int krotos::SignalSaver::m_numChannels
private

◆ m_writer

std::unique_ptr<AudioFormatWriter> krotos::SignalSaver::m_writer
private

The documentation for this class was generated from the following file: