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

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

Issue 7060011: Adding GetAudioInputDeviceNames to AudioManager, this function is supposed to do device enumerati... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 7 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/task.h" 10 #include "base/task.h"
11 #include "media/audio/audio_device_types.h"
11 #include "media/audio/audio_parameters.h" 12 #include "media/audio/audio_parameters.h"
12 13
13 class AudioInputStream; 14 class AudioInputStream;
14 class AudioOutputStream; 15 class AudioOutputStream;
15 class MessageLoop; 16 class MessageLoop;
16 17
17 // TODO(sergeyu): In this interface and some other places AudioParameters struct 18 // TODO(sergeyu): In this interface and some other places AudioParameters struct
18 // is passed by value. It is better to change it to const reference. 19 // is passed by value. It is better to change it to const reference.
19 20
20 // Manages all audio resources. In particular it owns the AudioOutputStream 21 // Manages all audio resources. In particular it owns the AudioOutputStream
(...skipping 17 matching lines...) Expand all
38 // Returns true if the platform specific audio input settings UI is known 39 // Returns true if the platform specific audio input settings UI is known
39 // and can be shown. 40 // and can be shown.
40 virtual bool CanShowAudioInputSettings() = 0; 41 virtual bool CanShowAudioInputSettings() = 0;
41 42
42 // Opens the platform default audio input settings UI. 43 // Opens the platform default audio input settings UI.
43 // Note: This could invoke an external application/preferences pane, so 44 // Note: This could invoke an external application/preferences pane, so
44 // ideally must not be called from the UI thread or other time sensitive 45 // ideally must not be called from the UI thread or other time sensitive
45 // threads to avoid blocking the rest of the application. 46 // threads to avoid blocking the rest of the application.
46 virtual void ShowAudioInputSettings() = 0; 47 virtual void ShowAudioInputSettings() = 0;
47 48
49 // Returns a list of available input devices. It is not guaranteed that
50 // all the devices in the list support all formats and sample rates for
51 // recording.
awong 2011/05/23 17:36:15 Change to say "Appends a list of available input d
xians 2011/05/23 20:15:59 Done.
52 virtual void GetAudioInputDeviceNames(
53 AudioInputDeviceNames* device_names) = 0;
54
48 // Factory for all the supported stream formats. |params| defines parameters 55 // Factory for all the supported stream formats. |params| defines parameters
49 // of the audio stream to be created. 56 // of the audio stream to be created.
50 // 57 //
51 // |params.sample_per_packet| is the requested buffer allocation which the 58 // |params.sample_per_packet| is the requested buffer allocation which the
52 // audio source thinks it can usually fill without blocking. Internally two 59 // audio source thinks it can usually fill without blocking. Internally two
53 // or three buffers are created, one will be locked for playback and one will 60 // or three buffers are created, one will be locked for playback and one will
54 // be ready to be filled in the call to AudioSourceCallback::OnMoreData(). 61 // be ready to be filled in the call to AudioSourceCallback::OnMoreData().
55 // 62 //
56 // Returns NULL if the combination of the parameters is not supported, or if 63 // Returns NULL if the combination of the parameters is not supported, or if
57 // we have reached some other platform specific limit. 64 // we have reached some other platform specific limit.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 private: 117 private:
111 static void Destroy(void*); 118 static void Destroy(void*);
112 119
113 // Called by GetAudioManager() to create platform-specific audio manager. 120 // Called by GetAudioManager() to create platform-specific audio manager.
114 static AudioManager* CreateAudioManager(); 121 static AudioManager* CreateAudioManager();
115 }; 122 };
116 123
117 DISABLE_RUNNABLE_METHOD_REFCOUNT(AudioManager); 124 DISABLE_RUNNABLE_METHOD_REFCOUNT(AudioManager);
118 125
119 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_ 126 #endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698