X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=resampler.h;h=85fea837a8d1cf5aae3a8861506919017184f1ca;hb=02083dca89292d6ba95642cf8957f1cee8826313;hp=aa7af3dd3feff07fe600d3c2b12dc99af751b228;hpb=4c974bd99c5730bf891f21cf905f585b2e4591f0;p=nageru diff --git a/resampler.h b/resampler.h index aa7af3d..85fea83 100644 --- a/resampler.h +++ b/resampler.h @@ -50,7 +50,7 @@ public: // Note: pts is always in seconds. void add_input_samples(double pts, const float *samples, ssize_t num_samples); - void get_output_samples(double pts, float *samples, ssize_t num_samples); + bool get_output_samples(double pts, float *samples, ssize_t num_samples); // Returns false if underrun. private: void init_loop_filter(double bandwidth_hz); @@ -80,7 +80,7 @@ private: // How much delay we are expected to have, in input samples. // If actual delay drifts too much away from this, we will start // changing the resampling ratio to compensate. - double expected_delay = 1600.0; + double expected_delay = 4800.0; // Input samples not yet fed into the resampler. // TODO: Use a circular buffer instead, for efficiency.