diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-05-01 21:36:04 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-05-08 12:16:21 +0200 |
commit | 42953944da1261584d56405128c6eb3c0e9e7da0 (patch) | |
tree | 1f150ce606457a0bea5647374e0719ecd9646f01 /src/chresampler.cc | |
parent | f8feb953c6d86bee12747679e5e4dac7795a65d0 (diff) |
The last loader thread stuff.
Diffstat (limited to 'src/chresampler.cc')
-rw-r--r-- | src/chresampler.cc | 9 |
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; |