diff options
author | David Sorber <david.sorber@blacklynx.tech> | 2021-05-12 08:59:21 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-10-25 11:27:01 -0400 |
commit | 788827ae116bef871e144abd39b1e4482208eabe (patch) | |
tree | dcfee04a77db5bb3c8042be5b0b95c54bf8759c9 /gr-audio/lib/portaudio/portaudio_source.cc | |
parent | b8713810a2d07ac1a632bd7bfb23f3f48f67e222 (diff) |
runtime: Custom Buffer/Accelerator Device Support - Milestone 1
Custom Buffer/Accelerator Device Support - Milestone 1 changes:
* Refactored existing single mapped buffer code and created single
mapped buffer abstraction; wrapping within single mapped buffers
is handled explicitly by input blocked and output blocked
callbacks that are called from block_executor
* Added simple custom buffer allocation interface (NOTE: this
interface will change for milestone 2)
* Accelerated blocks are still responsible for data transfer but the
custom buffer interface eliminates the double copy problem
Signed-off-by: David Sorber <david.sorber@blacklynx.tech>
Diffstat (limited to 'gr-audio/lib/portaudio/portaudio_source.cc')
-rw-r--r-- | gr-audio/lib/portaudio/portaudio_source.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gr-audio/lib/portaudio/portaudio_source.cc b/gr-audio/lib/portaudio/portaudio_source.cc index 86a7f16b48..63a3d5e1ba 100644 --- a/gr-audio/lib/portaudio/portaudio_source.cc +++ b/gr-audio/lib/portaudio/portaudio_source.cc @@ -64,7 +64,8 @@ void portaudio_source::create_ringbuffer(void) (N_BUFFERS * bufsize_samples / d_input_parameters.channelCount)); // FYI, the buffer indices are in units of samples. - d_writer = gr::make_buffer(N_BUFFERS * bufsize_samples, sizeof(sample_t)); + d_writer = gr::make_buffer( + N_BUFFERS * bufsize_samples, sizeof(sample_t), N_BUFFERS * bufsize_samples); d_reader = gr::buffer_add_reader(d_writer, 0); } |