Chromium Code Reviews| 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(std::vector<float*> source, |
|
scherkus (not reviewing)
2011/01/12 03:11:43
can source be const ref?
const std::vector<float*>
Chris Rogers
2011/01/12 21:26:10
Yes, of course! --- FIXED
On 2011/01/12 03:11:43,
|
| + int16* destination, |
| + size_t number_of_frames); |
| + |
| } // namespace media |
| #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ |