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

Unified Diff: media/base/audio_hardware_config.h

Issue 12662038: Revert 187936 "Pass more detailed audio hardware configuration i..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1440/src/
Patch Set: Created 7 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 | « media/base/audio_converter.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 189875)
+++ media/base/audio_hardware_config.h (working copy)
@@ -7,7 +7,6 @@
#include "base/compiler_specific.h"
#include "base/synchronization/lock.h"
-#include "media/audio/audio_parameters.h"
#include "media/base/channel_layout.h"
#include "media/base/media_export.h"
@@ -16,36 +15,32 @@
// Provides thread safe access to the audio hardware configuration.
class MEDIA_EXPORT AudioHardwareConfig {
public:
- AudioHardwareConfig(const media::AudioParameters& input_params,
- const media::AudioParameters& output_params);
+ AudioHardwareConfig(int output_buffer_size, int output_sample_rate,
+ int input_sample_rate,
+ ChannelLayout input_channel_layout);
virtual ~AudioHardwareConfig();
// Accessors for the currently cached hardware configuration. Safe to call
// from any thread.
- int GetOutputBufferSize() const;
- int GetOutputSampleRate() const;
- ChannelLayout GetOutputChannelLayout() const;
- int GetOutputChannels() const;
+ int GetOutputBufferSize();
+ int GetOutputSampleRate();
+ int GetInputSampleRate();
+ ChannelLayout GetInputChannelLayout();
- int GetInputSampleRate() const;
- ChannelLayout GetInputChannelLayout() const;
- int GetInputChannels() const;
-
- media::AudioParameters GetInputConfig() const;
- media::AudioParameters GetOutputConfig() 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
// any thread.
- void UpdateInputConfig(const media::AudioParameters& input_params);
- void UpdateOutputConfig(const media::AudioParameters& output_params);
+ void UpdateInputConfig(int sample_rate, media::ChannelLayout channel_layout);
+ void UpdateOutputConfig(int buffer_size, int sample_rate);
private:
// Cached values; access is protected by |config_lock_|.
- mutable base::Lock config_lock_;
- media::AudioParameters input_params_;
- media::AudioParameters output_params_;
+ base::Lock config_lock_;
+ int output_buffer_size_;
+ int output_sample_rate_;
+ int input_sample_rate_;
+ ChannelLayout input_channel_layout_;
DISALLOW_COPY_AND_ASSIGN(AudioHardwareConfig);
};
« no previous file with comments | « media/base/audio_converter.cc ('k') | media/base/audio_hardware_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698