OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |