From 1895b4ee5d652e732f67a7b80284aeb82001c889 Mon Sep 17 00:00:00 2001 From: Thomas Harte <thomas.harte@gmail.com> Date: Mon, 12 Feb 2024 13:59:03 -0500 Subject: [PATCH] Remove empty implementation, the better for debugging. --- Machines/Electron/SoundGenerator.hpp | 2 +- Outputs/Speaker/Implementation/BufferSource.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Machines/Electron/SoundGenerator.hpp b/Machines/Electron/SoundGenerator.hpp index e787695ab..4699b9984 100644 --- a/Machines/Electron/SoundGenerator.hpp +++ b/Machines/Electron/SoundGenerator.hpp @@ -23,7 +23,7 @@ class SoundGenerator: public ::Outputs::Speaker::BufferSource<SoundGenerator, fa static constexpr unsigned int clock_rate_divider = 8; - // To satisfy ::SampleSource. + // For BufferSource. template <Outputs::Speaker::Action action> void apply_samples(std::size_t number_of_samples, Outputs::Speaker::MonoSample *target); void set_sample_volume_range(std::int16_t range); diff --git a/Outputs/Speaker/Implementation/BufferSource.hpp b/Outputs/Speaker/Implementation/BufferSource.hpp index 091f9f31e..da90dcba6 100644 --- a/Outputs/Speaker/Implementation/BufferSource.hpp +++ b/Outputs/Speaker/Implementation/BufferSource.hpp @@ -64,10 +64,12 @@ class BufferSource { /*! Should 'apply' the next @c number_of_samples to @c target ; application means applying @c action which can be achieved either via the - helper functions above — @c apply and @c fill — or by semantic inspection (primarily, if an obvious quick route for @c Action::Ignore is available) + helper functions above — @c apply and @c fill — or by semantic inspection (primarily, if an obvious quick route for @c Action::Ignore is available). + + No default implementation is provided. */ template <Action action> - void apply_samples([[maybe_unused]] std::size_t number_of_samples, [[maybe_unused]] typename SampleT<stereo>::type *target) {} + void apply_samples([[maybe_unused]] std::size_t number_of_samples, [[maybe_unused]] typename SampleT<stereo>::type *target); /*! @returns @c true if it is trivially true that a call to get_samples would just