| 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 // THREAD SAFETY | 5 // THREAD SAFETY |
| 6 // | 6 // |
| 7 // This class is generally not thread safe. Callers should ensure thread safety. | 7 // This class is generally not thread safe. Callers should ensure thread safety. |
| 8 // For instance, the |sink_lock_| in WebAudioSourceProvider synchronizes access | 8 // For instance, the |sink_lock_| in WebAudioSourceProvider synchronizes access |
| 9 // to this object across the main thread (for WebAudio APIs) and the | 9 // to this object across the main thread (for WebAudio APIs) and the |
| 10 // media thread (for HTMLMediaElement APIs). | 10 // media thread (for HTMLMediaElement APIs). |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Protect |volume_|, accessed by separate threads in ProvideInput() and | 73 // Protect |volume_|, accessed by separate threads in ProvideInput() and |
| 74 // SetVolume(). | 74 // SetVolume(). |
| 75 base::Lock volume_lock_; | 75 base::Lock volume_lock_; |
| 76 | 76 |
| 77 bool started_; | 77 bool started_; |
| 78 bool playing_; | 78 bool playing_; |
| 79 double volume_; | 79 double volume_; |
| 80 | 80 |
| 81 // AudioConverter::InputCallback implementation. | 81 // AudioConverter::InputCallback implementation. |
| 82 double ProvideInput(AudioBus* audio_bus, | 82 double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override; |
| 83 base::TimeDelta buffer_delay) override; | |
| 84 | 83 |
| 85 // Callbacks provided during construction which allow AudioRendererMixerInput | 84 // Callbacks provided during construction which allow AudioRendererMixerInput |
| 86 // to retrieve a mixer during Initialize() and notify when it's done with it. | 85 // to retrieve a mixer during Initialize() and notify when it's done with it. |
| 87 const GetMixerCB get_mixer_cb_; | 86 const GetMixerCB get_mixer_cb_; |
| 88 const RemoveMixerCB remove_mixer_cb_; | 87 const RemoveMixerCB remove_mixer_cb_; |
| 89 | 88 |
| 90 // AudioParameters received during Initialize(). | 89 // AudioParameters received during Initialize(). |
| 91 AudioParameters params_; | 90 AudioParameters params_; |
| 92 | 91 |
| 93 // ID of hardware device to use | 92 // ID of hardware device to use |
| (...skipping 15 matching lines...) Expand all Loading... |
| 109 OutputDeviceStatusCB pending_switch_callback_; | 108 OutputDeviceStatusCB pending_switch_callback_; |
| 110 std::string pending_switch_device_id_; | 109 std::string pending_switch_device_id_; |
| 111 url::Origin pending_switch_security_origin_; | 110 url::Origin pending_switch_security_origin_; |
| 112 | 111 |
| 113 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); | 112 DISALLOW_COPY_AND_ASSIGN(AudioRendererMixerInput); |
| 114 }; | 113 }; |
| 115 | 114 |
| 116 } // namespace media | 115 } // namespace media |
| 117 | 116 |
| 118 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ | 117 #endif // MEDIA_BASE_AUDIO_RENDERER_MIXER_INPUT_H_ |
| OLD | NEW |