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

Side by Side Diff: media/audio/audio_manager.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, 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 unified diff | Download patch | Annotate | Revision Log
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_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_H_
6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_ 6 #define MEDIA_AUDIO_AUDIO_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // callback is to recreate the stream. 113 // callback is to recreate the stream.
114 class AudioDeviceListener { 114 class AudioDeviceListener {
115 public: 115 public:
116 virtual void OnDeviceChange() = 0; 116 virtual void OnDeviceChange() = 0;
117 }; 117 };
118 118
119 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0; 119 virtual void AddOutputDeviceChangeListener(AudioDeviceListener* listener) = 0;
120 virtual void RemoveOutputDeviceChangeListener( 120 virtual void RemoveOutputDeviceChangeListener(
121 AudioDeviceListener* listener) = 0; 121 AudioDeviceListener* listener) = 0;
122 122
123 // Returns the default output hardware audio parameters for opening output
124 // streams. It is a convenience interface to
125 // AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager
126 // does not need their own implementation to this interface.
127 virtual AudioParameters GetDefaultOutputStreamParameters() = 0;
128
129 // Returns the input hardware audio parameters of the specific device
130 // for opening input streams. Each AudioManager needs to implement their own
131 // version of this interface.
132 virtual AudioParameters GetInputStreamParameters(
133 const std::string& device_id) = 0;
134
123 protected: 135 protected:
124 AudioManager(); 136 AudioManager();
125 137
126 private: 138 private:
127 DISALLOW_COPY_AND_ASSIGN(AudioManager); 139 DISALLOW_COPY_AND_ASSIGN(AudioManager);
128 }; 140 };
129 141
130 } // namespace media 142 } // namespace media
131 143
132 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 144 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW
« no previous file with comments | « media/audio/audio_low_latency_input_output_unittest.cc ('k') | media/audio/audio_manager_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698