}
unsigned num_channels = device->interesting_channels.size();
- assert(num_channels > 0);
+ if (num_channels == 0) {
+ // No buses use this device; throw it away. (Normally, we should not
+ // be here, but probably, we are in the process of changing a mapping,
+ // and the queue just isn't gone yet. In any case, returning is harmless.)
+ return true;
+ }
// Convert the audio to fp32.
unique_ptr<float[]> audio(new float[num_samples * num_channels]);