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

Unified Diff: trunk/src/media/audio/audio_input_controller.h

Issue 335343004: Revert 277794 "Modifies AudioInputCallback::OnData and use media..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 | « trunk/src/media/audio/android/opensles_input.cc ('k') | trunk/src/media/audio/audio_input_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/audio/audio_input_controller.h
===================================================================
--- trunk/src/media/audio/audio_input_controller.h (revision 277811)
+++ trunk/src/media/audio/audio_input_controller.h (working copy)
@@ -117,8 +117,8 @@
virtual void OnRecording(AudioInputController* controller) = 0;
virtual void OnError(AudioInputController* controller,
ErrorCode error_code) = 0;
- virtual void OnData(AudioInputController* controller,
- const AudioBus* data) = 0;
+ virtual void OnData(AudioInputController* controller, const uint8* data,
+ uint32 size) = 0;
virtual void OnLog(AudioInputController* controller,
const std::string& message) = 0;
@@ -136,10 +136,12 @@
// soundcard which has been recorded.
virtual void UpdateRecordedBytes(uint32 bytes) = 0;
- // Write certain amount of data from |data|.
- virtual void Write(const AudioBus* data,
- double volume,
- bool key_pressed) = 0;
+ // Write certain amount of data from |data|. This method returns
+ // number of written bytes.
+ virtual uint32 Write(const void* data,
+ uint32 size,
+ double volume,
+ bool key_pressed) = 0;
// Close this synchronous writer.
virtual void Close() = 0;
@@ -228,10 +230,8 @@
// AudioInputCallback implementation. Threading details depends on the
// device-specific implementation.
- virtual void OnData(AudioInputStream* stream,
- const AudioBus* source,
- uint32 hardware_delay_bytes,
- double volume) OVERRIDE;
+ virtual void OnData(AudioInputStream* stream, const uint8* src, uint32 size,
+ uint32 hardware_delay_bytes, double volume) OVERRIDE;
virtual void OnError(AudioInputStream* stream) OVERRIDE;
bool SharedMemoryAndSyncSocketMode() const { return sync_writer_ != NULL; }
@@ -261,7 +261,7 @@
void DoReportError();
void DoSetVolume(double volume);
void DoSetAutomaticGainControl(bool enabled);
- void DoOnData(scoped_ptr<AudioBus> data);
+ void DoOnData(scoped_ptr<uint8[]> data, uint32 size);
void DoLogAudioLevel(float level_dbfs);
// Method to check if we get recorded data after a stream was started,
@@ -325,6 +325,7 @@
scoped_ptr<AudioPowerMonitor> audio_level_;
// We need these to be able to feed data to the AudioPowerMonitor.
+ scoped_ptr<AudioBus> audio_bus_;
media::AudioParameters audio_params_;
base::TimeTicks last_audio_level_log_time_;
#endif
« no previous file with comments | « trunk/src/media/audio/android/opensles_input.cc ('k') | trunk/src/media/audio/audio_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698