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

Unified Diff: trunk/src/media/audio/pulse/pulse_output.cc

Issue 335343004: Revert 277794 "Modifies AudioInputCallback::OnData and use media..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | « trunk/src/media/audio/pulse/pulse_output.h ('k') | trunk/src/media/audio/virtual_audio_input_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/audio/pulse/pulse_output.cc
===================================================================
--- trunk/src/media/audio/pulse/pulse_output.cc (revision 277811)
+++ trunk/src/media/audio/pulse/pulse_output.cc (working copy)
@@ -49,6 +49,8 @@
pa_stream_(NULL),
volume_(1.0f),
source_callback_(NULL) {
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
+
CHECK(params_.IsValid());
audio_bus_ = AudioBus::Create(params_);
}
@@ -62,7 +64,7 @@
}
bool PulseAudioOutputStream::Open() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
return pulse::CreateOutputStream(&pa_mainloop_, &pa_context_, &pa_stream_,
params_, device_id_, &StreamNotifyCallback,
&StreamRequestCallback, this);
@@ -107,7 +109,7 @@
}
void PulseAudioOutputStream::Close() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
Reset();
@@ -157,7 +159,7 @@
}
void PulseAudioOutputStream::Start(AudioSourceCallback* callback) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
CHECK(callback);
CHECK(pa_stream_);
@@ -179,7 +181,7 @@
}
void PulseAudioOutputStream::Stop() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
// Cork (pause) the stream. Waiting for the main loop lock will ensure
// outstanding callbacks have completed.
@@ -202,13 +204,13 @@
}
void PulseAudioOutputStream::SetVolume(double volume) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
volume_ = static_cast<float>(volume);
}
void PulseAudioOutputStream::GetVolume(double* volume) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(manager_->GetTaskRunner()->BelongsToCurrentThread());
*volume = volume_;
}
« no previous file with comments | « trunk/src/media/audio/pulse/pulse_output.h ('k') | trunk/src/media/audio/virtual_audio_input_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698