Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_coding / neteq / audio_multi_vector.cc
index 5a208a6..b19eef9 100644 (file)
@@ -57,10 +57,10 @@ void AudioMultiVector::Zeros(size_t length) {
   }
 }
 
-void AudioMultiVector::CopyFrom(AudioMultiVector* copy_to) const {
+void AudioMultiVector::CopyTo(AudioMultiVector* copy_to) const {
   if (copy_to) {
     for (size_t i = 0; i < num_channels_; ++i) {
-      channels_[i]->CopyFrom(&(*copy_to)[i]);
+      channels_[i]->CopyTo(&(*copy_to)[i]);
     }
   }
 }
@@ -202,6 +202,12 @@ bool AudioMultiVector::Empty() const {
   return channels_[0]->Empty();
 }
 
+void AudioMultiVector::CopyChannel(size_t from_channel, size_t to_channel) {
+  assert(from_channel < num_channels_);
+  assert(to_channel < num_channels_);
+  channels_[from_channel]->CopyTo(channels_[to_channel]);
+}
+
 const AudioVector& AudioMultiVector::operator[](size_t index) const {
   return *(channels_[index]);
 }