mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-03 03:56:44 -04:00
Retain CaptureConfig pointer in StreamInput.
This commit is contained in:
parent
3e08318012
commit
d2cf129fd5
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,7 @@ using namespace lpc43xx;
|
||||||
class StreamInput {
|
class StreamInput {
|
||||||
public:
|
public:
|
||||||
StreamInput(CaptureConfig* const config) :
|
StreamInput(CaptureConfig* const config) :
|
||||||
|
config { config },
|
||||||
K { config->write_size_log2 + config->buffer_count_log2 },
|
K { config->write_size_log2 + config->buffer_count_log2 },
|
||||||
event_bytes_mask { (1UL << config->write_size_log2) - 1 },
|
event_bytes_mask { (1UL << config->write_size_log2) - 1 },
|
||||||
data { std::make_unique<uint8_t[]>(1UL << K) },
|
data { std::make_unique<uint8_t[]>(1UL << K) },
|
||||||
|
@ -60,6 +61,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
CaptureConfig* const config;
|
||||||
const size_t K;
|
const size_t K;
|
||||||
const uint64_t event_bytes_mask;
|
const uint64_t event_bytes_mask;
|
||||||
uint64_t bytes_written = 0;
|
uint64_t bytes_written = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue