From c6def587269eb2b6987b79138a0d9685e8382694 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 20 Jun 2025 18:27:38 +0200 Subject: [PATCH] add namespace and default values --- util/audio_buffer.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/util/audio_buffer.h b/util/audio_buffer.h index 4ebbdeb..bbbdf1f 100644 --- a/util/audio_buffer.h +++ b/util/audio_buffer.h @@ -1,8 +1,10 @@ #pragma once + #include #include #include +namespace trnr { template class audio_buffer { public: @@ -18,7 +20,7 @@ public: update_channel_ptrs(); } - audio_buffer(int channels, int frames) + audio_buffer(int channels = 1, int frames = 1024) : m_channels(channels) , m_frames(frames) , m_data(channels * frames) @@ -71,7 +73,9 @@ private: } std::vector m_data; + std::vector m_channel_ptrs; + int m_channels; int m_frames; // samples per channel - std::vector m_channel_ptrs; -}; \ No newline at end of file +}; +} // namespace trnr \ No newline at end of file