Index: content/renderer/media/audio_track_recorder.cc |
diff --git a/content/renderer/media/audio_track_recorder.cc b/content/renderer/media/audio_track_recorder.cc |
index dea0c3deb144de9e57f2676863df2e53c75979a0..e3241d445c6196bce73358c2a137c15eccdd3a53 100644 |
--- a/content/renderer/media/audio_track_recorder.cc |
+++ b/content/renderer/media/audio_track_recorder.cc |
@@ -77,15 +77,9 @@ bool DoEncode(OpusEncoder* opus_encoder, |
// Interleaves |audio_bus| channels() of floats into a single output linear |
// |buffer|. |
-// TODO(mcasas) https://crbug.com/580391 use AudioBus::ToInterleavedFloat(). |
void ToInterleaved(media::AudioBus* audio_bus, float* buffer) { |
- for (int ch = 0; ch < audio_bus->channels(); ++ch) { |
- const float* src = audio_bus->channel(ch); |
- const float* const src_end = src + audio_bus->frames(); |
- float* dest = buffer + ch; |
- for (; src < src_end; ++src, dest += audio_bus->channels()) |
- *dest = *src; |
- } |
+ audio_bus->ToInterleavedFloat(0, 0, audio_bus->frames(), |
mcasas
2016/03/09 00:24:18
Please inline this call and remove ToInterleave()
eklavyamirani
2016/03/15 03:48:13
Done.
|
+ audio_bus->channels(), buffer); |
} |
} // anonymous namespace |