summaryrefslogtreecommitdiffstats
path: root/media/base
diff options
context:
space:
mode:
authordalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-05 13:39:21 +0000
committerdalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-05 13:39:21 +0000
commitdfc48e4ce465db7e44e7cb7a4d2628958e1787a0 (patch)
treed387f8da52225eb08fe29d6bc17808d04739b26c /media/base
parent42e66e5f9dc55b57bfc95f8a49836fba59ad0cba (diff)
downloadchromium_src-dfc48e4ce465db7e44e7cb7a4d2628958e1787a0.zip
chromium_src-dfc48e4ce465db7e44e7cb7a4d2628958e1787a0.tar.gz
chromium_src-dfc48e4ce465db7e44e7cb7a4d2628958e1787a0.tar.bz2
Switch OnMoreData() to use AudioBus.
As titled, with this change we're now piping float data around the pipeline from end to end. This change is in preparation for browser side channel remixing and resampling. As a consequence of this change the shared memory now represents the contents of an AudioBus object, which is essentially audio data in a float planar format. BUG=114700 TEST=Should be no audible change. Ran all existing tests. Compiled ran WebAudio/HTML5/WebRTC on all platforms and PPAPI on Linux. Review URL: https://chromiumcodereview.appspot.com/10832285 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r--media/base/audio_bus.h3
-rw-r--r--media/base/limits.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/media/base/audio_bus.h b/media/base/audio_bus.h
index ea7e5f8..544f7cb 100644
--- a/media/base/audio_bus.h
+++ b/media/base/audio_bus.h
@@ -66,7 +66,8 @@ class MEDIA_EXPORT AudioBus {
void CopyTo(AudioBus* dest) const;
// Returns a raw pointer to the requested channel. Pointer is guaranteed to
- // have a 16-byte alignment.
+ // have a 16-byte alignment. Warning: Do not rely on having sane (i.e. not
+ // inf, nan, or between [-1.0, 1.0]) values in the channel data.
float* channel(int channel) { return channel_data_[channel]; }
const float* channel(int channel) const { return channel_data_[channel]; }
diff --git a/media/base/limits.h b/media/base/limits.h
index 2f5b801..e3b69a6 100644
--- a/media/base/limits.h
+++ b/media/base/limits.h
@@ -36,6 +36,8 @@ enum {
kMaxChannels = 32,
kMaxBitsPerSample = 64,
kMaxSamplesPerPacket = kMaxSampleRate,
+ kMaxPacketSizeInBytes =
+ (kMaxBitsPerSample / 8) * kMaxChannels * kMaxSamplesPerPacket,
};
} // namespace limits