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 // Audio rendering unit utilizing AudioDevice. | 5 // Audio rendering unit utilizing AudioDevice. |
6 // | 6 // |
7 // This class lives inside three threads during it's lifetime, namely: | 7 // This class lives inside three threads during it's lifetime, namely: |
8 // 1. Render thread. | 8 // 1. Render thread. |
9 // This object is created on the render thread. | 9 // This object is created on the render thread. |
10 // 2. Pipeline thread | 10 // 2. Pipeline thread |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // did so, I've seen it done ~140ms too early when playing ~150ms file. | 122 // did so, I've seen it done ~140ms too early when playing ~150ms file. |
123 // | 123 // |
124 // Instead of trying to invent OS-specific solution for each and every OS we | 124 // Instead of trying to invent OS-specific solution for each and every OS we |
125 // are supporting, use simple workaround: every time we fill the buffer we | 125 // are supporting, use simple workaround: every time we fill the buffer we |
126 // remember when it should stop playing, and do not assume that buffer is | 126 // remember when it should stop playing, and do not assume that buffer is |
127 // empty till that time. Workaround is not bulletproof, as we don't exactly | 127 // empty till that time. Workaround is not bulletproof, as we don't exactly |
128 // know when that particular data would start playing, but it is much better | 128 // know when that particular data would start playing, but it is much better |
129 // than nothing. | 129 // than nothing. |
130 base::Time earliest_end_time_; | 130 base::Time earliest_end_time_; |
131 | 131 |
132 AudioParameters audio_parameters_; | 132 media::AudioParameters audio_parameters_; |
133 | 133 |
134 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 134 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
135 }; | 135 }; |
136 | 136 |
137 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ | 137 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ |
OLD | NEW |