| 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 #ifndef SERVICES_MEDIA_AUDIO_PLATFORM_LINUX_ALSA_OUTPUT_H_ | 5 #ifndef SERVICES_MEDIA_AUDIO_PLATFORM_LINUX_ALSA_OUTPUT_H_ |
| 6 #define SERVICES_MEDIA_AUDIO_PLATFORM_LINUX_ALSA_OUTPUT_H_ | 6 #define SERVICES_MEDIA_AUDIO_PLATFORM_LINUX_ALSA_OUTPUT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "mojo/services/media/common/cpp/linear_transform.h" | 10 #include "mojo/services/media/common/cpp/linear_transform.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 MediaResult AlsaSelectFormat(const AudioMediaTypeDetailsPtr& config); | 55 MediaResult AlsaSelectFormat(const AudioMediaTypeDetailsPtr& config); |
| 56 int AlsaWrite(const void* data, uint32_t frames); | 56 int AlsaWrite(const void* data, uint32_t frames); |
| 57 int AlsaGetAvailDelay(uint32_t* avail, uint32_t* delay = nullptr); | 57 int AlsaGetAvailDelay(uint32_t* avail, uint32_t* delay = nullptr); |
| 58 int AlsaRecover(int err_code); | 58 int AlsaRecover(int err_code); |
| 59 | 59 |
| 60 void* alsa_device_ = nullptr; | 60 void* alsa_device_ = nullptr; |
| 61 int32_t alsa_format_ = -1; | 61 int32_t alsa_format_ = -1; |
| 62 | 62 |
| 63 LinearTransform::Ratio frames_per_tick_; | 63 LinearTransform::Ratio frames_per_tick_; |
| 64 | 64 |
| 65 std::unique_ptr<uint8_t> mix_buf_; | 65 std::unique_ptr<uint8_t[]> mix_buf_; |
| 66 uint32_t mix_buf_frames_ = 0; | 66 uint32_t mix_buf_frames_ = 0; |
| 67 | 67 |
| 68 bool primed_ = false; | 68 bool primed_ = false; |
| 69 bool local_to_output_known_ = false; | 69 bool local_to_output_known_ = false; |
| 70 LinearTransform local_to_output_; | 70 LinearTransform local_to_output_; |
| 71 uint32_t local_to_output_gen_ = MixJob::INVALID_GENERATION + 1; | 71 uint32_t local_to_output_gen_ = MixJob::INVALID_GENERATION + 1; |
| 72 int64_t frames_sent_; | 72 int64_t frames_sent_; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace audio | 75 } // namespace audio |
| 76 } // namespace media | 76 } // namespace media |
| 77 } // namespace mojo | 77 } // namespace mojo |
| 78 | 78 |
| 79 #endif // SERVICES_MEDIA_AUDIO_PLATFORM_LINUX_ALSA_OUTPUT_H_ | 79 #endif // SERVICES_MEDIA_AUDIO_PLATFORM_LINUX_ALSA_OUTPUT_H_ |
| OLD | NEW |