Lines Matching refs:num_channels
31 bool CheckWavParameters(int num_channels,
36 // num_channels, sample_rate, and bytes_per_sample must be positive, must fit
39 if (num_channels <= 0 || sample_rate <= 0 || bytes_per_sample <= 0)
43 if (static_cast<uint64_t>(num_channels) >
49 if (static_cast<uint64_t>(sample_rate) * num_channels * bytes_per_sample >
79 if (num_samples % num_channels != 0)
99 int num_channels,
104 assert(CheckWavParameters(num_channels, sample_rate, format,
137 WriteLE16(&header.fmt.NumChannels, num_channels);
139 WriteLE32(&header.fmt.ByteRate, (static_cast<uint32_t>(num_channels)
141 WriteLE16(&header.fmt.BlockAlign, num_channels * bytes_per_sample);