Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: media/audio/audio_util.h

Issue 6002005: Implement renderer AudioDevice API for low-latency audio output... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/renderer_webkitclient_impl.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_util.h
===================================================================
--- media/audio/audio_util.h (revision 70546)
+++ media/audio/audio_util.h (working copy)
@@ -5,6 +5,8 @@
#ifndef MEDIA_AUDIO_AUDIO_UTIL_H_
#define MEDIA_AUDIO_AUDIO_UTIL_H_
+#include <vector>
+
#include "base/basictypes.h"
namespace media {
@@ -62,6 +64,16 @@
int bytes_per_sample,
size_t number_of_frames);
+// InterleaveFloatToInt16 scales, clips, and interleaves the planar
+// floating-point audio contained in |source| to the int16 |destination|.
+// The floating-point data is in a canonical range of -1.0 -> +1.0.
+// The size of the |source| vector determines the number of channels.
+// The |destination| buffer is assumed to be large enough to hold the
+// result. Thus it must be at least size: number_of_frames * source.size()
+void InterleaveFloatToInt16(const std::vector<float*>& source,
+ int16* destination,
+ size_t number_of_frames);
+
} // namespace media
#endif // MEDIA_AUDIO_AUDIO_UTIL_H_
« no previous file with comments | « chrome/renderer/renderer_webkitclient_impl.cc ('k') | media/audio/audio_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698