OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // AudioRendererHost serves audio related requests from AudioRenderer which | 5 // AudioRendererHost serves audio related requests from AudioRenderer which |
6 // lives inside the render process and provide access to audio hardware. | 6 // lives inside the render process and provide access to audio hardware. |
7 // | 7 // |
8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI | 8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI |
9 // thread, but all other operations and method calls happen on IO thread, so we | 9 // thread, but all other operations and method calls happen on IO thread, so we |
10 // need to be extra careful about the lifetime of this object. AudioManager is a | 10 // need to be extra careful about the lifetime of this object. AudioManager is a |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // | Close > | | 42 // | Close > | |
43 // v v | 43 // v v |
44 | 44 |
45 // The above mode of operation uses relatively big buffers and has latencies | 45 // The above mode of operation uses relatively big buffers and has latencies |
46 // of 50 ms or more. There is a second mode of operation which is low latency. | 46 // of 50 ms or more. There is a second mode of operation which is low latency. |
47 // For low latency audio, the picture above is modified by not having the | 47 // For low latency audio, the picture above is modified by not having the |
48 // RequestAudioPacket and the AudioPacketReady messages, instead a SyncSocket | 48 // RequestAudioPacket and the AudioPacketReady messages, instead a SyncSocket |
49 // pair is used to signal buffer readiness without having to route messages | 49 // pair is used to signal buffer readiness without having to route messages |
50 // using the IO thread. | 50 // using the IO thread. |
51 | 51 |
52 #ifndef CHROME_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ | 52 #ifndef CONTENT_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ |
53 #define CHROME_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ | 53 #define CONTENT_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ |
54 #pragma once | 54 #pragma once |
55 | 55 |
56 #include <map> | 56 #include <map> |
57 | 57 |
58 #include "base/gtest_prod_util.h" | 58 #include "base/gtest_prod_util.h" |
59 #include "base/process.h" | 59 #include "base/process.h" |
60 #include "base/ref_counted.h" | 60 #include "base/ref_counted.h" |
61 #include "base/scoped_ptr.h" | 61 #include "base/scoped_ptr.h" |
62 #include "base/shared_memory.h" | 62 #include "base/shared_memory.h" |
63 #include "chrome/browser/browser_message_filter.h" | 63 #include "chrome/browser/browser_message_filter.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // This method is used to look up an AudioEntry after a controller | 213 // This method is used to look up an AudioEntry after a controller |
214 // event is received. | 214 // event is received. |
215 AudioEntry* LookupByController(media::AudioOutputController* controller); | 215 AudioEntry* LookupByController(media::AudioOutputController* controller); |
216 | 216 |
217 // A map of id to audio sources. | 217 // A map of id to audio sources. |
218 AudioEntryMap audio_entries_; | 218 AudioEntryMap audio_entries_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 220 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
221 }; | 221 }; |
222 | 222 |
223 #endif // CHROME_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ | 223 #endif // CONTENT_BROWSER_RENDERER_HOST_AUDIO_RENDERER_HOST_H_ |
OLD | NEW |