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

Side by Side Diff: content/browser/renderer_host/media/audio_renderer_host.h

Issue 14600025: Replace AudioSilenceDetector with an AudioPowerMonitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace RMS scheme with 1st-order low-pass filter, per crogers@. Simpler, single-threaded unit tes… Created 7 years, 5 months 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
OLDNEW
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 // 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void OnCloseStream(int stream_id); 118 void OnCloseStream(int stream_id);
119 119
120 // Set the volume of the audio stream referenced by |stream_id|. 120 // Set the volume of the audio stream referenced by |stream_id|.
121 void OnSetVolume(int stream_id, double volume); 121 void OnSetVolume(int stream_id, double volume);
122 122
123 // Complete the process of creating an audio stream. This will set up the 123 // Complete the process of creating an audio stream. This will set up the
124 // shared memory or shared socket in low latency mode and send the 124 // shared memory or shared socket in low latency mode and send the
125 // NotifyStreamCreated message to the peer. 125 // NotifyStreamCreated message to the peer.
126 void DoCompleteCreation(AudioEntry* entry); 126 void DoCompleteCreation(AudioEntry* entry);
127 127
128 // Propagate audible signal to MediaObserver. 128 // Propagate measured power level of the audio signal to MediaObserver.
129 void DoNotifyAudibleState(AudioEntry* entry, bool is_audible); 129 void DoNotifyAudioPowerLevel(AudioEntry* entry,
130 float power_dBFS, bool clipped);
130 131
131 // Send an error message to the renderer. 132 // Send an error message to the renderer.
132 void SendErrorMessage(int stream_id); 133 void SendErrorMessage(int stream_id);
133 134
134 // Delete an audio entry, notifying observers first. This is called by 135 // Delete an audio entry, notifying observers first. This is called by
135 // AudioOutputController after it has closed. 136 // AudioOutputController after it has closed.
136 void DeleteEntry(scoped_ptr<AudioEntry> entry); 137 void DeleteEntry(scoped_ptr<AudioEntry> entry);
137 138
138 // Send an error message to the renderer, then close the stream. 139 // Send an error message to the renderer, then close the stream.
139 void ReportErrorAndClose(int stream_id); 140 void ReportErrorAndClose(int stream_id);
(...skipping 14 matching lines...) Expand all
154 155
155 // A map of stream IDs to audio sources. 156 // A map of stream IDs to audio sources.
156 AudioEntryMap audio_entries_; 157 AudioEntryMap audio_entries_;
157 158
158 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); 159 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
159 }; 160 };
160 161
161 } // namespace content 162 } // namespace content
162 163
163 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ 164 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698