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

Unified Diff: media/audio/audio_util.h

Issue 10823175: Switch AudioRenderSink::Callback to use AudioBus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gotta catch'em all! Created 8 years, 4 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
Index: media/audio/audio_util.h
diff --git a/media/audio/audio_util.h b/media/audio/audio_util.h
index 4ac0ef63b94b71ef8e7bb9a3d8c29ae939dbd60c..40d3626852f1f775b829035937536cc70e87f568 100644
--- a/media/audio/audio_util.h
+++ b/media/audio/audio_util.h
@@ -6,7 +6,6 @@
#define MEDIA_AUDIO_AUDIO_UTIL_H_
#include <string>
-#include <vector>
#include "base/basictypes.h"
#include "media/base/channel_layout.h"
@@ -17,6 +16,7 @@ class SharedMemory;
}
namespace media {
+class AudioBus;
// For all audio functions 3 audio formats are supported:
// 8 bits unsigned 0 to 255.
@@ -86,7 +86,7 @@ MEDIA_EXPORT bool DeinterleaveAudioChannel(void* source,
// The size of the |source| vector determines the number of channels.
// The |destination| buffer is assumed to be large enough to hold the
// result. Thus it must be at least size: number_of_frames * source.size()
-MEDIA_EXPORT void InterleaveFloatToInt(const std::vector<float*>& source,
+MEDIA_EXPORT void InterleaveFloatToInt(const AudioBus& audio_bus,
scherkus (not reviewing) 2012/08/07 23:23:41 any reason this can't be AudioBus*?
DaleCurtis 2012/08/07 23:49:24 It could be, but this way enforces that the AudioB
scherkus (not reviewing) 2012/08/08 00:49:01 But so does "const AudioBus*"!
DaleCurtis 2012/08/08 01:26:07 I didn't realize that was acceptable, done.
void* destination,
size_t number_of_frames,
int bytes_per_sample);

Powered by Google App Engine
This is Rietveld 408576698