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

Side by Side Diff: content/renderer/media/audio_renderer_mixer_manager.h

Issue 10834033: Move AudioDevice and AudioInputDevice to media. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and fixed a few lint issues Created 8 years, 4 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 CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_MIXER_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_MIXER_MANAGER_H_
6 #define CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_MIXER_MANAGER_H_ 6 #define CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_MIXER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 11 matching lines...) Expand all
22 // on their AudioParameters configuration. Inputs with the same AudioParameters 22 // on their AudioParameters configuration. Inputs with the same AudioParameters
23 // configuration will share a mixer while a new AudioRendererMixer will be 23 // configuration will share a mixer while a new AudioRendererMixer will be
24 // lazily created if one with the exact AudioParameters does not exist. 24 // lazily created if one with the exact AudioParameters does not exist.
25 // 25 //
26 // There should only be one instance of AudioRendererMixerManager per render 26 // There should only be one instance of AudioRendererMixerManager per render
27 // thread. 27 // thread.
28 // 28 //
29 // TODO(dalecurtis): Right now we require AudioParameters to be an exact match 29 // TODO(dalecurtis): Right now we require AudioParameters to be an exact match
30 // when we should be able to ignore bits per channel since we're only dealing 30 // when we should be able to ignore bits per channel since we're only dealing
31 // with floats. However, bits per channel is currently used to interleave the 31 // with floats. However, bits per channel is currently used to interleave the
32 // audio data by AudioDevice::AudioThreadCallback::Process for consumption via 32 // audio data by AudioOutputDevice::AudioThreadCallback::Process for consumption
33 // the shared memory. See http://crbug.com/114700. 33 // via the shared memory. See http://crbug.com/114700.
34 class CONTENT_EXPORT AudioRendererMixerManager { 34 class CONTENT_EXPORT AudioRendererMixerManager {
35 public: 35 public:
36 // Construct an instance using the given audio hardware configuration. 36 // Construct an instance using the given audio hardware configuration.
37 AudioRendererMixerManager(int hardware_sample_rate, int hardware_buffer_size); 37 AudioRendererMixerManager(int hardware_sample_rate, int hardware_buffer_size);
38 ~AudioRendererMixerManager(); 38 ~AudioRendererMixerManager();
39 39
40 // Creates an AudioRendererMixerInput with the proper callbacks necessary to 40 // Creates an AudioRendererMixerInput with the proper callbacks necessary to
41 // retrieve an AudioRendererMixer instance from AudioRendererMixerManager. 41 // retrieve an AudioRendererMixer instance from AudioRendererMixerManager.
42 // Caller must ensure AudioRendererMixerManager outlives the returned input. 42 // Caller must ensure AudioRendererMixerManager outlives the returned input.
43 media::AudioRendererMixerInput* CreateInput(); 43 media::AudioRendererMixerInput* CreateInput();
(...skipping 26 matching lines...) Expand all
70 // each AudioRendererMixer instance. 70 // each AudioRendererMixer instance.
71 int hardware_sample_rate_; 71 int hardware_sample_rate_;
72 int hardware_buffer_size_; 72 int hardware_buffer_size_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerManager); 74 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerManager);
75 }; 75 };
76 76
77 } // namespace content 77 } // namespace content
78 78
79 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_MIXER_MANAGER_H_ 79 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_MIXER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/audio_input_device.cc ('k') | content/renderer/media/audio_renderer_mixer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698