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

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

Issue 12043004: Fix media/base 64-bit compilation issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/audio_bus.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BUS_H_ 5 #ifndef MEDIA_BASE_AUDIO_BUS_H_
6 #define MEDIA_BASE_AUDIO_BUS_H_ 6 #define MEDIA_BASE_AUDIO_BUS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/aligned_memory.h" 10 #include "base/memory/aligned_memory.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // AudioBus object must have the same frames() and channels(). 76 // AudioBus object must have the same frames() and channels().
77 void CopyTo(AudioBus* dest) const; 77 void CopyTo(AudioBus* dest) const;
78 78
79 // Returns a raw pointer to the requested channel. Pointer is guaranteed to 79 // Returns a raw pointer to the requested channel. Pointer is guaranteed to
80 // have a 16-byte alignment. Warning: Do not rely on having sane (i.e. not 80 // have a 16-byte alignment. Warning: Do not rely on having sane (i.e. not
81 // inf, nan, or between [-1.0, 1.0]) values in the channel data. 81 // inf, nan, or between [-1.0, 1.0]) values in the channel data.
82 float* channel(int channel) { return channel_data_[channel]; } 82 float* channel(int channel) { return channel_data_[channel]; }
83 const float* channel(int channel) const { return channel_data_[channel]; } 83 const float* channel(int channel) const { return channel_data_[channel]; }
84 void SetChannelData(int channel, float* data); 84 void SetChannelData(int channel, float* data);
85 85
86 int channels() const { return channel_data_.size(); } 86 int channels() const { return static_cast<int>(channel_data_.size()); }
87 int frames() const { return frames_; } 87 int frames() const { return frames_; }
88 void set_frames(int frames); 88 void set_frames(int frames);
89 89
90 // Helper method for zeroing out all channels of audio data. 90 // Helper method for zeroing out all channels of audio data.
91 void Zero(); 91 void Zero();
92 void ZeroFrames(int frames); 92 void ZeroFrames(int frames);
93 void ZeroFramesPartial(int start_frame, int frames); 93 void ZeroFramesPartial(int start_frame, int frames);
94 94
95 private: 95 private:
96 friend struct base::DefaultDeleter<AudioBus>; 96 friend struct base::DefaultDeleter<AudioBus>;
(...skipping 16 matching lines...) Expand all
113 113
114 // Protect SetChannelData() and set_frames() for use by CreateWrapper(). 114 // Protect SetChannelData() and set_frames() for use by CreateWrapper().
115 bool can_set_channel_data_; 115 bool can_set_channel_data_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(AudioBus); 117 DISALLOW_COPY_AND_ASSIGN(AudioBus);
118 }; 118 };
119 119
120 } // namespace media 120 } // namespace media
121 121
122 #endif // MEDIA_BASE_AUDIO_BUS_H_ 122 #endif // MEDIA_BASE_AUDIO_BUS_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/audio_bus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698