Xeiron / sndfile.rs

A safe rust wrapper of libsndfile
MIT License
10 stars 7 forks source link

read_all_to_vec reads in only a fraction of the file if there is more than one channel #1

Closed johannes-mueller closed 4 years ago

johannes-mueller commented 4 years ago

Expected behavior

When reading a sample file with n channels and m samples (i.e. frames) you would expect SndFileIO::read_all_to_vec() return a Vec with lenght nm samples (m for each channel). So for a stereo file one second long at a sample rate of 48kHz you would expect 1s 48000kHz * 2 = 96000 samples (48000 for each channel)

Observed behavior

You actually get a sample of the length m, so for a stereo sample, half the length

tuxzz commented 4 years ago

Your pull request has been merged. Thanks for your contribution. The new published version is 0.0.4.