2021-05-11 16:08:08 -04:00
|
|
|
#include "taAudio.h"
|
2021-05-28 16:25:55 -04:00
|
|
|
#include <SDL.h>
|
2021-05-11 16:08:08 -04:00
|
|
|
|
|
|
|
class TAAudioSDL: public TAAudio {
|
|
|
|
SDL_AudioSpec ac, ar;
|
|
|
|
SDL_AudioDeviceID ai;
|
2022-02-13 21:42:57 -05:00
|
|
|
bool audioSysStarted;
|
2021-05-11 16:08:08 -04:00
|
|
|
|
|
|
|
public:
|
|
|
|
void onProcess(unsigned char* buf, int nframes);
|
|
|
|
|
|
|
|
void* getContext();
|
|
|
|
bool quit();
|
|
|
|
bool setRun(bool run);
|
2022-02-13 21:42:57 -05:00
|
|
|
std::vector<String> listAudioDevices();
|
2021-05-11 16:08:08 -04:00
|
|
|
bool init(TAAudioDesc& request, TAAudioDesc& response);
|
2022-02-13 21:42:57 -05:00
|
|
|
TAAudioSDL():
|
|
|
|
audioSysStarted(false) {}
|
2021-05-11 16:08:08 -04:00
|
|
|
};
|