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

Side by Side Diff: media/audio/null_audio_sink.cc

Issue 14234023: Remove unused flush operation from Chromium audio. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/audio/null_audio_sink.h" 5 #include "media/audio/null_audio_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "media/audio/fake_audio_consumer.h" 9 #include "media/audio/fake_audio_consumer.h"
10 #include "media/base/audio_hash.h" 10 #include "media/base/audio_hash.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 DCHECK(initialized_); 47 DCHECK(initialized_);
48 48
49 if (playing_) 49 if (playing_)
50 return; 50 return;
51 51
52 fake_consumer_->Start(base::Bind( 52 fake_consumer_->Start(base::Bind(
53 &NullAudioSink::CallRender, base::Unretained(this))); 53 &NullAudioSink::CallRender, base::Unretained(this)));
54 playing_ = true; 54 playing_ = true;
55 } 55 }
56 56
57 void NullAudioSink::Pause(bool /* flush */) { 57 void NullAudioSink::Pause() {
58 DCHECK(message_loop_->BelongsToCurrentThread()); 58 DCHECK(message_loop_->BelongsToCurrentThread());
59 59
60 if (!playing_) 60 if (!playing_)
61 return; 61 return;
62 62
63 fake_consumer_->Stop(); 63 fake_consumer_->Stop();
64 playing_ = false; 64 playing_ = false;
65 } 65 }
66 66
67 bool NullAudioSink::SetVolume(double volume) { 67 bool NullAudioSink::SetVolume(double volume) {
(...skipping 14 matching lines...) Expand all
82 void NullAudioSink::StartAudioHashForTesting() { 82 void NullAudioSink::StartAudioHashForTesting() {
83 DCHECK(!initialized_); 83 DCHECK(!initialized_);
84 audio_hash_.reset(new AudioHash()); 84 audio_hash_.reset(new AudioHash());
85 } 85 }
86 86
87 std::string NullAudioSink::GetAudioHashForTesting() { 87 std::string NullAudioSink::GetAudioHashForTesting() {
88 return audio_hash_ ? audio_hash_->ToString() : std::string(); 88 return audio_hash_ ? audio_hash_->ToString() : std::string();
89 } 89 }
90 90
91 } // namespace media 91 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698