| 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 "chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h" | 5 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/callback_helpers.h" | 11 #include "base/callback_helpers.h" |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa.h" | 16 #include "chromecast/media/cma/backend/alsa/stream_mixer_alsa.h" |
| 17 #include "chromecast/media/cma/base/decoder_buffer_base.h" | 17 #include "chromecast/media/cma/base/decoder_buffer_base.h" |
| 18 #include "media/base/audio_bus.h" | 18 #include "media/base/audio_bus.h" |
| 19 #include "media/base/multi_channel_resampler.h" | 19 #include "media/base/multi_channel_resampler.h" |
| 20 | 20 |
| 21 #define RUN_ON_MIXER_THREAD(callback, ...) \ | 21 #define RUN_ON_MIXER_THREAD(callback, ...) \ |
| 22 if (!mixer_task_runner_->BelongsToCurrentThread()) { \ | 22 if (!mixer_task_runner_->BelongsToCurrentThread()) { \ |
| 23 POST_TASK_TO_MIXER_THREAD(&StreamMixerAlsaInputImpl::callback, \ | 23 POST_TASK_TO_MIXER_THREAD(&StreamMixerAlsaInputImpl::callback, \ |
| 24 ##__VA_ARGS__); \ | 24 ##__VA_ARGS__); \ |
| 25 return; \ | 25 return; \ |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 DCHECK(!IsDeleting()); | 484 DCHECK(!IsDeleting()); |
| 485 if (multiplier > 1.0f) | 485 if (multiplier > 1.0f) |
| 486 multiplier = 1.0f; | 486 multiplier = 1.0f; |
| 487 if (multiplier < 0.0f) | 487 if (multiplier < 0.0f) |
| 488 multiplier = 0.0f; | 488 multiplier = 0.0f; |
| 489 volume_multiplier_ = multiplier; | 489 volume_multiplier_ = multiplier; |
| 490 } | 490 } |
| 491 | 491 |
| 492 } // namespace media | 492 } // namespace media |
| 493 } // namespace chromecast | 493 } // namespace chromecast |
| OLD | NEW |