| 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 // Low-latency audio rendering unit utilizing audio output stream provided | 5 // Low-latency audio rendering unit utilizing audio output stream provided |
| 6 // by browser process through IPC. | 6 // by browser process through IPC. |
| 7 // | 7 // |
| 8 // Relationship of classes. | 8 // Relationship of classes. |
| 9 // | 9 // |
| 10 // AudioOutputController AudioDevice | 10 // AudioOutputController AudioDevice |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "base/threading/simple_thread.h" | 72 #include "base/threading/simple_thread.h" |
| 73 #include "content/common/content_export.h" | 73 #include "content/common/content_export.h" |
| 74 #include "content/renderer/media/audio_message_filter.h" | 74 #include "content/renderer/media/audio_message_filter.h" |
| 75 #include "media/audio/audio_parameters.h" | 75 #include "media/audio/audio_parameters.h" |
| 76 | 76 |
| 77 class CONTENT_EXPORT AudioDevice | 77 class CONTENT_EXPORT AudioDevice |
| 78 : public AudioMessageFilter::Delegate, | 78 : public AudioMessageFilter::Delegate, |
| 79 public base::DelegateSimpleThread::Delegate, | 79 public base::DelegateSimpleThread::Delegate, |
| 80 public base::RefCountedThreadSafe<AudioDevice> { | 80 public base::RefCountedThreadSafe<AudioDevice> { |
| 81 public: | 81 public: |
| 82 class RenderCallback { | 82 class CONTENT_EXPORT RenderCallback { |
| 83 public: | 83 public: |
| 84 virtual void Render(const std::vector<float*>& audio_data, | 84 virtual void Render(const std::vector<float*>& audio_data, |
| 85 size_t number_of_frames, | 85 size_t number_of_frames, |
| 86 size_t audio_delay_milliseconds) = 0; | 86 size_t audio_delay_milliseconds) = 0; |
| 87 protected: | 87 protected: |
| 88 virtual ~RenderCallback() {} | 88 virtual ~RenderCallback() {} |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 // Methods called on main render thread ------------------------------------- | 91 // Methods called on main render thread ------------------------------------- |
| 92 | 92 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 // Protects lifetime of: | 219 // Protects lifetime of: |
| 220 // socket_handle_ | 220 // socket_handle_ |
| 221 // audio_thread_ | 221 // audio_thread_ |
| 222 base::Lock lock_; | 222 base::Lock lock_; |
| 223 | 223 |
| 224 DISALLOW_COPY_AND_ASSIGN(AudioDevice); | 224 DISALLOW_COPY_AND_ASSIGN(AudioDevice); |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ | 227 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ |
| OLD | NEW |