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

Unified Diff: content/renderer/media/audio_input_device.h

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright years Created 8 years, 9 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 | « content/renderer/media/audio_hardware.cc ('k') | content/renderer/media/audio_input_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_input_device.h
diff --git a/content/renderer/media/audio_input_device.h b/content/renderer/media/audio_input_device.h
index ed855548fbaa3dea40fad0eceda59c633ea51f89..a91ee16548212ea8ed3994b64417c5856cf7f9ed 100644
--- a/content/renderer/media/audio_input_device.h
+++ b/content/renderer/media/audio_input_device.h
@@ -116,10 +116,7 @@ class CONTENT_EXPORT AudioInputDevice
};
// Methods called on main render thread -------------------------------------
- AudioInputDevice(size_t buffer_size,
- int channels,
- double sample_rate,
- CaptureCallback* callback,
+ AudioInputDevice(const AudioParameters& params, CaptureCallback* callback,
CaptureEventHandler* event_handler);
virtual ~AudioInputDevice();
@@ -144,8 +141,13 @@ class CONTENT_EXPORT AudioInputDevice
// Returns |true| on success.
bool GetVolume(double* volume);
- double sample_rate() const { return audio_parameters_.sample_rate; }
- size_t buffer_size() const { return audio_parameters_.samples_per_packet; }
+ double sample_rate() const {
+ return audio_parameters_.sample_rate();
+ }
+
+ size_t buffer_size() const {
+ return audio_parameters_.frames_per_buffer();
+ }
// Methods called on IO thread ----------------------------------------------
// AudioInputMessageFilter::Delegate impl., called by AudioInputMessageFilter
« no previous file with comments | « content/renderer/media/audio_hardware.cc ('k') | content/renderer/media/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698