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

Unified Diff: content/renderer/media/audio_device.cc

Issue 9121062: Remove "high"-latency audio code path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT yet again Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/audio_device.h ('k') | content/renderer/media/audio_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_device.cc
diff --git a/content/renderer/media/audio_device.cc b/content/renderer/media/audio_device.cc
index b9ded10556a051e61a6818fc91aad1cd2fbcadef..5c0a39933e669b2b9d1bb86a7a6f85d54dee8548 100644
--- a/content/renderer/media/audio_device.cc
+++ b/content/renderer/media/audio_device.cc
@@ -158,7 +158,7 @@ void AudioDevice::InitializeOnIOThread(const AudioParameters& params) {
return;
stream_id_ = filter_->AddDelegate(this);
- Send(new AudioHostMsg_CreateStream(stream_id_, params, true));
+ Send(new AudioHostMsg_CreateStream(stream_id_, params));
}
void AudioDevice::PlayOnIOThread() {
@@ -205,10 +205,6 @@ void AudioDevice::SetVolumeOnIOThread(double volume) {
Send(new AudioHostMsg_SetVolume(stream_id_, volume));
}
-void AudioDevice::OnRequestPacket(AudioBuffersState buffers_state) {
- // This method does not apply to the low-latency system.
-}
-
void AudioDevice::OnStateChanged(AudioStreamState state) {
if (state == kAudioStreamError) {
DLOG(WARNING) << "AudioDevice::OnStateChanged(kError)";
@@ -216,12 +212,7 @@ void AudioDevice::OnStateChanged(AudioStreamState state) {
}
}
-void AudioDevice::OnCreated(
- base::SharedMemoryHandle handle, uint32 length) {
- // Not needed in this simple implementation.
-}
-
-void AudioDevice::OnLowLatencyCreated(
+void AudioDevice::OnStreamCreated(
base::SharedMemoryHandle handle,
base::SyncSocket::Handle socket_handle,
uint32 length) {
@@ -235,7 +226,7 @@ void AudioDevice::OnLowLatencyCreated(
DCHECK_GE(socket_handle, 0);
#endif
- // Takes care of the case when Stop() is called before OnLowLatencyCreated().
+ // Takes care of the case when Stop() is called before OnStreamCreated().
if (!stream_id_) {
base::SharedMemory::CloseHandle(handle);
// Close the socket handler.
@@ -252,16 +243,12 @@ void AudioDevice::OnLowLatencyCreated(
audio_thread_->Start();
// We handle the case where Play() and/or Pause() may have been called
- // multiple times before OnLowLatencyCreated() gets called.
+ // multiple times before OnStreamCreated() gets called.
is_started_ = true;
if (play_on_start_)
PlayOnIOThread();
}
-void AudioDevice::OnVolume(double volume) {
- NOTIMPLEMENTED();
-}
-
void AudioDevice::Send(IPC::Message* message) {
filter_->Send(message);
}
« no previous file with comments | « content/renderer/media/audio_device.h ('k') | content/renderer/media/audio_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698