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

Side by Side Diff: content/browser/media/capture/web_contents_audio_muter.cc

Issue 1538563002: Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix. git cl format. Rebase. Created 5 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/browser/media/capture/web_contents_audio_muter.h" 5 #include "content/browser/media/capture/web_contents_audio_muter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "content/browser/media/capture/audio_mirroring_manager.h" 9 #include "content/browser/media/capture/audio_mirroring_manager.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 void Stop() override { worker_.Stop(); } 43 void Stop() override { worker_.Stop(); }
44 void SetVolume(double volume) override {} 44 void SetVolume(double volume) override {}
45 void GetVolume(double* volume) override { *volume = 0; } 45 void GetVolume(double* volume) override { *volume = 0; }
46 void Close() override { delete this; } 46 void Close() override { delete this; }
47 47
48 private: 48 private:
49 ~AudioDiscarder() override {} 49 ~AudioDiscarder() override {}
50 50
51 void FetchAudioData(AudioSourceCallback* callback) { 51 void FetchAudioData(AudioSourceCallback* callback) {
52 callback->OnMoreData(audio_bus_.get(), 0); 52 callback->OnMoreData(audio_bus_.get(), 0, 0);
53 } 53 }
54 54
55 // Calls FetchAudioData() at regular intervals and discards the data. 55 // Calls FetchAudioData() at regular intervals and discards the data.
56 media::FakeAudioWorker worker_; 56 media::FakeAudioWorker worker_;
57 scoped_ptr<media::AudioBus> audio_bus_; 57 scoped_ptr<media::AudioBus> audio_bus_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(AudioDiscarder); 59 DISALLOW_COPY_AND_ASSIGN(AudioDiscarder);
60 }; 60 };
61 61
62 } // namespace 62 } // namespace
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 is_muting_ = false; 146 is_muting_ = false;
147 BrowserThread::PostTask( 147 BrowserThread::PostTask(
148 BrowserThread::IO, 148 BrowserThread::IO,
149 FROM_HERE, 149 FROM_HERE,
150 base::Bind(&AudioMirroringManager::StopMirroring, 150 base::Bind(&AudioMirroringManager::StopMirroring,
151 base::Unretained(AudioMirroringManager::GetInstance()), 151 base::Unretained(AudioMirroringManager::GetInstance()),
152 destination_)); 152 destination_));
153 } 153 }
154 154
155 } // namespace content 155 } // namespace content
OLDNEW
« no previous file with comments | « components/audio_modem/audio_player_unittest.cc ('k') | content/browser/renderer_host/media/audio_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698