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

Unified Diff: media/base/audio_hardware_config.h

Issue 12387006: Pass more detailed audio hardware configuration information to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/mac/audio_unified_mac.cc ('k') | media/base/audio_hardware_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_hardware_config.h
===================================================================
--- media/base/audio_hardware_config.h (revision 185058)
+++ media/base/audio_hardware_config.h (working copy)
@@ -15,18 +15,37 @@
// Provides thread safe access to the audio hardware configuration.
class MEDIA_EXPORT AudioHardwareConfig {
public:
- AudioHardwareConfig(int output_buffer_size, int output_sample_rate,
+ AudioHardwareConfig();
DaleCurtis 2013/02/28 02:18:08 Is this necessary?
+
+ AudioHardwareConfig(int buffer_size,
+ int output_sample_rate,
+ int output_channels,
+ ChannelLayout output_channel_layout,
int input_sample_rate,
+ int input_channels,
ChannelLayout input_channel_layout);
virtual ~AudioHardwareConfig();
+ void Reset(int buffer_size,
DaleCurtis 2013/02/28 02:18:08 output_buffer_size here and elsewhere. Why not jus
+ int output_sample_rate,
+ int output_channels,
+ ChannelLayout output_channel_layout,
+ int input_sample_rate,
+ int input_channels,
+ ChannelLayout input_channel_layout);
+
// Accessors for the currently cached hardware configuration. Safe to call
// from any thread.
- int GetOutputBufferSize();
- int GetOutputSampleRate();
- int GetInputSampleRate();
- ChannelLayout GetInputChannelLayout();
+ int GetOutputBufferSize() const;
+
+ int GetOutputSampleRate() const;
+ int GetOutputChannels() const;
+ ChannelLayout GetOutputChannelLayout() const;
+ int GetInputSampleRate() const;
+ int GetInputChannels() const;
+ ChannelLayout GetInputChannelLayout() const;
+
// Allows callers to update the cached values for either input or output. The
// values are paired under the assumption that these values will only be set
// after an input or output device change respectively. Safe to call from
@@ -36,10 +55,14 @@
private:
// Cached values; access is protected by |config_lock_|.
- base::Lock config_lock_;
+ mutable base::Lock config_lock_;
+
int output_buffer_size_;
int output_sample_rate_;
+ int output_channels_;
+ ChannelLayout output_channel_layout_;
int input_sample_rate_;
+ int input_channels_;
ChannelLayout input_channel_layout_;
DISALLOW_COPY_AND_ASSIGN(AudioHardwareConfig);
« no previous file with comments | « media/audio/mac/audio_unified_mac.cc ('k') | media/base/audio_hardware_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698