summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResampler.h
Commit message (Collapse)AuthorAgeFilesLines
* Change references of Q19.12 to Q4.27 for clarityAndy Hung2014-04-021-1/+1
| | | | | Change-Id: I5beb7daf6ff9bc123ff3582f7c294edcaf8652f6 Signed-off-by: Andy Hung <hunga@google.com>
* Fix resampler to allow output of single frameAndy Hung2014-02-191-0/+32
| | | | | | Bug: 13073201 Change-Id: If7818a3389a191a37277bbd8e96a59ef8ce68509 Signed-off-by: Andy Hung <hunga@google.com>
* Fix clang warnings in AudioFlingerGlenn Kasten2014-02-101-1/+1
| | | | Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
* Audio resampler update to add S16 filtersAndy Hung2013-12-271-0/+3
| | | | | | | | | | | | This does not affect the existing resamplers. New resampler accessed through additional quality settings: DYN_LOW_QUALITY = 5 DYN_MED_QUALITY = 6 DYN_HIGH_QUALITY = 7 Change-Id: Iebbd31871e808a4a6dee3f3abfd7e9dcf77c48e1 Signed-off-by: Andy Hung <hunga@google.com>
* Add resampler comments and fix a typoGlenn Kasten2013-07-301-0/+8
| | | | Change-Id: Ie071673875f663de4212eed4a4dff89d51a5a915
* make libaudioflinger symbols visibility hiddenMathias Agopian2013-05-091-1/+2
| | | | | | | we export only symbols needed by clients of this library. this saves about 130KB (1/3rd of the lib size) Change-Id: Id81f3ecb299ee3abc0811915cf6efe87180bf15c
* Integrate improved coefficient sinc resampler: VHQGlenn Kasten2012-10-041-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Very high quality is enabled only for 44.1 -> 48 or 48 -> 44.1, and uses low quality for all other use cases. Track estimated CPU load and throttles the quality based on load; as currently configured it should allow up to 2 instances of very high quality. Medium quality and high quality are currently disabled unless explicitly requested. Details: Only load .so the first time it is needed. Cleanup code style: formatting, indentation, whitespace. Restore medium quality resampler, but it is not used (see next line). Fix memory leak for sinc resampler. Check sample rate in resampler constructor. Add logs for debugging. Rename DEFAULT to DEFAULT_QUALITY for consistency with other quality levels. Renumber VERY_HIGH_QUALITY from 255 to 4. Use enum src_quality consistently. Improve parsing of property af.resampler.quality. Fix reentrancy bug - allow an instance of high quality and an instance of very high quality to both be active concurrently. Bug: 7229644 Change-Id: I0ce6b913b05038889f50462a38830b61a602a9f7
* audioflinger: use resample coefficients from audio-resampler library.SathishKumar Mani2012-09-261-1/+2
| | | | | | | | | | | -Add a separate quality VERY_HIGH_QUALITY in resampler -Use resample coefficients audio-resampler library for quality VERY_HIGH_QUALITY. -This improves the quality of resampled output. Bug: 7024293 Change-Id: Ia44142413bed5f5963d7eab7846eec877a2415e4 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Move libnbaio out of AudioFlingerGlenn Kasten2012-08-301-1/+1
| | | | | | | | | | libnbaio is now a separate shared library from AudioFlinger, rather than a static library used only by AudioFlinger. AudioBufferProvider interface is now also independent of AudioFlinger, moved to include/media/ Change-Id: I9bb62ffbc38d42a38b0af76e66da5e9ab1e0e21b
* Whitespace and indentationGlenn Kasten2012-03-131-1/+1
| | | | | | | | | | | | | | Fix indentation to be multiple of 4. Make it easier to search: sp< not sp < to "switch (...)" instead of "switch(...)" (also "if" and "while") Remove redundant blank line at start or EOF. Remove whitespace at end of line. Remove extra blank lines where they don't add value. Use git diff -b or -w to verify. Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
* Upintegrate Audio Flinger changes from ICS_AAHJohn Grossman2012-02-161-0/+8
| | | | | | | | Bring in changes to audio flinger made to support timed audio tracks and HW master volume control. Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae Signed-off-by: John Grossman <johngro@google.com>
* Mark fields const if only set in constructorGlenn Kasten2012-02-091-3/+3
| | | | Change-Id: Iacd06bb9efaf708cf965033be1f2297b58f7f75c
* Merge "AudioFlinger methods const and inline"Glenn Kasten2012-02-081-1/+1
|\
| * AudioFlinger methods const and inlineGlenn Kasten2012-02-031-1/+1
| | | | | | | | | | | | This saves 1063 bytes and probably improves performance. Change-Id: I11cf0dfd925fbaec75e3d1b806852a538eae5518
* | Remove dead codeGlenn Kasten2012-02-031-2/+0
|/ | | | | | | | mFormat is unused in resampler mClientTid is unused local variable pid is unused in dump Change-Id: Ib156e38029366620bfeff2a13e73471867155a5b
* audioflinger: fix clicks on 48kHz audio.Eric Laurent2011-12-221-0/+1
| | | | | | | | | | | | | | | 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
* Fix issue 3479042.Eric Laurent2011-02-281-0/+2
| | | | | | | | | | | | | | | | The problem is that when an AudioRecord using the resampler is restarted, the resampler state is not reset (as there is no reset function in the resampler). The consequence is that the first time the record thread loop runs, it calls the resampler which consumes the remaining data in the input buffer and when this buffer is released the input index is incremented over the limit. The fix consists in implementing a reset function in the resampler. A similar problem was also present for playback but unoticed because the track buffer is always drained by the mixer when a track stops. The only problem for playback was that the initial phase fraction was wrong when restarting a track after stop (it was correct after a pause). Change-Id: Ifc2585d685f4402d29f4afc63f6efd1d69265de3
* move native services under services/Mathias Agopian2010-07-141-0/+93
moved surfaceflinger, audioflinger, cameraservice all native services should now reside in this location. Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8