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/android/opensles_output.h" | 5 #include "media/audio/android/opensles_output.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "media/audio/audio_util.h" | 8 #include "media/audio/audio_util.h" |
9 #include "media/audio/android/audio_manager_android.h" | 9 #include "media/audio/android/audio_manager_android.h" |
10 | 10 |
| 11 namespace media { |
| 12 |
11 OpenSLESOutputStream::OpenSLESOutputStream(AudioManagerAndroid* manager, | 13 OpenSLESOutputStream::OpenSLESOutputStream(AudioManagerAndroid* manager, |
12 const AudioParameters& params) | 14 const AudioParameters& params) |
13 : audio_manager_(manager), | 15 : audio_manager_(manager), |
14 callback_(NULL), | 16 callback_(NULL), |
15 player_(NULL), | 17 player_(NULL), |
16 simple_buffer_queue_(NULL), | 18 simple_buffer_queue_(NULL), |
17 active_queue_(0), | 19 active_queue_(0), |
18 buffer_size_bytes_(0), | 20 buffer_size_bytes_(0), |
19 started_(false), | 21 started_(false), |
20 volume_(1.0) { | 22 volume_(1.0) { |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 audio_data_[i] = NULL; | 290 audio_data_[i] = NULL; |
289 } | 291 } |
290 } | 292 } |
291 } | 293 } |
292 | 294 |
293 void OpenSLESOutputStream::HandleError(SLresult error) { | 295 void OpenSLESOutputStream::HandleError(SLresult error) { |
294 DLOG(FATAL) << "OpenSLES error " << error; | 296 DLOG(FATAL) << "OpenSLES error " << error; |
295 if (callback_) | 297 if (callback_) |
296 callback_->OnError(this, error); | 298 callback_->OnError(this, error); |
297 } | 299 } |
| 300 |
| 301 } // namespace media |
OLD | NEW |