| 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 MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 5 #ifndef MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
| 6 #define MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 6 #define MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
| 7 | 7 |
| 8 // NullAudioRenderer effectively uses an extra thread to "throw away" the | 8 // NullAudioRenderer effectively uses an extra thread to "throw away" the |
| 9 // audio data at a rate resembling normal playback speed. It's just like | 9 // audio data at a rate resembling normal playback speed. It's just like |
| 10 // decoding to /dev/null! | 10 // decoding to /dev/null! |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 void FillBufferTask(); | 45 void FillBufferTask(); |
| 46 | 46 |
| 47 // A number to convert bytes written in FillBuffer to milliseconds based on | 47 // A number to convert bytes written in FillBuffer to milliseconds based on |
| 48 // the audio format. | 48 // the audio format. |
| 49 size_t bytes_per_millisecond_; | 49 size_t bytes_per_millisecond_; |
| 50 | 50 |
| 51 // A buffer passed to FillBuffer to advance playback. | 51 // A buffer passed to FillBuffer to advance playback. |
| 52 scoped_array<uint8> buffer_; | 52 scoped_array<uint8> buffer_; |
| 53 size_t buffer_size_; | 53 size_t buffer_size_; |
| 54 | 54 |
| 55 size_t bytes_per_frame_; |
| 56 |
| 55 // Separate thread used to throw away data. | 57 // Separate thread used to throw away data. |
| 56 base::Thread thread_; | 58 base::Thread thread_; |
| 57 | 59 |
| 58 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); | 60 DISALLOW_COPY_AND_ASSIGN(NullAudioRenderer); |
| 59 }; | 61 }; |
| 60 | 62 |
| 61 } // namespace media | 63 } // namespace media |
| 62 | 64 |
| 63 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ | 65 #endif // MEDIA_FILTERS_NULL_AUDIO_RENDERER_H_ |
| OLD | NEW |