AudiClean
|
#include <SoxReader.h>
Public Member Functions | |
bool | Open (int rate, int nchans, std::string globalopts, std::string fileopts, std::string filename) |
std::thread * | Start (int rate, int nchans, std::string globalopts, std::string fileopts, std::string filename) |
void | ForceStop () |
void | Run () |
int | GetNumChannels () |
int | GetSampleRate () |
void | SetOn (bool val) |
![]() | |
void | RegisterCallback (SampleCallback *scb) |
void | NextSample (double next) |
Additional Inherited Members | |
![]() | |
SampleCallback * | sampleCallback = nullptr |
A pipeline element which allows samples to be piped from the SoX program.
void SoxReader::ForceStop | ( | ) |
Brute-force stop the SoxReader, will attempt to close the pipe and join the worker thread.
int SoxReader::GetNumChannels | ( | ) |
Gets the nr of channels in the audio file to open
int SoxReader::GetSampleRate | ( | ) |
Gets the sample rate of the audio file to open
bool SoxReader::Open | ( | int | rate, |
int | nchan, | ||
std::string | globalopts, | ||
std::string | fileopts, | ||
std::string | filename | ||
) |
Open the pipe from SoX
rate | |
nchan | |
globalopts | |
fileopts | |
filename |
void SoxReader::Run | ( | ) |
Work function for the worker thread, reads samples from the SoX pipe, processes them and passes on to the next pipeline element. Continues while isOn is set and the end of the pipe is not reached.
void SoxReader::SetOn | ( | bool | val | ) |
Sets the isOn status of the SoxReader
val |
std::thread * SoxReader::Start | ( | int | rate, |
int | nchan, | ||
std::string | globalopts, | ||
std::string | fileopts, | ||
std::string | filename | ||
) |
Starts reading from the pipe from SoX, returns a thread which lives as long as the pipe does
rate | |
nchan | |
globalopts | |
fileopts | |
filename |