aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChris Robinson <chris.kcat@gmail.com>2022-11-13 14:10:15 -0800
committerChris Robinson <chris.kcat@gmail.com>2022-11-13 14:10:15 -0800
commitc45843964bc461cbf5f99ec651bd8c07fbb14b35 (patch)
tree72e3195a02f4847e507d788c582418b03b67ac88 /core
parent156f3b6ff5e1e686c8b8f6584a6a1625dcc5c365 (diff)
Change a function to a static method
Diffstat (limited to 'core')
-rw-r--r--core/converter.cpp2
-rw-r--r--core/converter.h7
2 files changed, 4 insertions, 5 deletions
diff --git a/core/converter.cpp b/core/converter.cpp
index 69e0d8dd..75c37149 100644
--- a/core/converter.cpp
+++ b/core/converter.cpp
@@ -156,7 +156,7 @@ void Multi2Mono(uint chanmask, const size_t step, const float scale, float *REST
} // namespace
-SampleConverterPtr CreateSampleConverter(DevFmtType srcType, DevFmtType dstType, size_t numchans,
+SampleConverterPtr SampleConverter::Create(DevFmtType srcType, DevFmtType dstType, size_t numchans,
uint srcRate, uint dstRate, Resampler resampler)
{
if(numchans < 1 || srcRate < 1 || dstRate < 1)
diff --git a/core/converter.h b/core/converter.h
index d3a4da08..b6ff3ba5 100644
--- a/core/converter.h
+++ b/core/converter.h
@@ -45,14 +45,13 @@ struct SampleConverter {
return SampleOffset{(prep<<MixerFracBits) + mFracOffset};
}
+ static std::unique_ptr<SampleConverter> Create(DevFmtType srcType, DevFmtType dstType,
+ size_t numchans, uint srcRate, uint dstRate, Resampler resampler);
+
DEF_FAM_NEWDEL(SampleConverter, mChan)
};
using SampleConverterPtr = std::unique_ptr<SampleConverter>;
-SampleConverterPtr CreateSampleConverter(DevFmtType srcType, DevFmtType dstType, size_t numchans,
- uint srcRate, uint dstRate, Resampler resampler);
-
-
struct ChannelConverter {
DevFmtType mSrcType{};
uint mSrcStep{};