Chromium Code Reviews| Index: media/audio/audio_util.h |
| =================================================================== |
| --- media/audio/audio_util.h (revision 68541) |
| +++ media/audio/audio_util.h (working copy) |
| @@ -6,6 +6,7 @@ |
| #define MEDIA_AUDIO_AUDIO_UTIL_H_ |
| #include "base/basictypes.h" |
| +#include "media/ffmpeg/ffmpeg_common.h" |
| namespace media { |
| @@ -49,6 +50,19 @@ |
| int bytes_per_sample, |
| float volume); |
| +// DeinterleaveAudioChannel() takes interleaved audio buffer |source| |
| +// of the given |sample_fmt| and |number_of_channels| and extracts |
| +// |number_of_frames| data for the given |channel_index| and |
| +// puts it in the floating point |destination|. |
| +// It returns |true| on success, or |false| if the |sample_fmt| is |
| +// not recognized. |
| +bool DeinterleaveAudioChannel(void* source, |
| + float* destination, |
| + AVSampleFormat sample_fmt, |
|
scherkus (not reviewing)
2010/12/11 02:31:12
similar to the other functions you should remove t
Chris Rogers
2010/12/13 20:25:27
Done.
|
| + size_t number_of_channels, |
|
scherkus (not reviewing)
2010/12/11 02:31:12
for the sake of API consistency I'd recommend we r
Chris Rogers
2010/12/13 20:25:27
Done.
|
| + unsigned channel_index, |
| + unsigned number_of_frames); |
| + |
| } // namespace media |
| #endif // MEDIA_AUDIO_AUDIO_UTIL_H_ |