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

Side by Side Diff: services/media/audio/platform/generic/standard_output_base.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 | « no previous file | services/media/audio/platform/generic/standard_output_base.cc » ('j') | 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_GENERIC_STANDARD_OUTPUT_BASE_H_ 5 #ifndef SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_STANDARD_OUTPUT_BASE_H_
6 #define SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_STANDARD_OUTPUT_BASE_H_ 6 #define SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_STANDARD_OUTPUT_BASE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "mojo/services/media/common/cpp/linear_transform.h" 9 #include "mojo/services/media/common/cpp/linear_transform.h"
10 #include "mojo/services/media/common/cpp/local_time.h" 10 #include "mojo/services/media/common/cpp/local_time.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // TODO(johngro): Right now, the cannonical intermediate format is signed 32 108 // TODO(johngro): Right now, the cannonical intermediate format is signed 32
109 // bit ints. As time goes on, we may need to reconsider this. This will 109 // bit ints. As time goes on, we may need to reconsider this. This will
110 // become more important when... 110 // become more important when...
111 // 111 //
112 // 1) We support 24 bit audio. Right now, with a 16 bit max, we can 112 // 1) We support 24 bit audio. Right now, with a 16 bit max, we can
113 // accumulate for up to a maximum of 2^16-1 tracks without needing to do 113 // accumulate for up to a maximum of 2^16-1 tracks without needing to do
114 // anything special about about clipping. With 24 bit audio, this number 114 // anything special about about clipping. With 24 bit audio, this number
115 // will drop to only 255 simultanious tracks. It is unclear if this is a 115 // will drop to only 255 simultanious tracks. It is unclear if this is a
116 // reasonable system-wide limitation or not. 116 // reasonable system-wide limitation or not.
117 // 2) We support floating point audio. 117 // 2) We support floating point audio.
118 std::unique_ptr<int32_t> mix_buf_; 118 std::unique_ptr<int32_t[]> mix_buf_;
119 uint32_t mix_buf_frames_ = 0; 119 uint32_t mix_buf_frames_ = 0;
120 120
121 // State used by the mix task. 121 // State used by the mix task.
122 TrackSetupTask setup_mix_; 122 TrackSetupTask setup_mix_;
123 TrackProcessTask process_mix_; 123 TrackProcessTask process_mix_;
124 MixJob cur_mix_job_; 124 MixJob cur_mix_job_;
125 125
126 // State used by the trim task. 126 // State used by the trim task.
127 TrackSetupTask setup_trim_; 127 TrackSetupTask setup_trim_;
128 TrackProcessTask process_trim_; 128 TrackProcessTask process_trim_;
129 int64_t trim_threshold_; 129 int64_t trim_threshold_;
130 }; 130 };
131 131
132 } // namespace audio 132 } // namespace audio
133 } // namespace media 133 } // namespace media
134 } // namespace mojo 134 } // namespace mojo
135 135
136 #endif // SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_STANDARD_OUTPUT_BASE_H_ 136 #endif // SERVICES_MEDIA_AUDIO_PLATFORM_GENERIC_STANDARD_OUTPUT_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | services/media/audio/platform/generic/standard_output_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698