Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixed seeking in multi channel FLAC files. #1041
I was able to reproduce and fix #1040. As suggested in the forum thread you simply had to take out the channel count, because the FLAC decoder expected the absolute sample count.
I have one more improvement though: Update the documentation for
//////////////////////////////////////////////////////////// /// \brief Change the current read position to the given sample offset /// /// Attention: Bear in mind that the sample offset takes, /// the channel count into account. The total number /// of samples is caculated like this: /// `sampleCount * sampleRate * channelCount` /// /// If the given offset exceeds to total number of samples, /// this function must jump to the end of the file. /// /// \param sampleOffset Index of the sample to jump to, relative to the beginning /// ////////////////////////////////////////////////////////////
If nobody has anything against it, I will update the documentation.
This was referenced
Jan 17, 2016
Aaah ok. Yes I did check .ogg and .wav with a stereo sound file. The problem doesn't exist there.