mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-30 01:59:13 -04:00
Pass CaptureConfig to StreamInput as pointer.
This commit is contained in:
parent
ca5dadab93
commit
3e08318012
5 changed files with 8 additions and 8 deletions
|
@ -34,13 +34,13 @@ using namespace lpc43xx;
|
|||
|
||||
class StreamInput {
|
||||
public:
|
||||
StreamInput(CaptureConfig& config) :
|
||||
K { config.write_size_log2 + config.buffer_count_log2 },
|
||||
event_bytes_mask { (1UL << config.write_size_log2) - 1 },
|
||||
StreamInput(CaptureConfig* const config) :
|
||||
K { config->write_size_log2 + config->buffer_count_log2 },
|
||||
event_bytes_mask { (1UL << config->write_size_log2) - 1 },
|
||||
data { std::make_unique<uint8_t[]>(1UL << K) },
|
||||
fifo { data.get(), K }
|
||||
{
|
||||
config.fifo = &fifo;
|
||||
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