OSDN Git Service

audio utils: fix resampler frame count calculation
authorEric Laurent <elaurent@google.com>
Mon, 28 Nov 2011 18:57:39 +0000 (10:57 -0800)
committerEric Laurent <elaurent@google.com>
Mon, 28 Nov 2011 18:57:39 +0000 (10:57 -0800)
commitcdde1970f4f80034b9f2b23bf43a0b28372867a1
tree5bb8c37417c44127cc9446ed5214bd56bc974c70
parentb236f37b9e5302c47497b64a5dcee539acf90e94
audio utils: fix resampler frame count calculation

The calculation of the number of input frames needed by
resampler_resample_from_provider() for a given number of output frames
is broken. The consequence is that we request too many frames when upsampling
causing unecessary buffering and delay and too few frames when downsampling causing
more calls to provider->get_next_buffer() than necessary.

Change-Id: I74b6a1708f347f45ca3c12312bf1b47320823742
audio_utils/resampler.c