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

Unified Diff: media/base/audio_pull_fifo.h

Issue 15394003: Remove extra memcpys from AudioPullFifo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix includes. Created 7 years, 7 months 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
« no previous file with comments | « media/base/audio_converter.cc ('k') | media/base/audio_pull_fifo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_pull_fifo.h
diff --git a/media/base/audio_pull_fifo.h b/media/base/audio_pull_fifo.h
index caf73e4caccb07f8a4a532566969760d1a447a28..338f9b4cb6ca32f5132e88e834be56140da54632 100644
--- a/media/base/audio_pull_fifo.h
+++ b/media/base/audio_pull_fifo.h
@@ -6,10 +6,10 @@
#define MEDIA_BASE_AUDIO_PULL_FIFO_H_
#include "base/callback.h"
-#include "media/base/audio_fifo.h"
#include "media/base/media_export.h"
namespace media {
+class AudioBus;
// A FIFO (First In First Out) buffer to handle mismatches in buffer sizes
// between a producer and consumer. The consumer will pull data from this FIFO.
@@ -43,17 +43,14 @@ class MEDIA_EXPORT AudioPullFifo {
private:
// Attempt to fulfill the request using what is available in the FIFO.
// Append new data to the |destination| starting at |write_pos|.
- void ReadFromFifo(
- AudioBus* destination, int* frames_to_provide, int* write_pos);
+ int ReadFromFifo(AudioBus* destination, int frames_to_provide, int write_pos);
// Source of data to the FIFO.
- ReadCB read_cb_;
-
- // The actual FIFO.
- scoped_ptr<AudioFifo> fifo_;
+ const ReadCB read_cb_;
// Temporary audio bus to hold the data from the producer.
- scoped_ptr<AudioBus> bus_;
+ scoped_ptr<AudioBus> fifo_;
+ int fifo_index_;
DISALLOW_COPY_AND_ASSIGN(AudioPullFifo);
};
« no previous file with comments | « media/base/audio_converter.cc ('k') | media/base/audio_pull_fifo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698