OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/audio_modem/audio_player_impl.h" | 5 #include "components/audio_modem/audio_player_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "components/audio_modem/public/audio_modem_types.h" | 13 #include "components/audio_modem/public/audio_modem_types.h" |
14 #include "media/audio/audio_manager.h" | 14 #include "media/audio/audio_manager.h" |
15 #include "media/audio/audio_parameters.h" | |
16 #include "media/base/audio_bus.h" | 15 #include "media/base/audio_bus.h" |
| 16 #include "media/base/audio_parameters.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const int kDefaultFrameCount = 1024; | 20 const int kDefaultFrameCount = 1024; |
21 const double kOutputVolumePercent = 1.0f; | 21 const double kOutputVolumePercent = 1.0f; |
22 | 22 |
23 } // namespace | 23 } // namespace |
24 | 24 |
25 namespace audio_modem { | 25 namespace audio_modem { |
26 | 26 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 void AudioPlayerImpl::OnError(media::AudioOutputStream* /* stream */) { | 155 void AudioPlayerImpl::OnError(media::AudioOutputStream* /* stream */) { |
156 LOG(ERROR) << "Error during system sound reproduction."; | 156 LOG(ERROR) << "Error during system sound reproduction."; |
157 media::AudioManager::Get()->GetTaskRunner()->PostTask( | 157 media::AudioManager::Get()->GetTaskRunner()->PostTask( |
158 FROM_HERE, | 158 FROM_HERE, |
159 base::Bind(&AudioPlayerImpl::StopAndCloseOnAudioThread, | 159 base::Bind(&AudioPlayerImpl::StopAndCloseOnAudioThread, |
160 base::Unretained(this))); | 160 base::Unretained(this))); |
161 } | 161 } |
162 | 162 |
163 } // namespace audio_modem | 163 } // namespace audio_modem |
OLD | NEW |