diff options
author | Eric Laurent <elaurent@google.com> | 2011-12-22 16:08:41 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-12-22 16:08:41 -0800 |
commit | 071ccd5a9702500f3f7d62ef881300914926184d (patch) | |
tree | 2ffdfd9dbc064aa3d2a9b229f87b679220ef4f79 /services/audioflinger/AudioResampler.h | |
parent | 69aac3e6cd68e8c305a41b2677123db7662efd4b (diff) | |
download | frameworks_av-071ccd5a9702500f3f7d62ef881300914926184d.zip frameworks_av-071ccd5a9702500f3f7d62ef881300914926184d.tar.gz frameworks_av-071ccd5a9702500f3f7d62ef881300914926184d.tar.bz2 |
audioflinger: fix clicks on 48kHz audio.
The calculation done in prepareTracks_l() for the minimum amount
off frames needed to mix one output buffer had 2 issues:
- the additional sample needed for interpolation was not included
- the fact that the resampler does not acknowledge the frames consumed
immediately after each mixing round but only once all frames requested have been used
was not taken into account.
Thus the number of frames available in track buffer could be considered sufficient although
it was not and the resampler would abort producing a short silence perceived as a click.
Issue 5727099.
Change-Id: I7419847a7474c7d9f9170bedd0a636132262142c
Diffstat (limited to 'services/audioflinger/AudioResampler.h')
-rw-r--r-- | services/audioflinger/AudioResampler.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/services/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h index 9f06c1c..ffa690a 100644 --- a/services/audioflinger/AudioResampler.h +++ b/services/audioflinger/AudioResampler.h @@ -54,6 +54,7 @@ public: AudioBufferProvider* provider) = 0; virtual void reset(); + virtual size_t getUnreleasedFrames() { return mInputIndex; } protected: // number of bits for phase fraction - 30 bits allows nearly 2x downsampling |