MCPcopy Create free account
hub / github.com/adamstark/AudioFile / setNumChannels

Method setNumChannels

AudioFile.h:445–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443//=============================================================
444template <class T>
445void AudioFile<T>::setNumChannels (int numChannels)
446{
447 int originalNumChannels = getNumChannels();
448 int originalNumSamplesPerChannel = getNumSamplesPerChannel();
449
450 samples.resize (numChannels);
451
452 // make sure any new channels are set to the right size
453 // and filled with zeros
454 for (int i = originalNumChannels; i < numChannels; i++)
455 samples[i].resize (originalNumSamplesPerChannel, static_cast<T> (0));
456}
457
458//=============================================================
459template <class T>

Callers 1

writeSineWaveToAudioFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected