mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-29 17:49:14 -04:00
Use CaptureConfig to share state between cores.
Remove awful FIFO_HACK. TODO: Lots of repeated code... TODO: Capture thread is signalled too frequently.
This commit is contained in:
parent
67eb62ec12
commit
d5e21ce972
12 changed files with 82 additions and 29 deletions
|
@ -32,18 +32,12 @@
|
|||
|
||||
class StreamInput {
|
||||
public:
|
||||
StreamInput(const size_t K) :
|
||||
StreamInput(const size_t K, CaptureConfig& config) :
|
||||
K { K },
|
||||
data { std::make_unique<uint8_t[]>(1UL << K) },
|
||||
fifo { data.get(), K }
|
||||
{
|
||||
// TODO: Send stream creation message.
|
||||
shared_memory.FIFO_HACK = &fifo;
|
||||
}
|
||||
|
||||
~StreamInput() {
|
||||
// TODO: Send stream distruction message.
|
||||
shared_memory.FIFO_HACK = nullptr;
|
||||
config.fifo = &fifo;
|
||||
}
|
||||
|
||||
size_t write(const void* const data, const size_t length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue