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

Unified Diff: media/audio/audio_manager_base.h

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: made the GetPreferredOutputStreamParameters protected 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/audio_manager.h ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_manager_base.h
diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
index 22140cbe2a1d4fb91b17aa0bb96f5e58f26cee9f..2275f9b7ec08996cdbed30fc6de9669488234fc1 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -83,21 +83,16 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
virtual AudioInputStream* MakeLowLatencyInputStream(
const AudioParameters& params, const std::string& device_id) = 0;
- // Returns the preferred hardware audio output parameters for opening output
- // streams in the |AUDIO_PCM_LOW_LATENCY| format.
- // TODO(dalecurtis): Retrieve the |channel_layout| value from hardware instead
- // of accepting the value.
- // TODO(dalecurtis): Each AudioManager should implement their own version, see
- // http://crbug.com/137326
- virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters(
- const AudioParameters& input_params);
-
// Listeners will be notified on the AudioManager::GetMessageLoop() loop.
virtual void AddOutputDeviceChangeListener(
AudioDeviceListener* listener) OVERRIDE;
virtual void RemoveOutputDeviceChangeListener(
AudioDeviceListener* listener) OVERRIDE;
+ virtual AudioParameters GetDefaultOutputStreamParameters() OVERRIDE;
+ virtual AudioParameters GetInputStreamParameters(
+ const std::string& device_id) OVERRIDE;
+
protected:
AudioManagerBase();
@@ -121,6 +116,14 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
// thread.
void NotifyAllOutputDeviceChangeListeners();
+ // Returns the preferred hardware audio output parameters for opening output
+ // streams. If the users inject a valid |input_params|, each AudioManager
+ // will decide if they should return the values from |input_params| or the
+ // default hardware values. If the |input_params| is invalid, it will return
+ // the default hardware audio parameters.
+ virtual AudioParameters GetPreferredOutputStreamParameters(
+ const AudioParameters& input_params) = 0;
+
// Map of cached AudioOutputDispatcher instances. Must only be touched
// from the audio thread (no locking).
AudioOutputDispatchersMap output_dispatchers_;
« no previous file with comments | « media/audio/audio_manager.h ('k') | media/audio/audio_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698