Home | History | Annotate | Download | only in base

Lines Matching full:channels

24 static int CalculateMemorySizeInternal(int channels, int frames,
35 return sizeof(float) * channels * aligned_frames;
48 const int channels = dest->channels();
49 for (int ch = 0; ch < channels; ++ch) {
52 ++i, offset += channels) {
68 const int channels = source->channels();
69 for (int ch = 0; ch < channels; ++ch) {
72 ++i, offset += channels) {
86 static void ValidateConfig(int channels, int frames) {
88 CHECK_GT(channels, 0);
89 CHECK_LE(channels, static_cast<int>(limits::kMaxChannels));
101 AudioBus::AudioBus(int channels, int frames)
104 ValidateConfig(channels, frames_);
107 int size = CalculateMemorySizeInternal(channels, frames, &aligned_frames);
112 BuildChannelData(channels, aligned_frames, data_.get());
115 AudioBus::AudioBus(int channels, int frames, float* data)
120 ValidateConfig(channels, frames_);
123 CalculateMemorySizeInternal(channels, frames, &aligned_frames);
125 BuildChannelData(channels, aligned_frames, data);
140 AudioBus::AudioBus(int channels)
141 : channel_data_(channels),
144 CHECK_GT(channels, 0);
151 scoped_ptr<AudioBus> AudioBus::Create(int channels, int frames) {
152 return scoped_ptr<AudioBus>(new AudioBus(channels, frames));
157 params.channels(), params.frames_per_buffer()));
160 scoped_ptr<AudioBus> AudioBus::CreateWrapper(int channels) {
161 return scoped_ptr<AudioBus>(new AudioBus(channels));
169 scoped_ptr<AudioBus> AudioBus::WrapMemory(int channels, int frames,
174 channels, frames, static_cast<float*>(data)));
182 params.channels(), params.frames_per_buffer(),
223 params.channels(), params.frames_per_buffer(), NULL);
226 int AudioBus::CalculateMemorySize(int channels, int frames) {
227 return CalculateMemorySizeInternal(channels, frames, NULL);
230 void AudioBus::BuildChannelData(int channels, int aligned_frames, float* data) {
233 // Separate audio data out into channels for easy lookup later. Figure out
234 channel_data_.reserve(channels);
235 for (int i = 0; i < channels; ++i)
314 CHECK_EQ(channels(), dest->channels());
320 for (int i = 0; i < channels(); ++i) {
329 for (int i = 0; i < channels(); ++i)