2021-05-11 20:08:08 +00:00
|
|
|
#include "taAudio.h"
|
|
|
|
|
|
|
|
void TAAudio::setSampleRateChangeCallback(void (*callback)(SampleRateChangeEvent)) {
|
|
|
|
sampleRateChanged=callback;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TAAudio::setBufferSizeChangeCallback(void (*callback)(BufferSizeChangeEvent)) {
|
|
|
|
bufferSizeChanged=callback;
|
|
|
|
}
|
|
|
|
|
2021-05-12 08:58:55 +00:00
|
|
|
void TAAudio::setCallback(void (*callback)(void*,float**,float**,int,int,unsigned int), void* user) {
|
2021-05-11 20:08:08 +00:00
|
|
|
audioProcCallback=callback;
|
2021-05-12 08:58:55 +00:00
|
|
|
audioProcCallbackUser=user;
|
2021-05-11 20:08:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void* TAAudio::getContext() {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TAAudio::quit() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TAAudio::setRun(bool run) {
|
|
|
|
running=run;
|
|
|
|
return running;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool TAAudio::init(TAAudioDesc& request, TAAudioDesc& response) {
|
2022-01-23 04:50:49 +00:00
|
|
|
response=request;
|
|
|
|
return true;
|
2022-01-17 06:20:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TAAudio::~TAAudio() {
|
2021-05-11 20:08:08 +00:00
|
|
|
}
|