summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResampler.h
diff options
context:
space:
mode:
authorAndy Hung <hunga@google.com>2015-03-29 00:49:22 -0700
committerAndy Hung <hunga@google.com>2015-04-08 14:31:58 -0700
commit6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec (patch)
tree1cec011ad26676dc9dc3eea778e18136c083e04f /services/audioflinger/AudioResampler.h
parent25f82752942b1c78aec8ee303d61afff85cff9d1 (diff)
downloadframeworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.zip
frameworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.tar.gz
frameworks_av-6b3b7e304e0f8f167241b2c75f1eb04a9ef192ec.tar.bz2
Return number of frames output from resample method
Change-Id: Ic297e2ed59839f1788c83e099ef1a9e4af29591f
Diffstat (limited to 'services/audioflinger/AudioResampler.h')
-rw-r--r--services/audioflinger/AudioResampler.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/services/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h
index 863614a..a8e3e6f 100644
--- a/services/audioflinger/AudioResampler.h
+++ b/services/audioflinger/AudioResampler.h
@@ -67,12 +67,18 @@ public:
// Resample int16_t samples from provider and accumulate into 'out'.
// A mono provider delivers a sequence of samples.
// A stereo provider delivers a sequence of interleaved pairs of samples.
- // Multi-channel providers are not supported.
+ //
// In either case, 'out' holds interleaved pairs of fixed-point Q4.27.
// That is, for a mono provider, there is an implicit up-channeling.
// Since this method accumulates, the caller is responsible for clearing 'out' initially.
- // FIXME assumes provider is always successful; it should return the actual frame count.
- virtual void resample(int32_t* out, size_t outFrameCount,
+ //
+ // For a float resampler, 'out' holds interleaved pairs of float samples.
+ //
+ // Multichannel interleaved frames for n > 2 is supported for quality DYN_LOW_QUALITY,
+ // DYN_MED_QUALITY, and DYN_HIGH_QUALITY.
+ //
+ // Returns the number of frames resampled into the out buffer.
+ virtual size_t resample(int32_t* out, size_t outFrameCount,
AudioBufferProvider* provider) = 0;
virtual void reset();