Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Side by Side Diff: content/renderer/media/audio_device.h

Issue 8539014: Export the AudioDevice and AudioDeviceInput classes so that unit tests have access to them in sha... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: added missing file Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/media/audio_input_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ 52 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_
53 #define CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ 53 #define CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_
54 #pragma once 54 #pragma once
55 55
56 #include <vector> 56 #include <vector>
57 57
58 #include "base/basictypes.h" 58 #include "base/basictypes.h"
59 #include "base/memory/scoped_ptr.h" 59 #include "base/memory/scoped_ptr.h"
60 #include "base/shared_memory.h" 60 #include "base/shared_memory.h"
61 #include "base/threading/simple_thread.h" 61 #include "base/threading/simple_thread.h"
62 #include "content/common/content_export.h"
62 #include "content/renderer/media/audio_message_filter.h" 63 #include "content/renderer/media/audio_message_filter.h"
63 64
64 struct AudioParameters; 65 struct AudioParameters;
65 66
66 class AudioDevice 67 class CONTENT_EXPORT AudioDevice
67 : public AudioMessageFilter::Delegate, 68 : public AudioMessageFilter::Delegate,
68 public base::DelegateSimpleThread::Delegate, 69 public base::DelegateSimpleThread::Delegate,
69 public base::RefCountedThreadSafe<AudioDevice> { 70 public base::RefCountedThreadSafe<AudioDevice> {
70 public: 71 public:
71 class RenderCallback { 72 class RenderCallback {
72 public: 73 public:
73 virtual void Render(const std::vector<float*>& audio_data, 74 virtual void Render(const std::vector<float*>& audio_data,
74 size_t number_of_frames, 75 size_t number_of_frames,
75 size_t audio_delay_milliseconds) = 0; 76 size_t audio_delay_milliseconds) = 0;
76 protected: 77 protected:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 169
169 // Data transfer between browser and render process uses a combination 170 // Data transfer between browser and render process uses a combination
170 // of sync sockets and shared memory to provide lowest possible latency. 171 // of sync sockets and shared memory to provide lowest possible latency.
171 scoped_ptr<base::SharedMemory> shared_memory_; 172 scoped_ptr<base::SharedMemory> shared_memory_;
172 scoped_ptr<base::SyncSocket> socket_; 173 scoped_ptr<base::SyncSocket> socket_;
173 174
174 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDevice); 175 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioDevice);
175 }; 176 };
176 177
177 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_ 178 #endif // CONTENT_RENDERER_MEDIA_AUDIO_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/audio_input_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698