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

Side by Side Diff: media/audio/alsa/alsa_output.cc

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Control through AudioManager. Compiles on Linux, works with PulseAudio. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // THREAD SAFETY 5 // THREAD SAFETY
6 // 6 //
7 // AlsaPcmOutputStream object is *not* thread-safe and should only be used 7 // AlsaPcmOutputStream object is *not* thread-safe and should only be used
8 // from the audio thread. We DCHECK on this assumption whenever we can. 8 // from the audio thread. We DCHECK on this assumption whenever we can.
9 // 9 //
10 // SEMANTICS OF Close() 10 // SEMANTICS OF Close()
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 volume_ = static_cast<float>(volume); 344 volume_ = static_cast<float>(volume);
345 } 345 }
346 346
347 void AlsaPcmOutputStream::GetVolume(double* volume) { 347 void AlsaPcmOutputStream::GetVolume(double* volume) {
348 DCHECK(CalledOnValidThread()); 348 DCHECK(CalledOnValidThread());
349 349
350 *volume = volume_; 350 *volume = volume_;
351 } 351 }
352 352
353 void AlsaPcmOutputStream::EnableDebugRecording(
354 const base::FilePath& file_name) {
355 // TODO BEFORE COMMIT.
356 }
357
358 void AlsaPcmOutputStream::DisableDebugRecording() {
359 // TODO BEFORE COMMIT.
360 }
361
353 void AlsaPcmOutputStream::SetTickClockForTesting( 362 void AlsaPcmOutputStream::SetTickClockForTesting(
354 std::unique_ptr<base::TickClock> tick_clock) { 363 std::unique_ptr<base::TickClock> tick_clock) {
355 DCHECK(tick_clock); 364 DCHECK(tick_clock);
356 tick_clock_ = std::move(tick_clock); 365 tick_clock_ = std::move(tick_clock);
357 } 366 }
358 367
359 void AlsaPcmOutputStream::BufferPacket(bool* source_exhausted) { 368 void AlsaPcmOutputStream::BufferPacket(bool* source_exhausted) {
360 DCHECK(CalledOnValidThread()); 369 DCHECK(CalledOnValidThread());
361 370
362 // If stopped, simulate a 0-length packet. 371 // If stopped, simulate a 0-length packet.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 } 807 }
799 808
800 // Changes the AudioSourceCallback to proxy calls to. Pass in NULL to 809 // Changes the AudioSourceCallback to proxy calls to. Pass in NULL to
801 // release ownership of the currently registered callback. 810 // release ownership of the currently registered callback.
802 void AlsaPcmOutputStream::set_source_callback(AudioSourceCallback* callback) { 811 void AlsaPcmOutputStream::set_source_callback(AudioSourceCallback* callback) {
803 DCHECK(CalledOnValidThread()); 812 DCHECK(CalledOnValidThread());
804 source_callback_ = callback; 813 source_callback_ = callback;
805 } 814 }
806 815
807 } // namespace media 816 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698