| 443 | //============================================================= |
| 444 | template <class T> |
| 445 | void 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 | //============================================================= |
| 459 | template <class T> |
no outgoing calls
no test coverage detected