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

Unified Diff: webrtc/modules/audio_coding/neteq/tools/audio_loop.h

Issue 1418423010: Pass audio to AudioEncoder::Encode() in an ArrayView (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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
Index: webrtc/modules/audio_coding/neteq/tools/audio_loop.h
diff --git a/webrtc/modules/audio_coding/neteq/tools/audio_loop.h b/webrtc/modules/audio_coding/neteq/tools/audio_loop.h
index a897ee5aef87889ba50b6a83cbc4afbc07d95f43..14e20f68ac09d0d64ff6fe23b8eae99808ae0d65 100644
--- a/webrtc/modules/audio_coding/neteq/tools/audio_loop.h
+++ b/webrtc/modules/audio_coding/neteq/tools/audio_loop.h
@@ -13,6 +13,7 @@
#include <string>
+#include "webrtc/base/array_view.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/typedefs.h"
@@ -40,10 +41,9 @@ class AudioLoop {
bool Init(const std::string file_name, size_t max_loop_length_samples,
size_t block_length_samples);
- // Returns a pointer to the next block of audio. The number given as
- // |block_length_samples| to the Init() function determines how many samples
- // that can be safely read from the pointer.
- const int16_t* GetNextBlock();
+ // Returns a (pointer,size) pair for the next block of audio. The size is
+ // equal to the |block_length_samples| Init() argument.
+ rtc::ArrayView<const int16_t> GetNextBlock();
private:
size_t next_index_;

Powered by Google App Engine
This is Rietveld 408576698