OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 // Methods called on pipeline thread ---------------------------------------- | 74 // Methods called on pipeline thread ---------------------------------------- |
75 void DoPlay(); | 75 void DoPlay(); |
76 void DoPause(); | 76 void DoPause(); |
77 void DoSeek(); | 77 void DoSeek(); |
78 | 78 |
79 // media::AudioRendererSink::RenderCallback implementation. | 79 // media::AudioRendererSink::RenderCallback implementation. |
80 virtual size_t Render(const std::vector<float*>& audio_data, | 80 virtual size_t Render(const std::vector<float*>& audio_data, |
81 size_t number_of_frames, | 81 size_t number_of_frames, |
82 size_t audio_delay_milliseconds) OVERRIDE; | 82 size_t audio_delay_milliseconds) OVERRIDE; |
| 83 virtual void OnError() OVERRIDE; |
83 | 84 |
84 // Accessors used by tests. | 85 // Accessors used by tests. |
85 base::Time earliest_end_time() const { | 86 base::Time earliest_end_time() const { |
86 return earliest_end_time_; | 87 return earliest_end_time_; |
87 } | 88 } |
88 | 89 |
89 void set_earliest_end_time(const base::Time& earliest_end_time) { | 90 void set_earliest_end_time(const base::Time& earliest_end_time) { |
90 earliest_end_time_ = earliest_end_time; | 91 earliest_end_time_ = earliest_end_time; |
91 } | 92 } |
92 | 93 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // know when that particular data would start playing, but it is much better | 127 // know when that particular data would start playing, but it is much better |
127 // than nothing. | 128 // than nothing. |
128 base::Time earliest_end_time_; | 129 base::Time earliest_end_time_; |
129 | 130 |
130 AudioParameters audio_parameters_; | 131 AudioParameters audio_parameters_; |
131 | 132 |
132 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 133 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
133 }; | 134 }; |
134 | 135 |
135 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ | 136 #endif // CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ |
OLD | NEW |