37 lines
680 B
C++
37 lines
680 B
C++
#include "Archimedes.h"
|
|
|
|
|
|
#include <SDL3/SDL.h>
|
|
#include <SDL3/SDL_audio.h>
|
|
|
|
class ChatClientVoice : public Archimedes::Module {
|
|
|
|
public:
|
|
|
|
ChatClientVoice(Archimedes::App* a, void* h);
|
|
|
|
ChatClientVoice() { name = "ChatClientVoice"; }
|
|
|
|
~ChatClientVoice();
|
|
|
|
void onLoad() override;
|
|
|
|
void run() override;
|
|
|
|
bool onEvent(const Archimedes::Event&) override;
|
|
|
|
private:
|
|
std::string messages = "";
|
|
bool open = true;
|
|
|
|
SDL_AudioSpec spec;
|
|
SDL_AudioStream *mic, *speaker;
|
|
|
|
const int len = 10 * 1024;
|
|
};
|
|
|
|
#ifdef CHATCLIENTVOICE_DYNAMIC
|
|
typedef ChatClientVoice mtype;
|
|
#include "endModule.h"
|
|
#endif
|