OLD | NEW |
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/fake_audio_output_stream.h" | 5 #include "media/audio/fake_audio_output_stream.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "media/audio/audio_manager_base.h" | 9 #include "media/audio/audio_manager_base.h" |
10 | 10 |
11 namespace media { | |
12 | |
13 FakeAudioOutputStream* FakeAudioOutputStream::current_fake_stream_ = NULL; | 11 FakeAudioOutputStream* FakeAudioOutputStream::current_fake_stream_ = NULL; |
14 | 12 |
15 // static | 13 // static |
16 AudioOutputStream* FakeAudioOutputStream::MakeFakeStream( | 14 AudioOutputStream* FakeAudioOutputStream::MakeFakeStream( |
17 AudioManagerBase* manager, | 15 AudioManagerBase* manager, |
18 const AudioParameters& params) { | 16 const AudioParameters& params) { |
19 FakeAudioOutputStream* new_stream = new FakeAudioOutputStream(manager, | 17 FakeAudioOutputStream* new_stream = new FakeAudioOutputStream(manager, |
20 params); | 18 params); |
21 DCHECK(current_fake_stream_ == NULL); | 19 DCHECK(current_fake_stream_ == NULL); |
22 current_fake_stream_ = new_stream; | 20 current_fake_stream_ = new_stream; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 volume_(0), | 63 volume_(0), |
66 callback_(NULL), | 64 callback_(NULL), |
67 bytes_per_buffer_(params.GetBytesPerBuffer()), | 65 bytes_per_buffer_(params.GetBytesPerBuffer()), |
68 closed_(false) { | 66 closed_(false) { |
69 } | 67 } |
70 | 68 |
71 FakeAudioOutputStream::~FakeAudioOutputStream() { | 69 FakeAudioOutputStream::~FakeAudioOutputStream() { |
72 if (current_fake_stream_ == this) | 70 if (current_fake_stream_ == this) |
73 current_fake_stream_ = NULL; | 71 current_fake_stream_ = NULL; |
74 } | 72 } |
75 | |
76 } // namespace media | |
OLD | NEW |