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

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

Issue 9826023: Merge AudioRendererImpl and AudioRendererBase; add NullAudioSink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win build Created 8 years, 8 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_hardware.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 7a07ab536d8b8af4a16117d06d61ed159f88919e..b87f3004166238ead3f3bf155b4588aee3d4438e 100644
--- a/content/renderer/media/audio_device.cc
+++ b/content/renderer/media/audio_device.cc
@@ -69,10 +69,6 @@ void AudioDevice::Initialize(const media::AudioParameters& params,
CHECK(!callback_); // Calling Initialize() twice?
audio_parameters_ = params;
- audio_parameters_.Reset(
- params.format(),
- params.channel_layout(), params.sample_rate(), params.bits_per_sample(),
- params.frames_per_buffer());
callback_ = callback;
}
@@ -85,7 +81,8 @@ AudioDevice::~AudioDevice() {
void AudioDevice::Start() {
DCHECK(callback_) << "Initialize hasn't been called";
message_loop()->PostTask(FROM_HERE,
- base::Bind(&AudioDevice::InitializeOnIOThread, this, audio_parameters_));
+ base::Bind(&AudioDevice::CreateStreamOnIOThread, this,
+ audio_parameters_));
}
void AudioDevice::Stop() {
@@ -127,7 +124,7 @@ void AudioDevice::GetVolume(double* volume) {
*volume = volume_;
}
-void AudioDevice::InitializeOnIOThread(const media::AudioParameters& params) {
+void AudioDevice::CreateStreamOnIOThread(const media::AudioParameters& params) {
DCHECK(message_loop()->BelongsToCurrentThread());
// Make sure we don't create the stream more than once.
DCHECK_EQ(0, stream_id_);
« no previous file with comments | « content/renderer/media/audio_device.h ('k') | content/renderer/media/audio_hardware.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698