From 870f44a51bf0da553b412b9aa59b61b6849a424c Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 9 Mar 2017 19:07:07 +0100 Subject: [PATCH] File Sink: added more sample rates --- plugins/samplesink/filesink/filesinkgui.cpp | 5 +++-- plugins/samplesink/filesink/filesinkgui.h | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/samplesink/filesink/filesinkgui.cpp b/plugins/samplesink/filesink/filesinkgui.cpp index df7694d99..1cc9d225f 100644 --- a/plugins/samplesink/filesink/filesinkgui.cpp +++ b/plugins/samplesink/filesink/filesinkgui.cpp @@ -339,8 +339,9 @@ void FileSinkGui::tick() } } -unsigned int FileSinkSampleRates::m_rates[] = {32, 48, 64, 72, 128, 192, 256, 288, 300, 384, 512, 1000}; -unsigned int FileSinkSampleRates::m_nb_rates = 12; +const unsigned int FileSinkSampleRates::m_nb_rates = 17; +const unsigned int FileSinkSampleRates::m_rates[FileSinkSampleRates::m_nb_rates] = { + 32, 48, 64, 72, 128, 192, 256, 288, 300, 384, 512, 1000, 2000, 3000, 4000, 5000, 6000}; unsigned int FileSinkSampleRates::getRate(unsigned int rate_index) { diff --git a/plugins/samplesink/filesink/filesinkgui.h b/plugins/samplesink/filesink/filesinkgui.h index 259ab5f27..9c4e99abf 100644 --- a/plugins/samplesink/filesink/filesinkgui.h +++ b/plugins/samplesink/filesink/filesinkgui.h @@ -92,9 +92,8 @@ public: static unsigned int getRate(unsigned int rate_index); static unsigned int getRateIndex(unsigned int rate); static unsigned int getNbRates(); -private: - static unsigned int m_rates[12]; - static unsigned int m_nb_rates; + static const unsigned int m_nb_rates; + static const unsigned int m_rates[]; }; #endif // INCLUDE_FILESINKGUI_H