From 34af02647b387a252fb02bab8e2cb9f7bd9c8abb Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Tue, 30 Jul 2013 11:52:39 -0700 Subject: Add resampler comments and fix a typo Change-Id: Ie071673875f663de4212eed4a4dff89d51a5a915 --- services/audioflinger/AudioResampler.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'services/audioflinger/AudioResampler.h') diff --git a/services/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h index 29dc5b6..33e64ce 100644 --- a/services/audioflinger/AudioResampler.h +++ b/services/audioflinger/AudioResampler.h @@ -56,6 +56,14 @@ public: // set the PTS of the next buffer output by the resampler virtual void setPTS(int64_t pts); + // 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 signed Q19.12. + // 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, AudioBufferProvider* provider) = 0; -- cgit v1.1