| 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 // AudioOutputMixer is a class that implements browser-side audio mixer. | 5 // AudioOutputMixer is a class that implements browser-side audio mixer. |
| 6 // AudioOutputMixer implements both AudioOutputDispatcher and | 6 // AudioOutputMixer implements both AudioOutputDispatcher and |
| 7 // AudioSourceCallback interfaces. | 7 // AudioSourceCallback interfaces. |
| 8 | 8 |
| 9 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_ | 9 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_ |
| 10 #define MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_ | 10 #define MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_ |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 scoped_ptr<AudioOutputStream> physical_stream_; | 76 scoped_ptr<AudioOutputStream> physical_stream_; |
| 77 | 77 |
| 78 // Temporary buffer used when mixing. Allocated in the constructor | 78 // Temporary buffer used when mixing. Allocated in the constructor |
| 79 // to avoid constant allocation/deallocation in the callback. | 79 // to avoid constant allocation/deallocation in the callback. |
| 80 scoped_array<uint8> mixer_data_; | 80 scoped_array<uint8> mixer_data_; |
| 81 | 81 |
| 82 // Used to post delayed tasks to ourselves that we cancel inside Shutdown(). | 82 // Used to post delayed tasks to ourselves that we cancel inside Shutdown(). |
| 83 base::WeakPtrFactory<AudioOutputMixer> weak_this_; | 83 base::WeakPtrFactory<AudioOutputMixer> weak_this_; |
| 84 base::DelayTimer<AudioOutputMixer> close_timer_; | 84 base::DelayTimer<AudioOutputMixer> close_timer_; |
| 85 | 85 |
| 86 // Size of data in all in-flight buffers. |
| 87 int pending_bytes_; |
| 88 |
| 86 DISALLOW_COPY_AND_ASSIGN(AudioOutputMixer); | 89 DISALLOW_COPY_AND_ASSIGN(AudioOutputMixer); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 } // namespace media | 92 } // namespace media |
| 90 | 93 |
| 91 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_ | 94 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_ |
| OLD | NEW |