| OLD | NEW |
| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // this method when it's done with a mixer. | 54 // this method when it's done with a mixer. |
| 55 void RemoveMixer(const media::AudioParameters& params); | 55 void RemoveMixer(const media::AudioParameters& params); |
| 56 | 56 |
| 57 // Map of AudioParameters to <AudioRendererMixer, Count>. Count allows | 57 // Map of AudioParameters to <AudioRendererMixer, Count>. Count allows |
| 58 // AudioRendererMixerManager to keep track explicitly (v.s. RefCounted which | 58 // AudioRendererMixerManager to keep track explicitly (v.s. RefCounted which |
| 59 // is implicit) of the number of outstanding AudioRendererMixers. | 59 // is implicit) of the number of outstanding AudioRendererMixers. |
| 60 struct AudioRendererMixerReference { | 60 struct AudioRendererMixerReference { |
| 61 media::AudioRendererMixer* mixer; | 61 media::AudioRendererMixer* mixer; |
| 62 int ref_count; | 62 int ref_count; |
| 63 }; | 63 }; |
| 64 typedef std::map<media::AudioParameters, AudioRendererMixerReference, | 64 typedef std::map<media::AudioParameters, |
| 65 media::AudioParameters::Compare> AudioRendererMixerMap; | 65 AudioRendererMixerReference> AudioRendererMixerMap; |
| 66 AudioRendererMixerMap mixers_; | 66 AudioRendererMixerMap mixers_; |
| 67 base::Lock mixers_lock_; | 67 base::Lock mixers_lock_; |
| 68 | 68 |
| 69 // Audio hardware configuration. Used to construct output AudioParameters for | 69 // Audio hardware configuration. Used to construct output AudioParameters for |
| 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_ |
| OLD | NEW |