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

Side by Side Diff: media/audio/audio_manager_base.h

Issue 10918098: Introduce AudioOutputResampler for browser side resampling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments. Created 8 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Creates the input stream for the |AUDIO_PCM_LINEAR| format. The legacy 74 // Creates the input stream for the |AUDIO_PCM_LINEAR| format. The legacy
75 // name is also from |AUDIO_PCM_LINEAR|. 75 // name is also from |AUDIO_PCM_LINEAR|.
76 virtual AudioInputStream* MakeLinearInputStream( 76 virtual AudioInputStream* MakeLinearInputStream(
77 const AudioParameters& params, const std::string& device_id) = 0; 77 const AudioParameters& params, const std::string& device_id) = 0;
78 78
79 // Creates the input stream for the |AUDIO_PCM_LOW_LATENCY| format. 79 // Creates the input stream for the |AUDIO_PCM_LOW_LATENCY| format.
80 virtual AudioInputStream* MakeLowLatencyInputStream( 80 virtual AudioInputStream* MakeLowLatencyInputStream(
81 const AudioParameters& params, const std::string& device_id) = 0; 81 const AudioParameters& params, const std::string& device_id) = 0;
82 82
83 // Returns the preferred hardware audio output parameters for opening output
84 // streams in the |AUDIO_PCM_LOW_LATENCY| format.
85 // TODO(dalecurtis): Retrieve the |channel_layout| value from hardware instead
86 // of accepting the value.
87 // TODO(dalecurtis): Each AudioManager should implement their own version, see
88 // http://crbug.com/137326
89 virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters(
90 ChannelLayout channel_layout);
91
83 protected: 92 protected:
84 AudioManagerBase(); 93 AudioManagerBase();
85 94
86 typedef std::map<AudioParameters, scoped_refptr<AudioOutputDispatcher>, 95 typedef std::map<AudioParameters, scoped_refptr<AudioOutputDispatcher>,
87 AudioParameters::Compare> 96 AudioParameters::Compare>
88 AudioOutputDispatchersMap; 97 AudioOutputDispatchersMap;
89 98
90 // Shuts down the audio thread and releases all the audio output dispatchers 99 // Shuts down the audio thread and releases all the audio output dispatchers
91 // on the audio thread. All audio streams should be freed before 100 // on the audio thread. All audio streams should be freed before
92 // Shutdown is called. 101 // Shutdown is called.
(...skipping 30 matching lines...) Expand all
123 132
124 // Number of currently open input streams. 133 // Number of currently open input streams.
125 int num_input_streams_; 134 int num_input_streams_;
126 135
127 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); 136 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
128 }; 137 };
129 138
130 } // namespace media 139 } // namespace media
131 140
132 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ 141 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698