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

Unified Diff: media/audio/audio_io.h

Issue 344583002: Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain byte vector (Relanding) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added extra non-pure OnData API Created 6 years, 6 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/audio/audio_input_unittest.cc ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_io.h
diff --git a/media/audio/audio_io.h b/media/audio/audio_io.h
index f6151e094e13afac29bde85e82b6b2ad7b19dc43..1e1eba420b14aa049bacbf91a9841ec452e1c6ed 100644
--- a/media/audio/audio_io.h
+++ b/media/audio/audio_io.h
@@ -109,9 +109,18 @@ class MEDIA_EXPORT AudioInputStream {
// Called by the audio recorder when a full packet of audio data is
// available. This is called from a special audio thread and the
// implementation should return as soon as possible.
- virtual void OnData(AudioInputStream* stream, const uint8* src,
- uint32 size, uint32 hardware_delay_bytes,
- double volume) = 0;
+ // TODO(henrika): should be pure virtual when old OnData() is phased out.
+ virtual void OnData(AudioInputStream* stream,
+ const AudioBus* source,
+ uint32 hardware_delay_bytes,
+ double volume) {};
+
+ // TODO(henrika): don't use; to be removed.
+ virtual void OnData(AudioInputStream* stream,
+ const uint8* src,
+ uint32 size,
+ uint32 hardware_delay_bytes,
+ double volume) {};
// There was an error while recording audio. The audio sink cannot be
// destroyed yet. No direct action needed by the AudioInputStream, but it
« no previous file with comments | « media/audio/audio_input_unittest.cc ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698