-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.hpp
More file actions
27 lines (23 loc) · 890 Bytes
/
plugin.hpp
File metadata and controls
27 lines (23 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#include "illixr/data_format/string_data.hpp"
#include "illixr/phonebook.hpp"
#include "illixr/plugin.hpp"
#include "illixr/switchboard.hpp"
#include "portaudio.h"
namespace ILLIXR {
class sr_plugin : public plugin {
public:
[[maybe_unused]] sr_plugin(const std::string& name, phonebook* pb);
void start() override;
~sr_plugin() override = default;
private:
const std::shared_ptr<switchboard> switchboard_;
switchboard::writer<data_format::string_data> transcript_publisher_;
int record();
};
static int recordCallback(const void* inputBuffer, void* /*outputBuffer*/,
unsigned long framesPerBuffer,
const PaStreamCallbackTimeInfo* /*timeInfo*/,
PaStreamCallbackFlags /*statusFlags*/,
void* userData);
} // namespace ILLIXR