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