/external/webrtc/api/audio_codecs/ |
D | audio_format.cc | 24 size_t num_channels) in SdpAudioFormat() argument 25 : name(name), clockrate_hz(clockrate_hz), num_channels(num_channels) {} in SdpAudioFormat() 29 size_t num_channels, in SdpAudioFormat() argument 33 num_channels(num_channels), in SdpAudioFormat() 38 size_t num_channels, in SdpAudioFormat() argument 42 num_channels(num_channels), in SdpAudioFormat() 47 clockrate_hz == o.clockrate_hz && num_channels == o.num_channels; in Matches() 56 a.clockrate_hz == b.clockrate_hz && a.num_channels == b.num_channels && in operator ==() 61 size_t num_channels, in AudioCodecInfo() argument 64 num_channels, in AudioCodecInfo() [all …]
|
/external/webrtc/modules/audio_processing/aec3/ |
D | alignment_mixer_unittest.cc | 29 int num_channels, in ProduceDebugText() argument 35 ss << ", Number of channels: " << num_channels; in ProduceDebugText() 51 for (int num_channels = 2; num_channels < 8; ++num_channels) { in TEST() local 52 for (int strongest_ch = 0; strongest_ch < num_channels; in TEST() 56 prefer_first_two_channels, num_channels, strongest_ch)); in TEST() 59 AlignmentMixer am(num_channels, /*downmix*/ false, in TEST() 64 num_channels, std::vector<float>(kBlockSize, 0.f)); in TEST() 66 for (int ch = 0; ch < num_channels; ++ch) { in TEST() 82 for (int ch = 0; ch < num_channels; ++ch) { in TEST() 122 for (int num_channels = 1; num_channels < 8; ++num_channels) { in TEST() local [all …]
|
D | render_signal_analyzer_unittest.cc | 57 void RunNarrowBandDetectionTest(size_t num_channels) { in RunNarrowBandDetectionTest() argument 64 num_channels, std::vector<float>(kBlockSize, 0.f))); in RunNarrowBandDetectionTest() 69 RenderDelayBuffer::Create(config, kSampleRateHz, num_channels)); in RunNarrowBandDetectionTest() 78 ProduceSinusoidInNoise(16000, num_channels - 1, in RunNarrowBandDetectionTest() 111 std::string ProduceDebugText(size_t num_channels) { in ProduceDebugText() argument 113 ss << "number of channels: " << num_channels; in ProduceDebugText() 129 for (auto num_channels : {1, 2, 8}) { in TEST() 130 SCOPED_TRACE(ProduceDebugText(num_channels)); in TEST() 135 num_channels, std::vector<float>(kBlockSize, 0.f))); in TEST() 138 RenderDelayBuffer::Create(EchoCanceller3Config(), 48000, num_channels)); in TEST() [all …]
|
D | frame_blocker_unittest.cc | 107 void RunBlockerTest(int sample_rate_hz, size_t num_channels) { in RunBlockerTest() argument 113 num_channels, std::vector<float>(kBlockSize, 0.f))); in RunBlockerTest() 116 num_channels, std::vector<float>(kSubFrameLength, 0.f))); in RunBlockerTest() 118 num_bands, std::vector<rtc::ArrayView<float>>(num_channels)); in RunBlockerTest() 119 FrameBlocker blocker(num_bands, num_channels); in RunBlockerTest() 144 void RunBlockerAndFramerTest(int sample_rate_hz, size_t num_channels) { in RunBlockerAndFramerTest() argument 150 num_channels, std::vector<float>(kBlockSize, 0.f))); in RunBlockerAndFramerTest() 153 num_channels, std::vector<float>(kSubFrameLength, 0.f))); in RunBlockerAndFramerTest() 156 num_channels, std::vector<float>(kSubFrameLength, 0.f))); in RunBlockerAndFramerTest() 158 num_bands, std::vector<rtc::ArrayView<float>>(num_channels)); in RunBlockerAndFramerTest() [all …]
|
/external/webrtc/modules/audio_processing/ns/ |
D | noise_suppressor_unittest.cc | 27 size_t num_channels, in ProduceDebugText() argument 30 ss << "Sample rate: " << sample_rate_hz << ", num_channels: " << num_channels in ProduceDebugText() 35 void PopulateInputFrameWithIdenticalChannels(size_t num_channels, in PopulateInputFrameWithIdenticalChannels() argument 39 for (size_t ch = 0; ch < num_channels; ++ch) { in PopulateInputFrameWithIdenticalChannels() 49 void VerifyIdenticalChannels(size_t num_channels, in VerifyIdenticalChannels() argument 53 EXPECT_GT(num_channels, 1u); in VerifyIdenticalChannels() 54 for (size_t ch = 1; ch < num_channels; ++ch) { in VerifyIdenticalChannels() 69 for (auto num_channels : {1, 4, 8}) { in TEST() 74 SCOPED_TRACE(ProduceDebugText(rate, num_channels, level)); in TEST() 78 AudioBuffer audio(rate, num_channels, rate, num_channels, rate, in TEST() [all …]
|
/external/adhd/cras/src/server/ |
D | cras_fmt_conv.c | 277 num_in_ch = conv->in_fmt.num_channels; in default_all_to_all() 278 num_out_ch = conv->out_fmt.num_channels; in default_all_to_all() 292 num_in_ch = conv->in_fmt.num_channels; in default_some_to_some() 293 num_out_ch = conv->out_fmt.num_channels; in default_some_to_some() 306 num_in_ch = conv->in_fmt.num_channels; in convert_channels() 307 num_out_ch = conv->out_fmt.num_channels; in convert_channels() 395 if (in->num_channels != out->num_channels) { in cras_fmt_conv_create() 398 in->num_channels, out->num_channels); in cras_fmt_conv_create() 402 if (in->num_channels == 1 && out->num_channels == 2) { in cras_fmt_conv_create() 404 } else if (in->num_channels == 1 && out->num_channels == 6) { in cras_fmt_conv_create() [all …]
|
/external/webrtc/common_audio/include/ |
D | audio_util.h | 100 int num_channels, in CopyAudioIfNeeded() argument 102 for (int i = 0; i < num_channels; ++i) { in CopyAudioIfNeeded() 116 size_t num_channels, in Deinterleave() argument 118 for (size_t i = 0; i < num_channels; ++i) { in Deinterleave() 123 interleaved_idx += num_channels; in Deinterleave() 134 size_t num_channels, in Interleave() argument 136 for (size_t i = 0; i < num_channels; ++i) { in Interleave() 141 interleaved_idx += num_channels; in Interleave() 152 int num_channels, in UpmixMonoToInterleaved() argument 156 for (int j = 0; j < num_channels; ++j) { in UpmixMonoToInterleaved() [all …]
|
/external/libxaac/decoder/drc_src/ |
D | impd_drc_peak_limiter.c | 37 FLOAT32 limit_threshold, UWORD32 num_channels, in impd_peak_limiter_init() argument 55 peak_limiter->num_channels = num_channels; in impd_peak_limiter_init() 74 peak_limiter->num_channels * in impd_peak_limiter_reinit() 87 UWORD32 num_channels = peak_limiter->num_channels; in impd_limiter_process() local 101 for (j = 0; j < num_channels; j++) { in impd_limiter_process() 102 tmp = max(tmp, (FLOAT32)fabs(samples[i * num_channels + j])); in impd_limiter_process() 142 for (j = 0; j < num_channels; j++) { in impd_limiter_process() 143 tmp = delayed_input[delayed_input_index * num_channels + j]; in impd_limiter_process() 144 delayed_input[delayed_input_index * num_channels + j] = in impd_limiter_process() 145 samples[i * num_channels + j]; in impd_limiter_process() [all …]
|
/external/webrtc/common_audio/ |
D | wav_header.cc | 154 uint32_t ByteRate(size_t num_channels, in ByteRate() argument 157 return static_cast<uint32_t>(num_channels * sample_rate * bytes_per_sample); in ByteRate() 160 uint16_t BlockAlign(size_t num_channels, size_t bytes_per_sample) { in BlockAlign() argument 161 return static_cast<uint16_t>(num_channels * bytes_per_sample); in BlockAlign() 203 void WritePcmWavHeader(size_t num_channels, in WritePcmWavHeader() argument 221 header.fmt.NumChannels = static_cast<uint16_t>(num_channels); in WritePcmWavHeader() 223 header.fmt.ByteRate = ByteRate(num_channels, sample_rate, bytes_per_sample); in WritePcmWavHeader() 224 header.fmt.BlockAlign = BlockAlign(num_channels, bytes_per_sample); in WritePcmWavHeader() 234 void WriteIeeeFloatWavHeader(size_t num_channels, in WriteIeeeFloatWavHeader() argument 253 header.fmt.NumChannels = static_cast<uint16_t>(num_channels); in WriteIeeeFloatWavHeader() [all …]
|
D | wav_header_unittest.cc | 102 size_t num_channels = 0; in TEST() local 134 EXPECT_FALSE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() 159 EXPECT_FALSE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() 184 EXPECT_FALSE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() 210 EXPECT_FALSE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() 237 EXPECT_FALSE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() 260 EXPECT_FALSE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() 276 EXPECT_FALSE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() 313 size_t num_channels = 0; in TEST() local 321 EXPECT_TRUE(ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST() [all …]
|
D | channel_buffer.h | 45 ChannelBuffer(size_t num_frames, size_t num_channels, size_t num_bands = 1) 46 : data_(new T[num_frames * num_channels]()), in data_() argument 47 channels_(new T*[num_channels * num_bands]), in data_() 48 bands_(new T*[num_channels * num_bands]), in data_() 51 num_allocated_channels_(num_channels), in data_() 52 num_channels_(num_channels), in data_() 147 size_t num_channels() const { return num_channels_; } in num_channels() function 151 void set_num_channels(size_t num_channels) { in set_num_channels() argument 152 RTC_DCHECK_LE(num_channels, num_allocated_channels_); in set_num_channels() 153 num_channels_ = num_channels; in set_num_channels() [all …]
|
D | channel_buffer_unittest.cc | 24 void ExpectNumChannels(const IFChannelBuffer& ifchb, size_t num_channels) { in ExpectNumChannels() argument 25 EXPECT_EQ(ifchb.ibuf_const()->num_channels(), num_channels); in ExpectNumChannels() 26 EXPECT_EQ(ifchb.fbuf_const()->num_channels(), num_channels); in ExpectNumChannels() 27 EXPECT_EQ(ifchb.num_channels(), num_channels); in ExpectNumChannels() 34 EXPECT_EQ(chb.num_channels(), kStereo); in TEST() 36 EXPECT_EQ(chb.num_channels(), kMono); in TEST()
|
/external/webrtc/modules/audio_processing/ |
D | splitting_filter.cc | 28 SplittingFilter::SplittingFilter(size_t num_channels, in SplittingFilter() argument 32 two_bands_states_(num_bands_ == 2 ? num_channels : 0), in SplittingFilter() 33 three_band_filter_banks_(num_bands_ == 3 ? num_channels : 0) { in SplittingFilter() 42 RTC_DCHECK_EQ(data->num_channels(), bands->num_channels()); in Analysis() 55 RTC_DCHECK_EQ(data->num_channels(), bands->num_channels()); in Synthesis() 67 RTC_DCHECK_EQ(two_bands_states_.size(), data->num_channels()); in TwoBandsAnalysis() 85 RTC_DCHECK_LE(data->num_channels(), two_bands_states_.size()); in TwoBandsSynthesis() 87 for (size_t i = 0; i < data->num_channels(); ++i) { in TwoBandsSynthesis() 102 RTC_DCHECK_EQ(three_band_filter_banks_.size(), data->num_channels()); in ThreeBandsAnalysis() 103 RTC_DCHECK_LE(data->num_channels(), three_band_filter_banks_.size()); in ThreeBandsAnalysis() [all …]
|
D | high_pass_filter_unittest.cc | 30 stream_config.sample_rate_hz(), stream_config.num_channels(), in ProcessOneFrameAsAudioBuffer() 31 stream_config.sample_rate_hz(), stream_config.num_channels(), in ProcessOneFrameAsAudioBuffer() 32 stream_config.sample_rate_hz(), stream_config.num_channels()); in ProcessOneFrameAsAudioBuffer() 48 stream_config.num_channels(), in ProcessOneFrameAsVector() 52 for (size_t channel = 0; channel < stream_config.num_channels(); in ProcessOneFrameAsVector() 55 frame_input[k * stream_config.num_channels() + channel]; in ProcessOneFrameAsVector() 63 for (size_t channel = 0; channel < stream_config.num_channels(); in ProcessOneFrameAsVector() 74 void RunBitexactnessTest(int num_channels, in RunBitexactnessTest() argument 78 const StreamConfig stream_config(16000, num_channels, false); in RunBitexactnessTest() 79 HighPassFilter high_pass_filter(16000, num_channels); in RunBitexactnessTest() [all …]
|
/external/webrtc/audio/utility/ |
D | channel_mixer_unittest.cc | 46 for (size_t i = 0; i < frame->samples_per_channel() * frame->num_channels(); in SetFrameData() 120 for (size_t i = 0; i < frame->samples_per_channel() * frame->num_channels(); in AllSamplesEquals() 130 EXPECT_EQ(frame1.num_channels(), frame2.num_channels()); in VerifyFramesAreEqual() 134 for (size_t i = 0; i < frame1.samples_per_channel() * frame1.num_channels(); in VerifyFramesAreEqual() 203 static_cast<int>(frame_.num_channels())); in TEST_F() 217 EXPECT_EQ(2u, frame_.num_channels()); in TEST_F() 219 EXPECT_EQ(1u, frame_.num_channels()); in TEST_F() 228 EXPECT_EQ(2u, frame_.num_channels()); in TEST_F() 230 EXPECT_EQ(1u, frame_.num_channels()); in TEST_F() 240 EXPECT_EQ(1u, frame_.num_channels()); in TEST_F() [all …]
|
/external/webrtc/modules/audio_device/include/ |
D | test_audio_device.cc | 217 int num_channels) in PulsedNoiseCapturerImpl() argument 222 num_channels_(num_channels) { in PulsedNoiseCapturerImpl() 271 int num_channels, in WavFileReader() argument 275 num_channels, in WavFileReader() 305 int num_channels, in WavFileReader() argument 308 num_channels_(num_channels), in WavFileReader() 312 RTC_CHECK_EQ(wav_reader_->num_channels(), num_channels); in WavFileReader() 325 int num_channels) in WavFileWriter() argument 328 num_channels), in WavFileWriter() 330 num_channels) {} in WavFileWriter() [all …]
|
/external/webrtc/test/fuzzers/ |
D | audio_processing_fuzzer_helper.cc | 31 size_t num_channels, in GenerateFloatFrame() argument 36 for (size_t i = 0; i < num_channels; ++i) { in GenerateFloatFrame() 56 size_t num_channels, in GenerateFixedFrame() argument 62 fixed_frame->num_channels_ = num_channels; in GenerateFixedFrame() 64 RTC_DCHECK_LE(samples_per_input_channel * num_channels, in GenerateFixedFrame() 66 for (size_t i = 0; i < samples_per_input_channel * num_channels; ++i) { in GenerateFixedFrame() 115 const int num_channels = in FuzzAudioProcessing() local 118 GenerateFloatFrame(fuzz_data, input_rate, num_channels, in FuzzAudioProcessing() 122 ptr_to_float_frames, StreamConfig(input_rate, num_channels), in FuzzAudioProcessing() 123 StreamConfig(output_rate, num_channels), ptr_to_float_frames); in FuzzAudioProcessing() [all …]
|
/external/webrtc/modules/audio_coding/codecs/opus/test/ |
D | audio_ring_buffer_unittest.cc | 29 const size_t num_channels = input.num_channels(); in ReadAndWriteTest() local 31 AudioRingBuffer buf(num_channels, buffer_frames); in ReadAndWriteTest() 32 std::unique_ptr<float*[]> slice(new float*[num_channels]); in ReadAndWriteTest() 39 buf.Write(input.Slice(slice.get(), input_pos), num_channels, in ReadAndWriteTest() 46 buf.Read(output->Slice(slice.get(), output_pos), num_channels, in ReadAndWriteTest() 54 buf.Write(input.Slice(slice.get(), input_pos), num_channels, in ReadAndWriteTest() 58 buf.Read(output->Slice(slice.get(), output_pos), num_channels, in ReadAndWriteTest() 66 const size_t num_channels = ::testing::get<3>(GetParam()); in TEST_P() local 69 ChannelBuffer<float> input(kFrames, static_cast<int>(num_channels)); in TEST_P() 70 for (size_t i = 0; i < num_channels; ++i) in TEST_P() [all …]
|
/external/adhd/cras/client/cras_tests/src/ |
D | audio.rs | 86 fn channel_string(num_channels: usize) -> String { in channel_string() 87 match num_channels { in channel_string() 90 _ => format!("{} Channels", num_channels), in channel_string() 97 num_channels: usize, field 120 let num_channels = spec.channels as usize; in try_new() localVariable 121 if opts.num_channels.is_some() && Some(num_channels) != opts.num_channels { in try_new() 122 eprintln!("Warning: number of channels changed to {}", num_channels); in try_new() 133 num_channels, in try_new() 142 fn num_channels(&self) -> usize { in num_channels() method 143 self.num_channels in num_channels() [all …]
|
/external/tensorflow/tensorflow/lite/experimental/microfrontend/lib/ |
D | filterbank_test.cc | 38 config_.num_channels = 2; in FilterbankTestConfig() 79 TF_LITE_MICRO_EXPECT_EQ(state.num_channels + 1, in TF_LITE_MICRO_TEST() 82 for (i = 0; i <= state.num_channels; ++i) { in TF_LITE_MICRO_TEST() 96 TF_LITE_MICRO_EXPECT_EQ(state.num_channels + 1, in TF_LITE_MICRO_TEST() 99 for (i = 0; i <= state.num_channels; ++i) { in TF_LITE_MICRO_TEST() 113 TF_LITE_MICRO_EXPECT_EQ(state.num_channels + 1, in TF_LITE_MICRO_TEST() 116 for (i = 0; i <= state.num_channels; ++i) { in TF_LITE_MICRO_TEST() 132 TF_LITE_MICRO_EXPECT_EQ(state.channel_weight_starts[state.num_channels] + in TF_LITE_MICRO_TEST() 133 state.channel_widths[state.num_channels], in TF_LITE_MICRO_TEST() 152 TF_LITE_MICRO_EXPECT_EQ(state.channel_weight_starts[state.num_channels] + in TF_LITE_MICRO_TEST() [all …]
|
/external/webrtc/common_audio/resampler/ |
D | push_resampler.cc | 32 size_t num_channels) { in CheckValidInitParams() argument 38 RTC_DCHECK_GT(num_channels, 0); in CheckValidInitParams() 44 size_t num_channels, in CheckExpectedBufferSizes() argument 52 const size_t src_size_10ms = src_sample_rate * num_channels / 100; in CheckExpectedBufferSizes() 53 const size_t dst_size_10ms = dst_sample_rate * num_channels / 100; in CheckExpectedBufferSizes() 70 size_t num_channels) { in InitializeIfNeeded() argument 71 CheckValidInitParams(src_sample_rate_hz, dst_sample_rate_hz, num_channels); in InitializeIfNeeded() 75 num_channels == num_channels_) { in InitializeIfNeeded() 80 if (src_sample_rate_hz <= 0 || dst_sample_rate_hz <= 0 || num_channels <= 0) { in InitializeIfNeeded() 86 num_channels_ = num_channels; in InitializeIfNeeded() [all …]
|
/external/webrtc/api/audio_codecs/opus/ |
D | audio_decoder_opus.cc | 28 if (num_channels != 1 && num_channels != 2) { in IsOk() 36 const auto num_channels = [&]() -> absl::optional<int> { in SdpToConfig() local 50 format.clockrate_hz == 48000 && format.num_channels == 2 && in SdpToConfig() 51 num_channels) { in SdpToConfig() 53 config.num_channels = *num_channels; in SdpToConfig() 75 return std::make_unique<AudioDecoderOpusImpl>(config.num_channels, in MakeAudioDecoder()
|
/external/adhd/cras/src/common/ |
D | cras_audio_format.c | 34 size_t num_channels) in cras_audio_format_create() argument 45 fmt->num_channels = num_channels; in cras_audio_format_create() 51 fmt->channel_layout[i] = (i < num_channels) ? i : -1; in cras_audio_format_create() 65 if (layout[i] < -1 || layout[i] >= (int)format->num_channels) in cras_audio_format_set_channel_layout() 80 fmt->channel_layout[i] >= (int)fmt->num_channels) { in cras_audio_format_valid() 128 if (in->channel_layout[i] >= (int)in->num_channels || in cras_channel_conv_matrix_create() 129 out->channel_layout[i] >= (int)out->num_channels) { in cras_channel_conv_matrix_create() 136 mtx = cras_channel_conv_matrix_alloc(in->num_channels, in cras_channel_conv_matrix_create() 137 out->num_channels); in cras_channel_conv_matrix_create() 169 cras_channel_conv_matrix_destroy(mtx, out->num_channels); in cras_channel_conv_matrix_create()
|
/external/webrtc/modules/audio_processing/transient/ |
D | transient_suppression_test.cc | 51 ABSL_FLAG(int, num_channels, 1, "Number of channels."); 72 int num_channels, in ReadBuffers() argument 81 if (num_channels > 1) { in ReadBuffers() 82 tmpbuf.reset(new int16_t[num_channels * audio_buffer_size]); in ReadBuffers() 85 if (fread(read_ptr, sizeof(*read_ptr), num_channels * audio_buffer_size, in ReadBuffers() 86 in_file) != num_channels * audio_buffer_size) { in ReadBuffers() 90 if (num_channels > 1) { in ReadBuffers() 91 for (int i = 0; i < num_channels; ++i) { in ReadBuffers() 94 read_ptr[i + j * num_channels]; in ReadBuffers() 119 int num_channels, in WritePCM() argument [all …]
|
/external/adhd/audio_streams/src/ |
D | shm_streams.rs | 130 fn num_channels(&self) -> usize; in num_channels() method 199 num_channels: usize, in new_stream() 220 num_channels: usize, field 234 num_channels: usize, in new() 240 num_channels, in new() 243 frame_size: format.sample_bytes() * num_channels, in new() 266 fn num_channels(&self) -> usize { in num_channels() method 267 self.num_channels in num_channels() 306 num_channels: usize, in new_stream() 314 let new_stream = NullShmStream::new(buffer_size, num_channels, format, frame_rate); [all …]
|