-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rem/aufile: fix aufile_get_length calculations #1008
Conversation
Also, aufile_prm should be const.
rem/aufile/aufile.c
Outdated
return af->datasize * prm->channels * prm->srate | ||
/ 1000; | ||
return af->datasize / prm->channels * 1000 | ||
/ prm->srate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe readable better and only one division:
return af->datasize * 1000 / (prm->channels * prm->srate);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also take the WAV header size into account?
See function aufile_set_position()
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
af->datasize
is already the size of the data chunk without the header
A test case with a small wav file within |
aufile_get_length
were backwards.aufile_get_length
were backwards.
aufile_get_length
were backwards.aufile_get_length
calculations
aufile_get_length
calculations
Looks like microsoft has a broken repo currently:
|
Also,
aufile_prm
should be const.