summaryrefslogtreecommitdiff
path: root/src/chresampler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/chresampler.cc')
-rw-r--r--src/chresampler.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/chresampler.cc b/src/chresampler.cc
index 5118d8f..d759d78 100644
--- a/src/chresampler.cc
+++ b/src/chresampler.cc
@@ -53,9 +53,7 @@ public:
};
CHResampler::CHResampler()
- : prv{std::make_unique<Prv>()}
- , input_fs{44100}
- , output_fs{44100}
+ : prv{std::make_unique<Prv>()}
{
#if defined(SRC)
prv->state = nullptr;
@@ -64,6 +62,11 @@ CHResampler::CHResampler()
void CHResampler::setup(double input_fs, double output_fs)
{
+ if((input_fs == 0.0) || (output_fs == 0.0))
+ {
+ return;
+ }
+
int nchan = 1; // always mono
this->input_fs = input_fs;