Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: services/media/audio/platform/linux/alsa_output.h

Issue 2051923002: Motown: Fix unique_ptrs to arrays so deallocation is done properly (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/media/audio/platform/generic/standard_output_base.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « services/media/audio/platform/generic/standard_output_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698