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

Side by Side Diff: media/base/audio_buffer.h

Issue 2158923004: Convert media constants to constexpr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 MEDIA_BASE_AUDIO_BUFFER_H_ 5 #ifndef MEDIA_BASE_AUDIO_BUFFER_H_
6 #define MEDIA_BASE_AUDIO_BUFFER_H_ 6 #define MEDIA_BASE_AUDIO_BUFFER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // must be >= 0. 51 // must be >= 0.
52 static scoped_refptr<AudioBuffer> CopyFrom(SampleFormat sample_format, 52 static scoped_refptr<AudioBuffer> CopyFrom(SampleFormat sample_format,
53 ChannelLayout channel_layout, 53 ChannelLayout channel_layout,
54 int channel_count, 54 int channel_count,
55 int sample_rate, 55 int sample_rate,
56 int frame_count, 56 int frame_count,
57 const uint8_t* const* data, 57 const uint8_t* const* data,
58 const base::TimeDelta timestamp); 58 const base::TimeDelta timestamp);
59 59
60 // Create an AudioBuffer with |frame_count| frames. Buffer is allocated, but 60 // Create an AudioBuffer with |frame_count| frames. Buffer is allocated, but
61 // not initialized. Timestamp and duration are set to kNoTimestamp(). 61 // not initialized. Timestamp and duration are set to kNoTimestamp.
62 static scoped_refptr<AudioBuffer> CreateBuffer(SampleFormat sample_format, 62 static scoped_refptr<AudioBuffer> CreateBuffer(SampleFormat sample_format,
63 ChannelLayout channel_layout, 63 ChannelLayout channel_layout,
64 int channel_count, 64 int channel_count,
65 int sample_rate, 65 int sample_rate,
66 int frame_count); 66 int frame_count);
67 67
68 // Create an empty AudioBuffer with |frame_count| frames. 68 // Create an empty AudioBuffer with |frame_count| frames.
69 static scoped_refptr<AudioBuffer> CreateEmptyBuffer( 69 static scoped_refptr<AudioBuffer> CreateEmptyBuffer(
70 ChannelLayout channel_layout, 70 ChannelLayout channel_layout,
71 int channel_count, 71 int channel_count,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 // For planar data, points to each channels data. 188 // For planar data, points to each channels data.
189 std::vector<uint8_t*> channel_data_; 189 std::vector<uint8_t*> channel_data_;
190 190
191 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioBuffer); 191 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioBuffer);
192 }; 192 };
193 193
194 } // namespace media 194 } // namespace media
195 195
196 #endif // MEDIA_BASE_AUDIO_BUFFER_H_ 196 #endif // MEDIA_BASE_AUDIO_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698