diff options
author | Glenn Kasten <gkasten@google.com> | 2013-07-30 11:52:39 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-07-30 12:01:03 -0700 |
commit | 34af02647b387a252fb02bab8e2cb9f7bd9c8abb (patch) | |
tree | 2e2e6f24d984884746c91704fb054e00e38e5ff0 /services/audioflinger/AudioResampler.h | |
parent | 39a60318dcd78b2cb406d2c7dba57cbe9c99c3e7 (diff) | |
download | frameworks_av-34af02647b387a252fb02bab8e2cb9f7bd9c8abb.zip frameworks_av-34af02647b387a252fb02bab8e2cb9f7bd9c8abb.tar.gz frameworks_av-34af02647b387a252fb02bab8e2cb9f7bd9c8abb.tar.bz2 |
Add resampler comments and fix a typo
Change-Id: Ie071673875f663de4212eed4a4dff89d51a5a915
Diffstat (limited to 'services/audioflinger/AudioResampler.h')
-rw-r--r-- | services/audioflinger/AudioResampler.h | 8 |
1 files changed, 8 insertions, 0 deletions
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; |