Skip to content

Commit

Permalink
Remove add_latency from resampling code, it's not used
Browse files Browse the repository at this point in the history
  • Loading branch information
padenot committed Oct 20, 2020
1 parent 2c385dc commit 1d66483
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/cubeb_resampler_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,6 @@ class cubeb_resampler_speex_one_way : public processor {
speex_resampler_destroy(speex_resampler);
}

/** Sometimes, it is necessary to add latency on one way of a two-way
* resampler so that the stream are synchronized. This must be called only on
* a fresh resampler, otherwise, silent samples will be inserted in the
* stream.
* @param frames the number of frames of latency to add. */
void add_latency(size_t frames)
{
additional_latency += frames;
resampling_in_buffer.push_silence(frames_to_samples(frames));
}

/* Fill the resampler with `input_frame_count` frames. */
void input(T * input_buffer, size_t input_frame_count)
{
Expand Down Expand Up @@ -414,13 +403,6 @@ class delay_line : public processor {
/* Fill the delay line with some silent frames to add latency. */
delay_input_buffer.push_silence(frames * channels);
}
/* Add some latency to the delay line.
* @param frames the number of frames of latency to add. */
void add_latency(size_t frames)
{
length += frames;
delay_input_buffer.push_silence(frames_to_samples(frames));
}
/** Push some frames into the delay line.
* @parameter buffer the frames to push.
* @parameter frame_count the number of frames in #buffer. */
Expand Down

0 comments on commit 1d66483

Please sign in to comment.