files should have at least one channel.

This commit is contained in:
Robin Gareus
2014-11-18 02:13:15 +01:00
parent bd5713f009
commit 5e90b97c42

View File

@@ -234,6 +234,7 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
const framecnt_t nframes = ResampledImportableSource::blocksize;
boost::shared_ptr<AudioFileSource> afs;
uint32_t channels = source->channels();
assert(channels > 0);
boost::scoped_array<float> data(new float[nframes * channels]);
vector<boost::shared_array<Sample> > channel_data;